{"id":16165,"date":"2021-04-12T13:02:27","date_gmt":"2021-04-12T11:02:27","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/"},"modified":"2021-04-12T13:02:27","modified_gmt":"2021-04-12T11:02:27","slug":"k8s-on-windows-virtualbox","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/","title":{"rendered":"K8s on Windows\/VirtualBox"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nThis is a little demo, easy to copy-paste, if you want to play with Kubernetes on your laptop. And, not a simple &#8220;Hello World&#8221; but a real database running here, able to scale up and down with full availability.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#install-virtualbox\" name=\"install-virtualbox\"> <\/a> Install Virtualbox<\/h3>\n<p>I use Oracle VirtuaBox because I&#8217;m a big fan of Oracle products, especially when they are good and free. However, you can use Hyper-V (then just skip this paragraph and use <em>&#8211;driver=hyperv<\/em> instead of <em>&#8211;driver=virtualbox<\/em>)<\/p>\n<p>I have VirtualBox installed. You can install it for free <a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\">https:\/\/www.virtualbox.org\/wiki\/Downloads<\/a><\/p>\n<p>Virtualization must be enabled in the BIOS:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>Microsoft Windows [Version 10.0.19042.906]\n(c) Microsoft Corporation. All rights reserved.\n\nC:\\Users\\Franck&gt; systeminfo\n\n...\nHyper-V Requirements:      VM Monitor Mode Extensions: Yes\n                           Virtualization Enabled In Firmware: Yes\n                           Second Level Address Translation: Yes\n                           Data Execution Prevention Available: Yes\n\nC:\\WINDOWS\\system32&gt;bcdedit\n\n...\nhypervisorlaunchtype    Off\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>Even if this is the Hyper-V requirements, they are the same for VirtualBox and <em>hypervisorlaunchtype<\/em> at <em>off<\/em> allows VirtualBox.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#install-chocolatey\" name=\"install-chocolatey\"> <\/a> Install Chocolatey<\/h3>\n<p>I&#8217;ll use Chocolatey software manager to install Minikube, here is how to install it from a PowerShell window:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https:\/\/chocolatey.org\/install.ps1'))\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>(run this on a PowerShell window as Administrator)<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>Microsoft Windows [Version 10.0.19042.906]\n(c) Microsoft Corporation. All rights reserved.\n\nC:\\Users\\Franck&gt;choco\nChocolatey v0.10.15\nPlease run 'choco -?' or 'choco &lt;command&gt; -?' for help menu.\n\nC:\\Users\\Franck&gt;\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#install-minikube\" name=\"install-minikube\"> <\/a> Install Minikube<\/h3>\n<p>Minikube is a tool to run a single node Kubernetes on laptop:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>choco install minikube\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>(run this on a &#8216;DOS&#8217; window as Administrator)<\/p>\n<p>The minikube command will be used to interact with the VM (start, stop, tunnel&#8230;), and the kubectl to interact with kubernetes.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#install-helm\" name=\"install-helm\"> <\/a> Install Helm<\/h3>\n<p>Helm is an open source package tool for kubernetes to install applications.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>choco install kubernetes-helm\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>(run this on a &#8216;DOS&#8217; window as Administrator)<\/p>\n<p>I&#8217;ll use Helm to install the package I want to run. I work with databases, and I&#8217;ll install one for this demo. Even if Kubernetes is initially designed to scale stateless applications, it has evolved with stateful sets, and persistent storage. However, it may not be the right platform for a monolith database. Then, I&#8217;ll run <strong>YugabyteDB<\/strong>, an open-source cloud-native distributed database, which makes more sense in an environment that can scale by adding pods, and where replication maintains the availability when a node goes down, or is added.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#testing-with-a-database-yugabytedb\" name=\"testing-with-a-database-yugabytedb\"> <\/a> Testing with a database: YugabyteDB<\/h3>\n<p>The installation on a local cluster is documented:<br \/>\n<a href=\"https:\/\/docs.yugabyte.com\/latest\/quick-start\/create-local-cluster\/kubernetes\/\">https:\/\/docs.yugabyte.com\/latest\/quick-start\/create-local-cluster\/kubernetes\/<\/a><\/p>\n<p>This creates a cluster with no replication (replication factor 1) which is ok for a local lab on a laptop.<\/p>\n<p>I&#8217;ll do something a bit different, trying RF3 (the replication factor should be an odd number as there&#8217;s a quorum election for the leader). This means more pods, and I&#8217;ll limit the memory and CPU so that it can run on any laptop. I&#8217;m doing this on my Surface Pro which has 2 cores, 4 Intel threads, and 16GB RAM).<\/p>\n<p>First add the Yugabyte Helm charts repository<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>helm repo add yugabytedb https:\/\/charts.yugabyte.com\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>Here is the current version:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>\nC:\\Users\\Franck&gt; helm repo update\nC:\\Users\\Franck&gt; helm search repo yugabytedb\/yugabyte\n\nNAME                    CHART VERSION   APP VERSION     DESCRIPTION\nyugabytedb\/yugabyte     2.5.3           2.5.3.1-b10     YugabyteDB is the high-performance distributed ...\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>You can download the chart if you want to have a look at it (helm repo update &amp; helm fetch yugabytedb\/yugabyte)<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#start\" name=\"start\"> <\/a> Start<\/h3>\n<p>Now I can start the Minikube node:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>minikube start --driver=virtualbox --cpus=4 --memory 8192 --disk-size 30g \n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>This creates and starts a VirtualBox VM. It seems that whatever the &#8211;cpu I pass, it creates a 2 vCPU VM which is not sufficient for a RF3 cluster (I need 3 yb-master and at least 3 yb-tserver).<\/p>\n<p>I&#8217;ll update the settings with VBoxManage to set to 4 vCPU (the maximum threads on my Surface Pro) but capping them at 80% to leave some capacity to for host OS.<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>minikube stop\n\n\"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage\" modifyvm minikube --cpus 4 --cpuexecutioncap 80\n\nminikube start\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>Of course you can do that with the VirtualBox GUI.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#create-the-distributed-db\" name=\"create-the-distributed-db\"> <\/a> Create the distributed DB<\/h3>\n<p>I create a namespace for my Yugabyte universe:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>kubectl create namespace franck-yb\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>Checking them:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\Franck&gt; kubectl get namespaces\n\nNAME                   STATUS   AGE\ndefault                Active   7m54s\nfranck-yb              Active   24s\nkube-node-lease        Active   7m55s\nkube-public            Active   7m55s\nkube-system            Active   7m55s\nkubernetes-dashboard   Active   9s\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>All that can also visible from the web console that is started with:<br \/>\n<code>minikube dashboard<\/code> as this opens a localhost port to display the kubernetes dashboard.<\/p>\n<p>I can start a YugabyteDB universe on a Kubernetes cluster with a simple <code>helm install yugabyte yugabytedb\/yugabyte --namespace franck-yb<\/code> but the defaults are too large for my laptop:<\/p>\n<ul>\n<li>2 vCPU per pod. I&#8217;ll set 0.5 vCPU to run on my 4 vCPU VM.<\/li>\n<li>4GiB per Tserver and 2GiB per master. I&#8217;ll set 1GiB. (this will set &#8211;memory_limit_hard_bytes to 85% with -default_memory_limit_to_ram_ratio=0.85)<\/li>\n<\/ul>\n<p>Here it is with my settings:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>helm install yugabyte yugabytedb\/yugabyte --namespace franck-yb --set resource.master.requests.cpu=0.5,resource.master.requests.memory=1Gi,storage.master.count=1,storage.master.size=2Gi,resource.tserver.requests.cpu=0.5,resource.tserver.requests.memory=1Gi,storage.tserver.count=1,storage.tserver.size=2Gi,replicas.master=3,replicas.tserver=3,storage.ephemeral=true\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>I&#8217;ve defined storage.ephemeral=true here and that&#8217;s probably not what you want for a database in general. But, first, this is a lab on my laptop, running in a VirtualBox VM that I can snapshot. And I use a database that is replicated (replication factor 3) and then one node, out of 3, can be lost, storage included. And a new node added later, with no data loss, as the replicas will be populated from the other nodes.<\/p>\n<p>If you want no replication, less servers, but persistent storage, just change the last 3 settings with replicas.master=1,replicas.tserver=1,storage.ephemeral=false<\/p>\n<p>With low resource this may take a few seconds:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\Franck&gt; kubectl --namespace franck-yb get pods\n\nNAME           READY   STATUS              RESTARTS   AGE\nyb-master-0    0\/1     ContainerCreating   0          1m1s\nyb-master-1    0\/1     ContainerCreating   0          1m1s\nyb-master-2    0\/1     ContainerCreating   0          1m\nyb-tserver-0   0\/1     ContainerCreating   0          1m1s\nyb-tserver-1   0\/1     ContainerCreating   0          1m1s\nyb-tserver-2   0\/1     ContainerCreating   0          1m1s\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>The stateful sets take care of the order (masters are started before tservers) and the network addresses (which must be known before they are created).<\/p>\n<p>You can ssh to the VM to check what is running:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>minikube ssh\nstty columns 120\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>(The tty columns was not set correctly) but all is also accessible from the web console of kubernetes with `minikube dashboard` and choosing the right namespace.<\/p>\n<p>When you want to cleanup all this you can:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>helm delete yugabyte -n franck-yb\nminikube delete\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>the last command even deletes the VirtualBox VM.<\/p>\n<p>But before cleaning it up I check that I can connect to my distributed database:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>kubectl exec --namespace franck-yb -it yb-tserver-0 -- \/home\/yugabyte\/bin\/ysqlsh -h yb-tserver-0.yb-tservers.franck-yb\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>This runs the YSQLSH command line for YugabyteDB SQL API through kubernetes container exec.<\/p>\n<p>But, as this SQL API is fully compatible with PostgreSQL I can just forward the YSQL port from one of the table servers:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>kubectl --namespace franck-yb port-forward svc\/yb-tservers 5433:5433\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>With this I can connect with psql, DBeaver, or any PostgreSQL client as YugabyteDB is fully postgres-compatible:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\fpa&gt; psql -h localhost -p 5433 -U yugabyte\n\npsql (12.6, server 11.2-YB-2.5.3.1-b0)\nType \"help\" for help.\n\nyugabyte=# create table demo ( k int primary key, v int ) split into 3 tablets;\nCREATE TABLE\nyugabyte=# insert into demo select generate_series,42 from generate_series(1,1000);\nINSERT 0 1000\nyugabyte=# select count(*) from demo;\n count\n------------\n  1000\n(1 row)\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>You see the version, this YugabyteDB version 2.5.3 is compatible with PostgreSQL 11.2, and I have created a demo table sharded over 3 tablets, with 1000 rows.<\/p>\n<p>I can check the tablets from the web console, exposed by the yb-master-ui service. Here are all exposed services:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\Franck&gt; kubectl --namespace franck-yb get services\n\nNAME                 TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                      AGE\nyb-master-ui         LoadBalancer   10.105.151.9     &lt;pending&gt;     7000:31447\/TCP                                                               7m42s\nyb-masters           ClusterIP      None             &lt;none&gt;        7000\/TCP,7100\/TCP                                                            7m42s\nyb-tserver-service   LoadBalancer   10.100.217.206   &lt;pending&gt;     6379:31842\/TCP,9042:32404\/TCP,5433:31626\/TCP                                 7m42s\nyb-tservers          ClusterIP      None             &lt;none&gt;        9000\/TCP,12000\/TCP,11000\/TCP,13000\/TCP,9100\/TCP,6379\/TCP,9042\/TCP,5433\/TCP   7m42s\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>There&#8217;s no external IP in Minikube but it is easy to tunnel the UI (port 7000 of the master):<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>kubectl --namespace franck-yb port-forward svc\/yb-master-ui 7000:7000\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>Then I can access the YugabyteDB GUI on <a href=\"http:\/\/localhost:7000\">http:\/\/localhost:7000<\/a> and this is where the following screenshots come from.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#scaledown-scaleup\" name=\"scaledown-scaleup\"> <\/a> scale-down \/ scale-up<\/h3>\n<p>The big advantage of Kubenetes is that a node can be killed, another created, scaling down and up the cluster. That&#8217;s possible with a stateless application, but also with a database, when it is distributed shared-nothing one. And it stays available thanks to a replication factor higher than one.<\/p>\n<p>All 3 nodes are up:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114151-all-nodes-up.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49192\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114151-all-nodes-up.jpg\" alt=\"\" width=\"1024\" height=\"362\" \/><\/a><br \/>\nMy table is hash-sharded into 3 tablets, with one leader on each node and followers on 2 other nodes:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114304-distributed-leaders.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49191\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114304-distributed-leaders.jpg\" alt=\"\" width=\"1024\" height=\"508\" \/><\/a><br \/>\nI scale down the tablet server stateful-set to 2 nodes:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\Franck&gt; kubectl scale -n franck-yb statefulset yb-tserver --replicas=2\nstatefulset.apps\/yb-tserver scaled\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>The yb-tserver-2 is considered temporarily unavailable, still with 3 tablets but no leaders:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114410-node-down-new-leader-election.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49190\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114410-node-down-new-leader-election.jpg\" alt=\"\" width=\"1024\" height=\"377\" \/><\/a><br \/>\nThe follower that was in yb-tserver-0 has been elected as the new leader for this tablet:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49189\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\" alt=\"\" width=\"1024\" height=\"201\" \/><\/a><br \/>\nAt that point, my demo table is still fully available. And each of the remaining node have a full copy of the data.<\/p>\n<p>After a minute, the node is definitely considered as dead:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114626-node-is-dead.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49203\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114626-node-is-dead.jpg\" alt=\"\" width=\"1024\" height=\"280\" \/><\/a><\/p>\n<p>Now I scale up to 3 nodes again:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\Franck&gt; kubectl scale -n franck-yb statefulset yb-tserver --replicas=3\nstatefulset.apps\/yb-tserver scaled\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>The node is detected and rebalancing starts:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114713-scaled-up.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49201\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114713-scaled-up.jpg\" alt=\"\" width=\"1024\" height=\"258\" \/><\/a><br \/>\nThe tablet leaders distribution is quickly re-balanced to the 3 pods:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114844-back-to-3-nodes.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49199\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114844-back-to-3-nodes.jpg\" alt=\"\" width=\"1024\" height=\"348\" \/><\/a><br \/>\nWith 1000 rows this is very fast of course.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-120420-rebalanced.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49198\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-120420-rebalanced.jpg\" alt=\"\" width=\"1024\" height=\"245\" \/><\/a><\/p>\n<p>As I defined my minikube VM with only 4 vCPUs I canot scale-up the yb-server to one additional pod. But, and please remember this is a lab, I can kill one of the yb-master to leave room for one additional pod:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>kubectl scale -n franck-yb statefulset yb-master --replicas=2\nkubectl scale -n franck-yb statefulset yb-tserver --replicas=4\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>The failure of one master is detected, but thanks to RF3 the system is still available:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-124417.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49196\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-124417.jpg\" alt=\"\" width=\"1024\" height=\"427\" \/><\/a><br \/>\nThe new node has taken over some of the followers:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-124546.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49195\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-124546.jpg\" alt=\"\" width=\"1024\" height=\"423\" \/><\/a><br \/>\nThere is no need to elect a leader in this new node:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-124800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49194\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-124800.jpg\" alt=\"\" width=\"1024\" height=\"291\" \/><\/a><br \/>\nOf course, if I create a new table it will be sharded with leaders on all nodes:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>yugabyte=# create table demo2 as select * from demo;\nSELECT 1000\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-125828.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-49193\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-125828.jpg\" alt=\"\" width=\"1024\" height=\"527\" \/><\/a><br \/>\nThere are 32 tablets for this table because I didn&#8217;t specify the SPLIT INTO clause and the default is 8 per server (<i>&#8211;ysql_num_shards_per_tserver=8<\/i>) here.<\/p>\n<h3><a href=\"https:\/\/dev.to\/franckpachot\/k8s-on-windows-virtualbox-3ck4-temp-slug-1435188?preview=f0012c7500e0e62a542b5a7589a63949e7fd61f8fdb250c11a981af23547a74eb41081885177a5f556aed2019e3c4028be048bd2d8e75a2b9affb2d7#ephemeral-storage\" name=\"ephemeral-storage\"> <\/a> ephemeral storage?<\/h3>\n<p>I used non-persistent storage for two reasons. First, Minikube has some limitations when compared with a real Kubernetes cluster, and I&#8217;m not sure how I can run a multi-node RF3 cluster with persistent volumes and easily scale it up and down. But the main reason is that this is a lab, running on VirtualBox, and I can save the state at this VBox level.<\/p>\n<p>Here is how I stop the VirtualBox VM keeping the disc + memory state, and start it up again:<\/p>\n<div class=\"highlight js-code-highlight\">\n<pre class=\"highlight plaintext\"><code>C:\\Users\\fpa&gt; \"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage\" controlvm minikube savestate\n0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%\n\nC:\\Users\\fpa&gt; \"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage\" startvm minikube --type headless\nWaiting for VM \"minikube\" to power on...\nVM \"minikube\" has been successfully started.\n<\/code><\/pre>\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<div class=\"highlight js-code-highlight\">\n<div class=\"highlight__panel js-actions-panel\">\n<div class=\"highlight__panel-action js-fullscreen-code-action\"><\/div>\n<\/div>\n<\/div>\n<p>No data was loss here, my demo table is still there because, from the Kubernetes perspectives, the pods were not stopped, just paused by the hypervisor.<\/p>\n<p>In summary: you can play, on a 2 cores laptop, with scaling up and down a distributed database running its nodes on kubernetes pods. Feel free to follow me and discuss on Twitter about this. Databases in microservices and stateless containers is hot topic today.<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">During the week-end, I played with <a href=\"https:\/\/twitter.com\/hashtag\/kubernetes?src=hash&amp;ref_src=twsrc%5Etfw\">#kubernetes<\/a> on my laptop and here is a blog post:<a href=\"https:\/\/t.co\/SIz5tUiKeM\">https:\/\/t.co\/SIz5tUiKeM<\/a> &#8211; Not a &quot;Hello World&quot; example. A real RDBMS scaling on containers <a href=\"https:\/\/twitter.com\/hashtag\/minikube?src=hash&amp;ref_src=twsrc%5Etfw\">#minikube<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/k8s?src=hash&amp;ref_src=twsrc%5Etfw\">#k8s<\/a> <a href=\"https:\/\/twitter.com\/virtualbox?ref_src=twsrc%5Etfw\">@virtualbox<\/a> <a href=\"https:\/\/twitter.com\/Windows?ref_src=twsrc%5Etfw\">@Windows<\/a> <a href=\"https:\/\/twitter.com\/Yugabyte?ref_src=twsrc%5Etfw\">@Yugabyte<\/a><\/p>\n<p>&mdash; Franck Pachot (@FranckPachot) <a href=\"https:\/\/twitter.com\/FranckPachot\/status\/1381595340827156483?ref_src=twsrc%5Etfw\">April 12, 2021<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . This is a little demo, easy to copy-paste, if you want to play with Kubernetes on your laptop. And, not a simple &#8220;Hello World&#8221; but a real database running here, able to scale up and down with full availability. Install Virtualbox I use Oracle VirtuaBox because I&#8217;m a big fan of [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":16169,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1522,83],"tags":[89,648,549,1857],"type_dbi":[],"class_list":["post-16165","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","category-postgresql","tag-kubernetes","tag-virtualbox","tag-windows","tag-yugabytedb"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>K8s on Windows\/VirtualBox - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"K8s on Windows\/VirtualBox\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . This is a little demo, easy to copy-paste, if you want to play with Kubernetes on your laptop. And, not a simple &#8220;Hello World&#8221; but a real database running here, able to scale up and down with full availability. Install Virtualbox I use Oracle VirtuaBox because I&#8217;m a big fan of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-12T11:02:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1891\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/59554f0d99383431eb6ed427e338952b\"},\"headline\":\"K8s on Windows\\\/VirtualBox\",\"datePublished\":\"2021-04-12T11:02:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/\"},\"wordCount\":1436,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\",\"keywords\":[\"kubernetes\",\"virtualbox\",\"Windows\",\"YugaByteDB\"],\"articleSection\":[\"Kubernetes\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/\",\"name\":\"K8s on Windows\\\/VirtualBox - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\",\"datePublished\":\"2021-04-12T11:02:27+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/59554f0d99383431eb6ed427e338952b\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg\",\"width\":1891,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/k8s-on-windows-virtualbox\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"K8s on Windows\\\/VirtualBox\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/59554f0d99383431eb6ed427e338952b\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"caption\":\"Open source Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"K8s on Windows\/VirtualBox - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/","og_locale":"en_US","og_type":"article","og_title":"K8s on Windows\/VirtualBox","og_description":"By Franck Pachot . This is a little demo, easy to copy-paste, if you want to play with Kubernetes on your laptop. And, not a simple &#8220;Hello World&#8221; but a real database running here, able to scale up and down with full availability. Install Virtualbox I use Oracle VirtuaBox because I&#8217;m a big fan of [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/","og_site_name":"dbi Blog","article_published_time":"2021-04-12T11:02:27+00:00","og_image":[{"width":1891,"height":372,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg","type":"image\/jpeg"}],"author":"Open source Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Open source Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"headline":"K8s on Windows\/VirtualBox","datePublished":"2021-04-12T11:02:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/"},"wordCount":1436,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg","keywords":["kubernetes","virtualbox","Windows","YugaByteDB"],"articleSection":["Kubernetes","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/","url":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/","name":"K8s on Windows\/VirtualBox - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg","datePublished":"2021-04-12T11:02:27+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/Screenshot-2021-04-12-114520-temporarily-scaled-down.jpg","width":1891,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/k8s-on-windows-virtualbox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"K8s on Windows\/VirtualBox"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","caption":"Open source Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=16165"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16165\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/16169"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=16165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=16165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=16165"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=16165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}