Project: YugabyteDB (App Definition and Development / Database)
File: mirantis.md

title: Mirantis Kubernetes Engine linkTitle: Mirantis MKE description: Mirantis menu: preview_integrations: identifier: mirantis parent: integrations-other weight: 571 type: docs is a container orchestration platform for developing and running modern applications at scale, on private clouds, public clouds, and on bare metal. MKE as a container orchestration platform is especially beneficial in the following scenarios: Orchestrating more than one container Robust and scalable applications deployment Multi-tenant software offerings The following sections describe how to deploy a single-node YugabyteDB cluster on Mirantis MKE using and . This page describes the steps for a single-node cluster for the purpose of simplicity, as you require more than one machine/VM for a multi-node cluster deployment. Before installing a single-node YugabyteDB cluster, ensure that you have the Docker runtime installed on the host on which you are installing MKE. To download and install Docker, select one of the following environments: <i class="fa-brands fa-apple" aria-hidden="true"></i> <i class="fa-brands fa-centos"></i> <i class="fa-brands fa-ubuntu"></i> <i class="icon-debian"></i> Install MKE docker image as follows: ```sh docker image pull mirantis/ucp:3.5.8 ``` ```sh docker container run --rm -it --name ucp \ -v /var/run/docker.sock:/var/run/docker.sock \ mirantis/ucp:3.5.8 install \ --host-address <node-ip> \ // Replace <node-ip> with the IP address of your machine. --interactive ``` When prompted, enter the `username` and `password` that you want to set; these are used to access the MKE web UI. Install and configure kubectl with MKE, and install Helm using the instructions in . Create a new storage class using the following steps: Copy the following content to a file named `storage.yaml`: ```conf apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: yb-storage provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer ``` Apply the configuration using the following command: ```sh kubectl apply -f storage.yaml ``` Make the new storage class default as follows: ```sh kubectl patch storageclass yb-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' ``` Verify that the storage class is created using the following command: ```sh kubectl get storageclass ``` ```output NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE yb-storage(default) kubernetes.io/no-provisioner Delete WaitForFirstConsumer false 23s ``` Create four (PVs) using the following steps: Copy the following PersistentVolume configuration to a file `volume.yaml`: ```conf apiVersion: v1 kind: PersistentVolume metadata: name: task-pv-volume1 labels: type: local spec: storageClassName: yb-storage capacity: storage: 10Gi accessModes: ReadWriteOnce hostPath: path: "/mnt/data" ``` Apply the configuration using the following command: ```sh kubectl apply -f

``` Repeat the preceding two steps to create the remaining PVs : `task-pv-volume2`, `task-pv-volume3`, and `task-pv-volume4` by changing the metadata name in `volume.yaml` for each volume and re-running the `kubectl apply` command on the same file. Verify PersistentVolumes are created using the following command: ```sh kubectl get pv ``` ```output NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE task-pv-volume1 10Gi RWO Retain Available yb-storage 103s task-pv-volume2 10Gi RWO Retain Available yb-storage 82s task-pv-volume3 10Gi RWO Retain Available yb-storage 70s task-pv-volume4 10Gi RWO Retain Available yb-storage 60s ``` To download and start YugabyteDB Helm chart, perform the following: Add the charts repository using the following command: ```sh helm repo add yugabytedb https://charts.yugabyte.com ``` Fetch updates from the repository using the following command: ```sh helm repo update ``` Validate the chart version as follows: ```sh helm search repo yugabytedb/yugabyte --version 2.17.2 ``` ```output NAME CHART VERSION APP VERSION DESCRIPTION yugabytedb/yugabyte 2.17.2 2.17.2.0-b216 YugabyteDB is the high-performance distributed ... ``` Create a single-node YugabyteDB cluster using the following command: ```sh kubectl create namespace yb-demo helm install yb-demo yugabytedb/yugabyte \ --version 2.17.2 \ --set resource.master.requests.cpu=0.5,resource.master.requests.memory=0.5Gi,\ resource.tserver.requests.cpu=0.5,resource.tserver.requests.memory=0.5Gi,\ replicas.master=1,replicas.tserver=1 --namespace yb-demo ``` Run the following command to verify that you have two services with one running pod in each: one YB-Master pod (yb-master-0) and one YB-Tserver pod (yb-tserver-0): ```sh kubectl --namespace yb-demo get pods ``` ```output NAME READY STATUS RESTARTS AGE yb-master-0 0/2 ContainerCreating 0 5s yb-tserver-0 0/2 ContainerCreating 0 4s ``` For details on the roles of these pods in a YugabyteDB cluster, refer to . The status of all the pods change to Running state in a few seconds, as per the following output: ```output NAME READY STATUS RESTARTS AGE yb-master-0 2/2 Running 0 13s yb-tserver-0 2/2 Running 0 12s ``` Connect to your cluster using , and interact with it using distributed SQL. ysqlsh is installed with YugabyteDB and is located in the bin directory of the YugabyteDB home directory. To start ysqlsh with kubectl, run the following command: ```sh kubectl --namespace yb-demo exec -it yb-tserver-0 -- sh -c "cd /home/yugabyte && ysqlsh -h yb-tserver-0 --echo-queries" ``` ```output ysqlsh (11.2-YB-2.1.0.0-b0) Type "help" for help. yugabyte=# ``` To load sample data and explore an example using ysqlsh, refer to . To control your cluster visually with MKE , refer to .