{"id":64611,"date":"2022-05-26T09:01:08","date_gmt":"2022-05-26T09:01:08","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=64611"},"modified":"2022-05-26T09:01:08","modified_gmt":"2022-05-26T09:01:08","slug":"migrate-databases-to-kubernetes-using-konveyor","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=64611","title":{"rendered":"Migrate databases to Kubernetes using Konveyor"},"content":{"rendered":"<p><span class=\"field field--name-title field--type-string field--label-hidden\">Migrate databases to Kubernetes using Konveyor<\/span><br \/>\n<span class=\"field field--name-uid field--type-entity-reference field--label-hidden\"><a title=\"View user profile.\" href=\"https:\/\/opensource.com\/users\/yasu-katsuno\" class=\"username\">Yasu Katsuno<\/a><\/span><br \/>\n<span class=\"field field--name-created field--type-created field--label-hidden\">Wed, 05\/25\/2022 &#8211; 08:21<\/span><\/p>\n<div data-drupal-selector=\"rate-node-70029\" class=\"rate-widget-thumbs-up\" title=\"Register or Login to like.\">\n<div class=\"rate-thumbs-up-btn-up vote-pending\">1 reader likes this<\/div>\n<div class=\"rate-score\">1 reader likes this<\/div>\n<\/div>\n<div class=\"clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item\">\n<p>Kubernetes Database Operator is useful for building scalable database servers as a database (DB) cluster. But because you have to create new artifacts expressed as YAML files, migrating existing databases to Kubernetes requires a lot of manual effort. This article introduces a new open source tool named Konveyor <a href=\"https:\/\/github.com\/konveyor\/tackle-diva\/tree\/main\/doa\" target=\"_blank\" rel=\"noopener\">Tackle-DiVA-DOA<\/a> (Data-intensive Validity Analyzer-Database Operator Adaptation). It automatically generates deployment-ready artifacts for database operator migration. And it does that through datacentric code analysis.<\/p>\n<h2>What is Tackle-DiVA-DOA?<\/h2>\n<p>Tackle-DiVA-DOA (DOA, for short) is an open source datacentric database configuration analytics tool in Konveyor Tackle. It imports target database configuration files (such as SQL and XML) and generates a set of Kubernetes artifacts for database migration to operators such as <a href=\"https:\/\/github.com\/zalando\/postgres-operator\" target=\"_blank\" rel=\"noopener\">Zalando Postgres Operator<\/a>.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/05\/tackle2520illustration.png\" width=\"675\" height=\"393\" alt=\"A flowchart shows a database cluster with three virtual machines and SQL and XML files transformed by going through Tackle-DiVA-DOA into a Kubernetes Database Operator structure and a YAML file\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(Yasuharu Katsuno and Shin Saito, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>DOA finds and analyzes the settings of an existing system that uses a database management system (DBMS). Then it generates manifests (YAML files) of Kubernetes and the Postgres operator for deploying an equivalent DB cluster.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/05\/existing2520system2520tackle.png\" width=\"501\" height=\"436\" alt=\"A flowchart shows the four elements of an existing system (as described in the text below), the manifests generated by them, and those that transfer to a PostgreSQL cluster\" loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(Yasuharu Katsuno and Shin Saito, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<div class=\"embedded-resource-list callout-float-right\">\n<div class=\"field field--name-title field--type-string field--label-hidden field__item\">More on Kubernetes<\/div>\n<div class=\"field field--name-links field--type-link field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/topics\/containers\/what-is-kubernetes?intcmp=7016000000127cYAAQ\">What is Kubernetes?<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/services\/training\/do080-deploying-containerized-applications-technical-overview?intcmp=7016000000127cYAAQ\">Free online course: Containers, Kubernetes and Red Hat OpenShift technical over\u2026<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/engage\/kubernetes-containers-storage-s-201911201051?intcmp=7016000000127cYAAQ\">eBook: Storage Patterns for Kubernetes<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/engage\/openshift-storage-testdrive-20170718?intcmp=7016000000127cYAAQ\">Test drive OpenShift hands-on<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/www.redhat.com\/en\/resources\/managing-containers-kubernetes-openshift-technology-detail?intcmp=7016000000127cYAAQ\">An introduction to enterprise Kubernetes<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/enterprisersproject.com\/article\/2017\/10\/how-explain-kubernetes-plain-english?intcmp=7016000000127cYAAQ\">How to explain Kubernetes in plain terms<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/kubernetes-raspberry-pi?intcmp=7016000000127cYAAQ\">eBook: Running Kubernetes on your Raspberry Pi homelab<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/kubernetes-cheat-sheet?intcmp=7016000000127cYAAQ\">Kubernetes cheat sheet<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/downloads\/kubernetes-sysadmin?intcmp=7016000000127cYAAQ\">eBook: A guide to Kubernetes for SREs and sysadmins<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/kubernetes?intcmp=7016000000127cYAAQ\">Latest Kubernetes articles<\/a><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<p>Database settings of an application consist of DBMS configurations, SQL files, DB initialization scripts, and program codes to access the DB.<\/p>\n<ul>\n<li><b>DBMS configurations<\/b> include parameters of DBMS, cluster configuration, and credentials. DOA stores the configuration to <code>postgres.yaml <\/code>and secrets to <code>secret-db.yaml<\/code> if you need custom credentials.<br \/>\n\t\u00a0<\/li>\n<li><b>SQL files<\/b> are used to define and initialize tables, views, and other entities in the database. These are stored in the Kubernetes ConfigMap definition <code>cm-sqls.yaml<\/code>.<br \/>\n\t\u00a0<\/li>\n<li><b>Database initialization scripts<\/b> typically create databases and schema and grant users access to the DB entities so that SQL files work correctly. DOA tries to find initialization requirements from scripts and documents or guesses if it can&#8217;t. The result will also be stored in a ConfigMap named <code>cm-init-db.yaml<\/code>.<br \/>\n\t\u00a0<\/li>\n<li><b>Code to access the database,<\/b> such as host and database name, is in some cases embedded in program code. These are rewritten to work with the migrated DB cluster.<\/li>\n<\/ul>\n<h2>Tutorial<\/h2>\n<p>DOA is expected to run within a container and comes with a script to build its image. Make sure Docker and Bash are installed on your environment, and then run the build script as follows:<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>tmp<br>\n$ <span class=\"kw2\">git clone<\/span> https:<span class=\"sy0\">\/\/<\/span>github.com<span class=\"sy0\">\/<\/span>konveyor<span class=\"sy0\">\/<\/span>tackle-diva.git<br>\n$ <span class=\"kw3\">cd<\/span> tackle-diva<span class=\"sy0\">\/<\/span>doa<br>\n$ <span class=\"kw2\">bash<\/span> util<span class=\"sy0\">\/<\/span>build.sh<br>\n\u2026<br>\ndocker image <span class=\"kw2\">ls<\/span> diva-doa<br>\nREPOSITORY \u00a0 TAG \u00a0 \u00a0 \u00a0 IMAGE ID \u00a0 \u00a0 \u00a0 CREATED \u00a0 \u00a0 \u00a0 \u00a0SIZE<br>\ndiva-doa \u00a0 \u00a0 2.2.0 \u00a0 \u00a0 5f9dd8f9f0eb \u00a0 <span class=\"nu0\">14<\/span> hours ago \u00a0 1.27GB<br>\ndiva-doa \u00a0 \u00a0 latest \u00a0 \u00a05f9dd8f9f0eb \u00a0 <span class=\"nu0\">14<\/span> hours ago \u00a0 1.27GB<\/div><\/div><\/pre>\n<p>This builds DOA and packs as container images. Now DOA is ready to use.<\/p>\n<p>The next step executes a bundled <code>run-doa.sh<\/code><b> <\/b>wrapper script, which runs the DOA container. Specify the Git repository of the target database application. This example uses a Postgres database in the <a href=\"https:\/\/github.com\/saud-aslam\/trading-app\" target=\"_blank\" rel=\"noopener\">TradeApp<\/a> application. You can use the <code>-o <\/code>option for the location of output files and an <code>-i<\/code> option for the name of the database initialization script:<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>tackle-diva<span class=\"sy0\">\/<\/span>doa<br>\n$ <span class=\"kw2\">bash<\/span> run-doa.sh <span class=\"re5\">-o<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out <span class=\"re5\">-i<\/span> start_up.sh <br>\n\u00a0 \u00a0 \u00a0 https:<span class=\"sy0\">\/\/<\/span>github.com<span class=\"sy0\">\/<\/span>saud-aslam<span class=\"sy0\">\/<\/span>trading-app<br><span class=\"br0\">[<\/span>OK<span class=\"br0\">]<\/span> successfully completed.<\/div><\/div><\/pre>\n<p>The <code>\/tmp\/out\/<\/code> directory and <code>\/tmp\/out\/trading-app<\/code>, a directory with the target application name, are created. In this example, the application name is <code>trading-app<\/code>, which is the GitHub repository name. Generated artifacts (the YAML files) are also generated under the application-name directory:<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw2\">ls<\/span> <span class=\"re5\">-FR<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out<span class=\"sy0\">\/<\/span>trading-app<span class=\"sy0\">\/<\/span><br><span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out<span class=\"sy0\">\/<\/span>trading-app<span class=\"sy0\">\/<\/span>:<br>\ncm-init-db.yaml \u00a0cm-sqls.yaml \u00a0create.sh<span class=\"sy0\">*<\/span> \u00a0delete.sh<span class=\"sy0\">*<\/span> \u00a0job-init.yaml \u00a0postgres.yaml \u00a0test<span class=\"sy0\">\/<\/span><br><br><span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out<span class=\"sy0\">\/<\/span>trading-app<span class=\"sy0\">\/<\/span>test:<br>\npod-test.yaml<\/div><\/div><\/pre>\n<p>The prefix of each YAML file denotes the kind of resource that the file defines. For instance, each <code>cm-*.yaml<\/code><b> <\/b>file defines a ConfigMap, and <code>job-init.yaml<\/code><b> <\/b>defines a Job resource. At this point, <code>secret-db.yaml<\/code> is not created, and DOA uses credentials that the Postgres operator automatically generates.<\/p>\n<p>Now you have the resource definitions required to deploy a PostgreSQL cluster on a Kubernetes instance. You can deploy them using the utility script <code>create.sh<\/code>. Alternatively, you can use the <code>kubectl create<\/code><b> <\/b>command:<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ <span class=\"kw3\">cd<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out<span class=\"sy0\">\/<\/span>trading-app<br>\n$ <span class=\"kw2\">bash<\/span> create.sh \u00a0<span class=\"co0\"># or simply \u201ckubectl apply -f .\u201d<\/span><br><br>\nconfigmap<span class=\"sy0\">\/<\/span>trading-app-cm-init-db created<br>\nconfigmap<span class=\"sy0\">\/<\/span>trading-app-cm-sqls created<br>\njob.batch<span class=\"sy0\">\/<\/span>trading-app-init created<br>\npostgresql.acid.zalan.do<span class=\"sy0\">\/<\/span>diva-trading-app-db created<\/div><\/div><\/pre>\n<p>The Kubernetes resources are created, including <code>postgresql<\/code> (a resource of the database cluster created by the Postgres operator), <code>service<\/code><b>, <\/b><code>rs<\/code><b>, <\/b><code>pod<\/code><b>, <\/b><code>job<\/code><b>, <\/b><code>cm<\/code>, <code>secret<\/code>, <code>pv<\/code>, and <code>pvc<\/code>. For example, you can see four database pods named <code>trading-app-*<\/code>, because the number of database instances is defined as four in <code>postgres.yaml<\/code>.<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ kubectl get all,postgresql,cm,secret,pv,pvc<br>\nNAME \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0READY \u00a0 STATUS \u00a0 \u00a0 \u00a0RESTARTS \u00a0 AGE<br>\n\u2026<br>\npod<span class=\"sy0\">\/<\/span>trading-app-db-<span class=\"nu0\">0<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">1<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">1<\/span> \u00a0 \u00a0 Running \u00a0 \u00a0 <span class=\"nu0\">0<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a07m11s<br>\npod<span class=\"sy0\">\/<\/span>trading-app-db-<span class=\"nu0\">1<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">1<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">1<\/span> \u00a0 \u00a0 Running \u00a0 \u00a0 <span class=\"nu0\">0<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a05m<br>\npod<span class=\"sy0\">\/<\/span>trading-app-db-<span class=\"nu0\">2<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">1<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">1<\/span> \u00a0 \u00a0 Running \u00a0 \u00a0 <span class=\"nu0\">0<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a04m14s<br>\npod<span class=\"sy0\">\/<\/span>trading-app-db-<span class=\"nu0\">3<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">1<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">1<\/span> \u00a0 \u00a0 Running \u00a0 \u00a0 <span class=\"nu0\">0<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a04m<br><br>\nNAME \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0TEAM \u00a0 \u00a0 \u00a0 \u00a0 \u00a0VERSION \u00a0 PODS \u00a0 VOLUME \u00a0 CPU-REQUEST \u00a0 MEMORY-REQUEST \u00a0 AGE \u00a0 STATUS<br>\npostgresql.acid.zalan.do<span class=\"sy0\">\/<\/span>trading-app-db \u00a0 trading-app \u00a0 <span class=\"nu0\">13<\/span> \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">4<\/span> \u00a0 \u00a0 \u00a01Gi \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 15m \u00a0 Running<br><br>\nNAME \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0TYPE \u00a0 \u00a0 \u00a0 \u00a0CLUSTER-IP \u00a0 \u00a0 \u00a0EXTERNAL-IP \u00a0 PORT<span class=\"br0\">(<\/span>S<span class=\"br0\">)<\/span> \u00a0 \u00a0AGE<br>\nservice<span class=\"sy0\">\/<\/span>trading-app-db \u00a0 \u00a0 \u00a0 \u00a0 \u00a0ClusterIP \u00a0 10.97.59.252 \u00a0 \u00a0<span class=\"sy0\">none<span class=\"sy0\">&gt;<\/span> \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">5432<\/span><span class=\"sy0\">\/<\/span>TCP \u00a0 15m<br>\nservice<span class=\"sy0\">\/<\/span>trading-app-db-repl \u00a0 \u00a0 ClusterIP \u00a0 10.108.49.133 \u00a0 <span class=\"sy0\">none<span class=\"sy0\">&gt;<\/span> \u00a0 \u00a0 \u00a0 \u00a0<span class=\"nu0\">5432<\/span><span class=\"sy0\">\/<\/span>TCP \u00a0 15m<br><br>\nNAME \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 COMPLETIONS \u00a0 DURATION \u00a0 AGE<br>\njob.batch<span class=\"sy0\">\/<\/span>trading-app-init \u00a0 <span class=\"nu0\">1<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">1<\/span> \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 2m39s \u00a0 \u00a0 \u00a015m<\/span><\/span><\/div><\/div><\/pre>\n<p>Note that the Postgres operator comes with a user interface (UI). You can find the created cluster on the UI. You need to export the endpoint URL to open the UI on a browser. If you use minikube, do as follows:<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span>minikube service postgres-operator-ui<\/div><\/div><\/pre>\n<p>Then a browser window automatically opens that shows the UI.<\/p>\n<article class=\"align-center media media--type-image media--view-mode-default\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/05\/postgreSQ-.png\" width=\"674\" height=\"521\" alt=\"Screenshot of the UI showing the Cluster YAML definition on the left with the Cluster UID underneath it. On the right of the screen a header reads \" checking status of cluster and items in green under that heading show successful creation manifests other elements loading=\"lazy\"><\/div>\n<div class=\"field field--name-field-caption field--type-text-long field--label-hidden caption field__item\"><span class=\"caption__byline\">Image by: <\/span><\/p>\n<p>(Yasuharu Katsuno and Shin Saito, CC BY-SA 4.0)<\/p>\n<\/div>\n<\/article>\n<p>Now you can get access to the database instances using a test pod. DOA also generated a pod definition for testing.<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\">$ kubectl apply <span class=\"re5\">-f<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out<span class=\"sy0\">\/<\/span>trading-app<span class=\"sy0\">\/<\/span>test<span class=\"sy0\">\/<\/span>pod-test.yaml <span class=\"co0\"># creates a test Pod<\/span><br>\npod<span class=\"sy0\">\/<\/span>trading-app-test created<br>\n$ kubectl <span class=\"kw3\">exec<\/span> trading-app-test <span class=\"re5\">-it<\/span> <span class=\"re5\">--<\/span> <span class=\"kw2\">bash<\/span> \u00a0<span class=\"co0\"># login to the pod<\/span><\/div><\/div><\/pre>\n<p>The database hostname and the credential to access the DB are injected into the pod, so you can access the database using them. Execute the <code>psql<\/code> metacommand to show all tables and views (in a database):<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\"><span class=\"co0\"># printenv DB_HOST; printenv PGPASSWORD<\/span><br><span class=\"br0\">(<\/span>values of the variable are shown<span class=\"br0\">)<\/span><br><br><span class=\"co0\"># psql -h ${DB_HOST} -U postgres -d jrvstrading -c 'dt'<\/span><br>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0List of relations<br>\n\u00a0Schema <span class=\"sy0\">|<\/span> \u00a0 \u00a0 \u00a0Name \u00a0 \u00a0 \u00a0<span class=\"sy0\">|<\/span> Type \u00a0<span class=\"sy0\">|<\/span> \u00a0Owner \u00a0 <br>\n--------+----------------+-------+----------<br>\n\u00a0public <span class=\"sy0\">|<\/span> account \u00a0 \u00a0 \u00a0 \u00a0<span class=\"sy0\">|<\/span> table <span class=\"sy0\">|<\/span> postgres<br>\n\u00a0public <span class=\"sy0\">|<\/span> quote \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"sy0\">|<\/span> table <span class=\"sy0\">|<\/span> postgres<br>\n\u00a0public <span class=\"sy0\">|<\/span> security_order <span class=\"sy0\">|<\/span> table <span class=\"sy0\">|<\/span> postgres<br>\n\u00a0public <span class=\"sy0\">|<\/span> trader \u00a0 \u00a0 \u00a0 \u00a0 <span class=\"sy0\">|<\/span> table <span class=\"sy0\">|<\/span> postgres<br><span class=\"br0\">(<\/span><span class=\"nu0\">4<\/span> rows<span class=\"br0\">)<\/span><br><br><span class=\"co0\"># psql -h ${DB_HOST} -U postgres -d jrvstrading -c 'dv'<\/span><br>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 List of relations<br>\n\u00a0Schema <span class=\"sy0\">|<\/span> \u00a0 \u00a0 \u00a0 \u00a0 Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"sy0\">|<\/span> Type <span class=\"sy0\">|<\/span> \u00a0Owner \u00a0 <br>\n--------+-----------------------+------+----------<br>\n\u00a0public <span class=\"sy0\">|<\/span> pg_stat_kcache \u00a0 \u00a0 \u00a0 \u00a0<span class=\"sy0\">|<\/span> view <span class=\"sy0\">|<\/span> postgres<br>\n\u00a0public <span class=\"sy0\">|<\/span> pg_stat_kcache_detail <span class=\"sy0\">|<\/span> view <span class=\"sy0\">|<\/span> postgres<br>\n\u00a0public <span class=\"sy0\">|<\/span> pg_stat_statements \u00a0 \u00a0<span class=\"sy0\">|<\/span> view <span class=\"sy0\">|<\/span> postgres<br>\n\u00a0public <span class=\"sy0\">|<\/span> position \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<span class=\"sy0\">|<\/span> view <span class=\"sy0\">|<\/span> postgres<br><span class=\"br0\">(<\/span><span class=\"nu0\">4<\/span> rows<span class=\"br0\">)<\/span><\/div><\/div><\/pre>\n<p>After the test is done, log out from the pod and remove the test pod:<\/p>\n<pre>\n<div class=\"geshifilter\"><div class=\"bash geshifilter-bash\"><span class=\"co0\"># exit<\/span><br>\n$ kubectl delete <span class=\"re5\">-f<\/span> <span class=\"sy0\">\/<\/span>tmp<span class=\"sy0\">\/<\/span>out<span class=\"sy0\">\/<\/span>trading-app<span class=\"sy0\">\/<\/span>test<span class=\"sy0\">\/<\/span>pod-test.yaml<\/div><\/div><\/pre>\n<p>Finally, delete the created cluster using a script:<\/p>\n<pre>\n<span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span><span class=\"kw2\">bash<\/span> delete.sh<\/code><\/span><\/pre>\n<h2>Welcome to Konveyor Tackle world!<\/h2>\n<p>To learn more about application refactoring, you can check out the <a href=\"https:\/\/www.konveyor.io\/tools\/tackle\/\" target=\"_blank\" rel=\"noopener\">Konveyor Tackle site<\/a>, join the community, and access the source code on <a href=\"https:\/\/github.com\/konveyor\/tackle-diva\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>.<\/p>\n<\/div>\n<div class=\"clearfix text-formatted field field--name-field-article-subhead field--type-text-long field--label-hidden field__item\">\n<p>Konveyor Tackle-DiVA-DOA helps database engineers easily migrate database servers to Kubernetes.<\/p>\n<\/div>\n<div class=\"field field--name-field-lead-image field--type-entity-reference field--label-hidden field__item\">\n<article class=\"media media--type-image media--view-mode-caption\">\n<div class=\"field field--name-field-media-image field--type-image field--label-hidden field__item\">  <img decoding=\"async\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/05\/kubernetes_containers_ship_lead.png\" width=\"1040\" height=\"584\" alt=\"Ships at sea on the web\" title=\"Ships at sea on the web\" loading=\"lazy\"><\/div>\n<\/article>\n<\/div>\n<div class=\"field field--name-field-tags field--type-entity-reference field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/kubernetes\" hreflang=\"en\">Kubernetes<\/a><\/div>\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/tags\/upstream-communities\" hreflang=\"en\">Upstream Communities<\/a><\/div>\n<\/p><\/div>\n<div class=\"field field--name-field-listicle-title field--type-string field--label-hidden field__item\">What to read next<\/div>\n<div class=\"field field--name-field-listicles field--type-entity-reference field--label-hidden field__items\">\n<div class=\"field__item\"><a href=\"https:\/\/opensource.com\/article\/21\/6\/tackle-diva-kubernetes\" hreflang=\"und\">Refactor your applications to Kubernetes<\/a><\/div>\n<\/p><\/div>\n<div class=\"field field--name-field-default-license field--type-list-string field--label-hidden field__item\"><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><br \/>\n        <img decoding=\"async\" alt=\"Creative Commons License\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/05\/cc-by-sa--35.png\" title=\"This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.\"><\/a>This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.<\/div>\n<article class=\"profile\"><a href=\"https:\/\/opensource.com\/points-and-badges\" class=\"profile__points\">31 points<\/a><\/p>\n<div class=\"profile__container\">\n<div class=\"field field--name-field-twitter-id field--type-string field--label-hidden profile__twitter\">| Follow shinsa82<\/div>\n<\/p><\/div>\n<div class=\"profile__badges\">\n<p>  <a href=\"https:\/\/opensource.com\/points-and-badges\" class=\"field field--name-name field--type-string field--label-above profile__badges__name profile__badges__color-\">Open Enthusiast<\/a><\/p>\n<p>  <a href=\"https:\/\/opensource.com\/points-and-badges\" class=\"field field--name-name field--type-string field--label-above profile__badges__name profile__badges__color-\">Author<\/a><\/p>\n<\/div>\n<\/article>\n<section class=\"field field--name-field-comments field--type-comment field--label-hidden comment-wrapper\">\n<div class=\"comments__count\">\n<div class=\"login\"><a href=\"https:\/\/opensource.com\/user\/register?absolute=1\">Register<\/a> or <a href=\"https:\/\/opensource.com\/user\/login?current=\/rss.xml&amp;absolute=1\">Login<\/a> to post a comment.<\/div>\n<\/p><\/div>\n<\/section>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\" rel=\"noopener\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Migrate databases to Kubernetes using Konveyor Yasu Katsuno Wed, 05\/25\/2022 &#8211; 08:21 1 reader likes this 1 reader likes this Kubernetes Database Operator is useful for building scalable database servers as a database (DB) cluster. But because you have to create new artifacts expressed as YAML files, migrating existing databases to Kubernetes requires a lot [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":64612,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-64611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/64611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=64611"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/64611\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/64612"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=64611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=64611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=64611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}