<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Giridharaprasad on Medium]]></title>
        <description><![CDATA[Stories by Giridharaprasad on Medium]]></description>
        <link>https://medium.com/@gprasath?source=rss-e5983f07b5ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Np8giGjTfBtmtfYw.</url>
            <title>Stories by Giridharaprasad on Medium</title>
            <link>https://medium.com/@gprasath?source=rss-e5983f07b5ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 19:44:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gprasath/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Connect azure K8s node using interactive shell]]></title>
            <link>https://gprasath.medium.com/connect-azure-node-using-interactive-shell-e64defd80a53?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/e64defd80a53</guid>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Fri, 30 Sep 2022 04:02:05 GMT</pubDate>
            <atom:updated>2025-05-06T04:46:06.666Z</atom:updated>
            <content:encoded><![CDATA[<ul><li>Install azure cli using below command</li></ul><pre>brew update &amp;&amp; brew install azure-cli</pre><ul><li>Do login using below command</li></ul><pre>az login</pre><p>Let the login be successful.</p><ul><li>Get access to the subscription</li></ul><pre>az account set --subscription &lt;subscription id&gt;</pre><ul><li>Obtain kubeconfig of cluster using below command</li></ul><pre>az aks get-credentials --resource-group &lt;resource group name&gt; --name &lt;cluster name&gt;</pre><ul><li>Try to get the list of nodes using the command</li></ul><pre>kubectl get nodes</pre><ul><li>From the above nodes list, copy the name of node to which you need to connect.</li><li>Execute the below command to start interactive session on the node</li></ul><pre>kubectl debug node/&lt; node name &gt; -it --image=mcr.microsoft.com/dotnet/runtime-deps:6.0</pre><p>This will create a pod and start an interactive session with the desired node from the container inside the pod.</p><ul><li>Finally, you can delete the pod using command</li></ul><pre>kubectl delete po &lt;pod name&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e64defd80a53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Establish passwordless ssh between ubuntu and ESX host.]]></title>
            <link>https://gprasath.medium.com/establish-passwordless-ssh-between-ubuntu-and-esx-host-3b808901b310?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b808901b310</guid>
            <category><![CDATA[esx]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[passwordless]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Thu, 04 Mar 2021 23:57:36 GMT</pubDate>
            <atom:updated>2021-03-04T23:57:36.302Z</atom:updated>
            <content:encoded><![CDATA[<p>Here we describe the procedure to establish passwordless SSH connection to ESX host from ubuntu machine.</p><ul><li>First, let us login into the local machine and generate the authentication key through the following command.</li></ul><pre><strong><em>ssh-keygen -t rsa</em></strong></pre><pre>Generating public/private rsa key pair.<br>Enter file in which to save the key (/home/giri/.ssh/id_rsa): <br>Enter passphrase (empty for no passphrase): <br>Enter same passphrase again: <br>Your identification has been saved in /home/giri/.ssh/id_rsa.<br>Your public key has been saved in /home/giri/.ssh/id_rsa.pub.<br>The key fingerprint is:<br>SHA256:+7Rs50PhUaT2/ldhaB2nVoqx84o5GKsqbHvBPi+i/7c giri@giri-e2e<br>The key&#39;s randomart image is:<br>+---[RSA 2048]----+<br>|             ..  |<br>|            ....o|<br>|            o=o+o|<br>|           .*+++ |<br>|   .    S  ..*o .|<br>|    o   ..  o.. .|<br>| . . .  .+.+ .. .|<br>|  = = . o+=.+  ..|<br>|.+o*o*Eo .++..  o|<br>+----[SHA256]-----+</pre><ul><li>After generating the key pair, the same has to be copied to the remote machine. In ESX, the location of ssh specific files are located in `/etc/ssh` directory. This is different from linux operating systems. So ,we need to copy the public key into that directory.</li></ul><pre>cat .ssh/id_rsa.pub | ssh xxxxx@192.168.xxx.xxx &#39;cat &gt;&gt; /etc/ssh/authorized_keys&#39;</pre><p>You will be prompted for remote machine’s password. After copying the public key successfully, the passwordless SSH to the remote machine will be established successfully.</p><pre>user@machine1:~$ ssh root@192.168.xxx.xxx<br>The time and date of this login have been sent to the system logs.</pre><pre>VMware offers supported, powerful system administration tools.  Please<br>see <a href="http://www.vmware.com/go/sysadmintools">www.vmware.com/go/sysadmintools</a> for details.</pre><pre>The ESXi Shell can be disabled by an administrative user. See the<br>vSphere Security documentation for more information.<br>[root@esx:~]</pre><p>Thus, we can enable passwordless SSH between linux and ESX host.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b808901b310" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with K3s in vSphere and use OpenEBS cStor for its persistent storage.]]></title>
            <link>https://gprasath.medium.com/getting-started-with-k3s-in-vsphere-and-use-openebs-cstor-for-its-persistent-storage-61c227b255ff?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/61c227b255ff</guid>
            <category><![CDATA[openebs]]></category>
            <category><![CDATA[k3]]></category>
            <category><![CDATA[cstor]]></category>
            <category><![CDATA[k3os]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Wed, 04 Mar 2020 07:57:41 GMT</pubDate>
            <atom:updated>2020-03-04T07:57:41.016Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/rancher/k3os/">K3OS</a> is a Linux distribution built for the purpose of running light weight Kubernetes clusters called <a href="https://github.com/rancher/k3s/">K3s</a>. It is specifically designed to only have what is needed to run K<a href="https://github.com/rancher/k3s">3s</a></p><p>In this blog, more of tutorial, I will walk you through the steps to install K3OS and setup OpenEBS, a CNCF project and leading Open Source Container Attached Storage solution for Kubernetes Stateful Workloads.</p><h4>Setting up K3OS in Vsphere</h4><p>K3OS kernel is forked from Ubuntu-18.04 LTS and its user space binaries are from alpine. So, you need to select Ubuntu linux(64 bit) as the guest operating system while creating virtual machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*TjBzWtBWIMNEsL2OjVVQPA.png" /><figcaption>Select guest operating system</figcaption></figure><p>Download the latest K3OS iso file(currently v0.9.0) from its <a href="https://github.com/rancher/k3os/releases">github release</a> page. Attach the iso file into virtual machine and start it with the live installation option as shown below.</p><p>Select the option K3OS LiveCD &amp; install and boot the operating system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibfGJL0GUCR0d4J14xePFg.png" /><figcaption>Live installation</figcaption></figure><p>After booting up successfully, you will be landed in login prompt. The default user in K3OS is rancher. You can login as rancher user without any password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NBd_dB5VSNot66hc5Hg_Zg.png" /><figcaption>Login prompt</figcaption></figure><p>After performing live install, You need to install the Operating system into disk and configure the machine either as server(Master) or agent(worker). This can be performed by executing the command sudo k3os install</p><p>Select the option 1. Install to disk to install K3OS into the disk. In the preceding questions, setup a new password for rancheruser for enabling ssh communication to the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*qv4Y91SvuLLKLgDHda4nmw.png" /><figcaption>Installing into disk</figcaption></figure><p>You need to select either server or agent to install the relevant components in the machine. Select 1.server to deploy K3s server components. You can setup a token or cluster secret which could be used while joining K3s agents to the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*HdUDwy0RRor_m9Ta5QuZ8g.png" /><figcaption>server installation</figcaption></figure><p>After completing the installation, screen similar to following one will be displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fNSWM-1DCFQhe_fzGu9b0Q.png" /><figcaption>Login prompt</figcaption></figure><p>Thus, K3s server can be configured successfully. In case if DHCP is not configured, You need to assign IP address and other networking details using connmanctl utility. Login into the server as rancher user and enter the password configured in the previous step.</p><p>Let us find the connman network service bound to eth0 device by executing the below command.</p><pre>sudo connmanctl services</pre><p>The above command will list the services as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*vYrNunDSyWet4RiwoLDb9g.png" /><figcaption>connmanctl services</figcaption></figure><p>After identifying the service, you can assign IP address, netmask, gateway and DNS server through the following command.</p><pre>sudo connmanctl config &lt;ethernet service&gt; --ipv4 manual &lt;IP Address&gt; &lt;Netmask&gt; &lt;gateway&gt; --nameservers &lt;DNS Address&gt;</pre><p>After executing the above command, ensure if the network is configured properly through ifconfig command.</p><p>Reboot the machine after setting up networking.</p><h4>Install K3s agent</h4><p>In K3s nomenclature, kubernetes workers are called as agents. While installing k3os into disk, you need to select the option 2. agent to configure K3s agent in the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*j_4bXY5FRFhO8Y4ufU9gcA.png" /><figcaption>Run K3s agent</figcaption></figure><p>After selecting Agent, You need to provide the URL of server to which the agent has to be configured. The URL of the K3s server to join as an agent could be formed in following way.</p><pre>https://&lt;K3s Server IP Address&gt;:6443</pre><p>After entering the URL, You need to provide the cluster secret which was configured during server installation.</p><p>After providing all the above inputs, initiate the agent deployment.</p><p>Configure networking in the same way as performed above for server and reboot the machine.</p><p>After rebooting the agent machine, check the cluster status in the server as follows.</p><pre>k3os-1374 [~]$ kubectl get nodes<br>NAME         STATUS   ROLES    AGE     VERSION<br>k3os-1374    Ready    master   10m    v1.17.2+k3s1<br>k3os-15360   Ready    &lt;none&gt;   10m    v1.17.2+k3s1<br>k3os-1091    Ready    &lt;none&gt;   10m    v1.17.2+k3s1</pre><p>Check if all the cluster components are configured successfully and all the pods are running successfully by executing the below command.</p><pre>k3os-1374 [~]$ kubectl get pods -n kube-system<br>NAME                                      READY   STATUS      RESTARTS   AGE<br>helm-install-traefik-nmjvj                0/1     Completed   0          3d<br>svclb-traefik-gp9ff                       2/2     Running     1         2d23h<br>svclb-traefik-qgdlx                       2/2     Running     0         2d23h<br>local-path-provisioner-58fb86bdfd-wkdtm   1/1     Running     1         3d<br>metrics-server-6d684c7b5-mrxsr            1/1     Running     0         3d<br>svclb-traefik-c4v7l                       2/2     Running     0         3d<br>coredns-d798c9dd-td5tr                    1/1     Running     0         3d<br>traefik-6787cddb4b-n57jz                  1/1     Running     0         3d</pre><h4>Install OpenEBS</h4><p>OpenEBS is a CNCF project delivering persistent block storage to the workloads deployed in Kubernetes. <a href="https://docs.openebs.io/docs/next/cstor.html">cStor</a> is one of the storage engines provided by OpenEBS besides <a href="https://docs.openebs.io/docs/next/jiva.html">Jiva</a> and <a href="https://docs.openebs.io/docs/next/localpv.html">Local PV</a></p><p>cStor was not supported in K3OS till k3os-v0.8.0 due to this <a href="https://github.com/rancher/k3os/issues/151">issue</a>. This issue has been addressed in v0.9.0 by adding udev support.</p><pre>k3os-1374 [~]$ kubectl apply -f openebs-operator-1.7.0.yaml <br>namespace/openebs created<br>serviceaccount/openebs-maya-operator created<br>clusterrole.rbac.authorization.k8s.io/openebs-maya-operator created<br>clusterrolebinding.rbac.authorization.k8s.io/openebs-maya-operator created<br>deployment.apps/maya-apiserver created<br>service/maya-apiserver-service created<br>deployment.apps/openebs-provisioner created<br>deployment.apps/openebs-snapshot-operator created<br>configmap/openebs-ndm-config created<br>daemonset.apps/openebs-ndm created<br>deployment.apps/openebs-ndm-operator created<br>deployment.apps/openebs-admission-server created<br>deployment.apps/openebs-localpv-provisioner created</pre><p>Check if all the OpenEBS components are running successfully.</p><pre>k3os-1374 [~]$ kubectl get pods -n openebs<br>NAME                                           READY   STATUS    RESTARTS   AGE<br>openebs-admission-server-f67f77588-8kl78       1/1     Running   0          65s<br>openebs-provisioner-7b8c68bf44-7bjw8           1/1     Running   0          66s<br>openebs-ndm-qp26v                              1/1     Running   0          66s<br>openebs-ndm-84zb4                              1/1     Running   0          66s<br>openebs-ndm-dzghs                              1/1     Running   0          66s<br>openebs-localpv-provisioner-5c87bbd974-55486   1/1     Running   0          65s<br>openebs-ndm-operator-5fccfb7976-dvhj6          1/1     Running   0          66s<br>openebs-snapshot-operator-6c4c64d4bc-qxdwd     2/2     Running   0          66s<br>maya-apiserver-84785d7fbd-ck7sh                1/1     Running   0          66s</pre><p>OpenEBS cStor engine require external disks to be attached to the agents which group together to form cStor Pools.</p><p>The disks or block devices are managed by the component called <a href="https://docs.openebs.io/docs/next/ndm.html"><em>Node disk manager</em></a><em>, </em>shortly called as<em> NDM. </em>After attaching the disks to agent machines, check the block devices by executing the following command.</p><pre>k3os-1374 [~]$ kubectl get blockdevices -n openebs<br>NAME                                           NODENAME     SIZE          CLAIMSTATE   STATUS   AGE<br>blockdevice-30a3eb18f5b9e2d470de45e39f1036b0   k3os-15360   17179869184   Unclaimed    Active   1h<br>blockdevice-86fc964305abe8970fc1508538a61dbc   k3os-1374    17179869184   Unclaimed    Active   1h<br>blockdevice-b8735721689d5843bca10e7028f60a4e   k3os-1091    17179869184   Unclaimed    Active   1h</pre><p>In this case, one block device has been attached to each K3s agent machine. Let us populate these block devices in the below pool creation manifest under <em>spec.blockDevices</em> and create the pool.</p><pre>apiVersion: openebs.io/v1alpha1<br>kind: StoragePoolClaim<br>metadata:<br>  name: cstor-disk-pool<br>  annotations:<br>    cas.openebs.io/config: |<br>      - name: PoolResourceRequests<br>        value: |-<br>            memory: 2Gi<br>      - name: PoolResourceLimits<br>        value: |-<br>            memory: 4Gi<br>spec:<br>  name: cstor-disk-pool<br>  type: disk<br>  poolSpec:<br>    poolType: striped<br>  blockDevices:<br>    blockDeviceList:<br>    - blockdevice-30a3eb18f5b9e2d470de45e39f1036b0<br>    - blockdevice-86fc964305abe8970fc1508538a61dbc <br>    - blockdevice-b8735721689d5843bca10e7028f60a4e</pre><p>After applying the above definition, check if the pools are created successfully by executing the following command.</p><pre>k3os-1374 [~]$ kubectl get csp<br>NAME                   ALLOCATED   FREE    CAPACITY   STATUS    TYPE      AGE<br>cstor-disk-pool-rgy3   270K        15.9G   15.9G      Healthy   striped   2m3s<br>cstor-disk-pool-gij4   270K        15.9G   15.9G      Healthy   striped   2m2s<br>cstor-disk-pool-09l1   270K        15.9G   15.9G      Healthy   striped   2m2s</pre><p>All the pool instance should be healthy and each instance runs a pod which can be found by executing the following command.</p><pre>k3os-1374 [~]$ kubectl get pods -n openebs -l app=cstor-pool<br>NAME                                    READY   STATUS    RESTARTS   AGE<br>cstor-disk-pool-rgy3-57f965b48c-srz2x   3/3     Running   0          8m33s<br>cstor-disk-pool-gij4-77bb4b8f44-s6k89   3/3     Running   0          8m33s<br>cstor-disk-pool-09l1-56d444996b-m698h   3/3     Running   0          8m33s</pre><p>After creating cStor pool, we can proceed to create volume. For illustration, let us deploy busybox with cstor volume as its persistent storage. Before creating pool, we need to create a storage class updated with storagePoolClaim as follows:</p><pre>apiVersion: storage.k8s.io/v1<br>kind: StorageClass<br>metadata:<br>  name: openebs-cstor<br>  annotations:<br>    openebs.io/cas-type: cstor<br>    cas.openebs.io/config: |<br>      - name: StoragePoolClaim<br>        value: &quot;cstor-disk-pool&quot;<br>      - name: ReplicaCount<br>        value: &quot;3&quot;<br>provisioner: openebs.io/provisioner-iscsi</pre><p>Populate storagePoolClaim and ReplicaCount as per your requirement in the above definition and create storage class. You have to use this storage class while creating PVC.</p><pre>kind: PersistentVolumeClaim<br>apiVersion: v1<br>metadata:<br>  name: openebs-pvc<br>spec:<br>  storageClassName: openebs-cstor<br>  accessModes:<br>    - ReadWriteOnce<br>  resources:<br>    requests:<br>      storage: 10Gi<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  labels:<br>    name: busybox<br>  name: busybox<br>spec:<br>  clusterIP: None<br>  selector:<br>    app: busybox<br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: busybox<br>  labels:<br>    app: busybox<br>spec:<br>  selector:<br>    matchLabels:<br>      app: busybox<br>  template:<br>    metadata:<br>      labels:<br>        app: busybox<br>    spec:<br>      containers:<br>      - name: app-busybox<br>        imagePullPolicy: IfNotPresent<br>        image: busybox<br>        command: [&quot;/bin/sh&quot;]<br>        args: [&quot;-c&quot;, &quot;while true; do sleep 10;done&quot;]<br>        env:<br>        volumeMounts:<br>        - name: data-vol<br>          mountPath: /busybox<br>      volumes:<br>      - name: data-vol<br>        persistentVolumeClaim:<br>          claimName: openebs-pvc</pre><p>After updating storage class in the above manifest, let us deploy the busybox application by applying the above definition.</p><p>Check if the PVC is created and mounted successfully on the application pod by checking their status.</p><pre>k3os-1374 [~]$ kubectl get pvc<br>NAME          STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS    AGE<br>openebs-pvc   Bound    pvc-6cd2b30a-49ed-4605-b1e0-dd23c45e548d   10Gi       RWO            openebs-cstor   4m35s</pre><pre><br>k3os-1374 [~]$ kubectl get pods<br>NAME                       READY   STATUS    RESTARTS   AGE<br>busybox-748fb77c75-9lwzz   1/1     Running   0          4m42s</pre><p>As we specified ReplicaCount as 3 in storage class, 3 volume replicas will be created which can be found by executing the following command.</p><pre>k3os-1374 [~]$ kubectl get cvr -n openebs<br>NAME                                                            USED    ALLOCATED   STATUS    AGE<br>pvc-6cd2b30a-49ed-4605-b1e0-dd23c45e548d-cstor-disk-pool-09l1   7.95M   116K        Healthy   6m37s<br>pvc-6cd2b30a-49ed-4605-b1e0-dd23c45e548d-cstor-disk-pool-rgy3   7.95M   116K        Healthy   6m37s<br>pvc-6cd2b30a-49ed-4605-b1e0-dd23c45e548d-cstor-disk-pool-gij4   7.95M   116K        Healthy   6m37s</pre><p>Thus, cStor engine can be used to provision persistent volume for the workloads deployed in K3s.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61c227b255ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy K8s on bare metal with D2IQ-Konvoy and use OpenEBS for storage.]]></title>
            <link>https://gprasath.medium.com/deploy-k8s-on-bare-metal-with-d2iq-konvoy-and-use-openebs-for-storage-af4a2551d8ca?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/af4a2551d8ca</guid>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Fri, 07 Feb 2020 07:14:37 GMT</pubDate>
            <atom:updated>2021-04-08T08:34:29.681Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Konvoy:</strong></p><p>Konvoy is one of the distributions of Kubernetes that pre-packages the necessary add-on services such as prometheus, EFK, grafana with the native Kubernetes cluster.</p><p>In this blog, let me walkthrough the steps for deploying Kubernetes cluster using D2IQ konvoy package on premise virtual machines.</p><p><strong>Deployer host</strong></p><p>It requires a deployer machine where the konvoy command line interface (CLI) will be executed. The deployer host should have the following packages installed.</p><ol><li>Docker Desktop 18.09.2 or later</li><li>Kubectl 15.5 or later</li></ol><p>In my case, installed a Centos-7 box which act as konvoy deployer. In this machine, installed Docker desktop and kubectl.</p><p>While installing Konvoy, it prompts to disable selinux on the deployer host. After disabling selinux, follow the below steps to install Konvoy.</p><ol><li>Download and extract Konvoy package on the deployer host.</li></ol><pre>tar -xf konvoy_v0.x.x_linux.tar.bz2</pre><p>2. After extracting, move the binaries under your user PATH:</p><pre>mv ./konvoy_v0.x.0/* /usr/local/bin/</pre><ol><li>Check the konvoy version by running the following command.</li></ol><pre>$ konvoy — version</pre><pre>v0.6.0: Pulling from mesosphere/konvoy</pre><pre>f5d23c7fed46: Pull complete</pre><pre>…</pre><pre>Digest: sha256:4faf95ce405554a88769a00e89b07b0f2a1257f1dc84115e021f0aaa1ca79020</pre><pre>Status: Downloaded newer image for mesosphere/konvoy:v0.6.0</pre><pre>docker.io/mesosphere/konvoy:v0.6.0</pre><pre>{</pre><pre>“Version”: “v0.6.0”,</pre><pre>“BuildDate”: “Thu Jul 25 04:55:40 UTC 2019”</pre><pre>}</pre><p>It pulls the necessary images when we execute konvoy command first time right after its installation.</p><p><strong>Host Prerequisites.</strong></p><p>Konvoy brings up the Kubernetes cluster on Centos. Therefore the virtual machines for K8s master and nodes should be brought up with Centos 7.</p><p>On all the hosts, <em>swap</em> and <em>firewalld</em> should be disabled.</p><p><strong>Disabling swap.</strong></p><p>Swap space can be disabled on those by running the following command.</p><pre>swapoff -a</pre><p>Swap space can be permanently disabled by commenting out the swap line in <em>`/etc/fstab`</em> file.</p><p><strong>Disabling firewalld.</strong></p><p>To disable firewalld, run the following command as root user.</p><pre>systemctl disable firewalld</pre><pre>[root@dev1-d2iq-master@mayalabs ~]# systemctl disable firewalld</pre><pre>Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.</pre><pre>Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.</pre><p>Make sure that the above operations be performed on all the hosts which form the Kubernetes cluster.</p><p>Ensure the connectivity between deployer host and the Kubernetes host machines are enabled thereby it can do ssh to each host machine.</p><p><strong>Setting up the Cluster</strong></p><p>Follow the below steps to create Kubernetes cluster in the deployer host.</p><ul><li>Create a directory where the skeleton for inventory file will be generated.</li></ul><pre>mkdir dev1-d2iq</pre><pre>cd dev1-d2iq</pre><ul><li>Execute the below command to initialize Konvoy in the above directory.</li></ul><pre>[root@konvoydeployer dev1-d2iq]# konvoy init — provisioner=none</pre><pre>Created configuration file successfully!</pre><p>As a result of above command execution, two files named `cluster.yml` and `inventory.yml` would be generated.</p><ul><li>Update the `inventory.yml` file with the master and worker node details as follows:</li></ul><pre>[root@konvoydeployer dev1-d2iq]# cat inventory.yaml</pre><pre>control-plane:</pre><pre>hosts:</pre><pre>10.34.1.110:</pre><pre>node:</pre><pre>hosts:</pre><pre>10.34.1.111:</pre><pre>node_pool: “worker”</pre><pre>10.34.1.112:</pre><pre>node_pool: “worker”</pre><pre>10.34.1.113:</pre><pre>node_pool: “worker”</pre><pre>10.34.1.114:</pre><pre>node_pool: “worker”</pre><pre>all:</pre><pre>vars:</pre><pre>ansible_port: 22</pre><pre>ansible_user: “root”</pre><pre>order: sorted</pre><ol><li>The default control plane load balancer for Konvoy is based on Keepalived. Update a virtual IP address in the same subnet of host machines and deployer host under <em>`spec.kubernetes.controlplane.controlPlaneEndpointOverride`.</em> Here, I use the IP address 10.34.1.109 which is reachable to all the hosts.</li><li>You can enable/disable the add-ons by editing addons list in `cluster.yaml` file.</li><li>The default load balancer service for addons is based on MetalLB.To use MetalLB for addon load balancing, Identify a range of virtual IP addresses from your networking infrastructure and update under metallb addon as follows:</li></ol><pre>- name: metallb</pre><pre>enabled: true</pre><pre>values: |-</pre><pre>configInline:</pre><pre>address-pools:</pre><pre>- name: default</pre><pre>protocol: layer2</pre><pre>addresses:</pre><pre>- 10.x.x.x–10.x.x.x</pre><ol><li>Enable passwordless ssh connectivity from deployer host to all the kubernetes hosts(Both Master and worker nodes).</li><li>After updating configuration in cluster.yaml file, run the Konvoy pre-flight checks to ensure that your on-premise environment has everything ready for installing Konvoy. Make sure that you run the below command from the directory where you have `cluster.yaml` and `inventory.yaml` files.</li></ol><pre>konvoy check preflight</pre><ul><li>Finally deploy the cluster by running following command.</li></ul><pre>konvoy up</pre><p>It will take upto 15 minutes to bootstrap the cluster along with selected add-on services.</p><p>After successful deployment, a file `admin.conf` will be generated in the same directory where we initiated installation. This is the kubeconfig file which can be used to access the cluster.</p><p>Once it is successfully bootstrapped, You can check the cluster status by running</p><pre>giri@rack2:~/.kube$ kubectl cluster-info</pre><pre>Kubernetes master is running at <a href="https://10.34.1.109:6443/">https://10.34.x.x:6443</a></pre><pre>KubeDNS is running at <a href="https://10.34.1.109:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy">https://10.34.x.x:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy</a></pre><pre>kubernetes-dashboard is running at <a href="https://10.34.1.109:6443/api/v1/namespaces/kube-system/services/kubernetes-dashboard:http/proxy">https://10.34.x.x:6443/api/v1/namespaces/kube-system/services/kubernetes-dashboard:http/proxy</a></pre><p>To further debug and diagnose cluster problems, use `kubectl cluster-info dump`</p><p>Check the node status by running the following command.</p><pre>giri@rack2:~/.kube$ kubectl get nodes</pre><pre>NAME STATUS ROLES AGE VERSION</pre><pre>dev1-d21q-node2.mayalabs.io Ready &lt;none&gt; 27m v1.15.0</pre><pre>dev1-d2iq-master.mayalabs.io Ready master 28m v1.15.0</pre><pre>dev1-d2iq-node1.mayalabs.io Ready &lt;none&gt; 27m v1.15.0</pre><pre>dev1-d2iq-node3.mayalabs.io Ready &lt;none&gt; 27m v1.15.0</pre><pre>dev1-d2iq-node4.mayalabs.io Ready &lt;none&gt; 27m v1.15.0</pre><p><strong>Deploy OpenEBS</strong></p><p>OpenEBS enables persistent volume provisioning for the workloads in Kubernetes cluster through its various storage engines such as jiva, cStor and localPV.</p><p>To deploy OpenEBS, run the following command.</p><pre>kubectl apply -f <a href="https://openebs.github.io/charts/openebs-operator-1.3.0.yaml">https://openebs.github.io/charts/openebs-operator-1.6.0.yaml</a></pre><p>Check if the OpenEBS components are installed successfully through below command.</p><pre>kubectl get pods -n openebs</pre><p>You can use any of the storage engines provided by OpenEBS to provision volumes dynamically for your stateful workloads.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af4a2551d8ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Kubernetes cluster using kubeadm in vSphere virtual machines.]]></title>
            <link>https://gprasath.medium.com/setup-kubernetes-cluster-using-kubeadm-in-vsphere-virtual-machines-985372ee5b97?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/985372ee5b97</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubeadm]]></category>
            <category><![CDATA[k8s]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 10:00:29 GMT</pubDate>
            <atom:updated>2020-01-27T10:06:17.178Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this article, let me walkthrough my experience in setting up a Kubernetes cluster on the virtual machines created on VMware vSphere virtual machines.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*-4Ne6TRFZKqrupTSB4UXUQ.jpeg" /></figure><h4>Create Virtual Machines.</h4><p>Let us create the required number of virtual machines for setting up cluster using the preferred operating system. Here, I am going with Ubuntu-18.04.3. I have planned to setup a cluster using single control plane(master) and three worker nodes.</p><p>Each node should be equipped with at least 2GB memory, 20GB disk space and 2vCPUs. To make the disk space usage optimal in VMware, enable thin provisioning while creating virtual disk.</p><p>Let us customise the virtual machines with the preferred configuration and start booting through ISO. Once the virtual machines are created successfully, go ahead with the below steps to configure a Kubernetes cluster.</p><h4>Setup Networking</h4><p>Based on your networking solution, configure network settings in the virtual machines. Ensure that all the machines are connected to each other.</p><h4>Setup hostname(Optional)</h4><p>Setup meaningful hostname in all the nodes if necessary.</p><pre>sudo hostnamectl set-hostname &lt;hostname&gt;</pre><p>Reboot the machine to make the change effective.</p><h4>Enable ssh on the machines</h4><p>If ssh is not configured, install openssh-server on the virtual machines and enable connectivity between them.</p><pre>sudo apt-get install openssh-server -y</pre><h4>Disable swap on the virtual machines.</h4><p>As a super user, disable swap on all the machines. Execute the below command to disable <em>swap </em>on the machines.</p><pre>swapoff -a</pre><p>In order to disable <em>swap</em> permanently , comment out <em>swap</em> entry in /etc/fstabfile.</p><p>This can be verified using the following command.</p><pre>root@host1:~# free -h<br>              total        used        free      shared  buff/cache   available<br>Mem:           7.8G        990M        6.0G         13M        797M        6.6G<br>Swap:          2.0G          0B        2.0G</pre><p>Note: This has to be done on all the machines.</p><h4>Install necessary Packages</h4><p>Let us install curl and `apt-transport-https` in all the machines.</p><pre>sudo apt-get update &amp;&amp; sudo apt-get install -y apt-transport-https curl</pre><p>Obtain the Key for the kubernetes repository and add it to your local key-manager by executing the below command.</p><pre>root@host1:~# curl -s <a href="https://packages.cloud.google.com/apt/doc/apt-key.gpg">https://packages.cloud.google.com/apt/doc/apt-key.gpg</a> | sudo apt-key add -<br>OK</pre><p>After adding the above key, execute the below command to add the kubernetes repo to your local system.</p><pre>cat &lt;&lt;EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list<br>deb https://apt.kubernetes.io/ kubernetes-xenial main<br>EOF</pre><h4>kubeadm, kubectl and kubelet installation</h4><p>After adding the above install kubeadm, kubelet and kubectl in all the machines.</p><pre>sudo apt-get update</pre><pre>sudo apt-get install -y kubelet kubeadm kubectl</pre><p>After installing the above packages, let us hold them as it is in the machine by executing the following command.</p><pre>root@host1:~# sudo apt-mark hold kubelet kubeadm kubectl<br>kubelet set on hold.<br>kubeadm set on hold.<br>kubectl set on hold.</pre><h4>Install Container Runtime</h4><p>In each node, container runtime (CRI) component should be installed to manage the containers. In this setup, I will install the container runtime `docker` by executing the below command.</p><pre>sudo apt-get install docker.io -y</pre><h4>Install Control plane</h4><p>In the master node, execute kubeadm init command to deploy control plane components</p><pre>kubeadm init --pod-network-cidr=192.168.2.0/16</pre><p>When the above command execution is successful, it will yield a command to be executed on all the worker nodes to configure them with the master.</p><h4>Worker nodes.</h4><p>After configuring the master node successfully, configure the worker nodes by executing the <em>join </em>command displayed in master node.</p><pre>kubeadm join x.x.x.x:6443 --token &lt;token&gt;\<br>    --discovery-token-ca-cert-hash &lt;hash&gt;</pre><h4>Accessing Cluster</h4><p>You can communicate with the cluster components using kubectl interface. In order to communicate, you need kubernetes cluster config file to be placed in the home directory of the user from where you want to access the cluster. Once the cluster is created, a file named admin.conf will be generated in /etc/kubernetes directory. This file has to be copied to the home directory of target user.</p><p>Let us execute the below commands from the non-root user to access cluster from that respective user.</p><pre>mkdir -p $HOME/.kube<br>sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config<br>sudo chown <strong>$(</strong>id -u<strong>)</strong>:<strong>$(</strong>id -g<strong>)</strong> $HOME/.kube/config</pre><p>After setting up the kubeconfig file , check the node status. All the machines will be in not ready state.</p><pre>k8s@master:~$ kubectl get nodes<br>NAME          STATUS     ROLES    AGE     VERSION<br>master   NotReady   master   5m41s   v1.17.2<br>host1    NotReady   &lt;none&gt;   3m2s    v1.17.2<br>host2    NotReady   &lt;none&gt;   2m58s   v1.17.2<br>host3    NotReady   &lt;none&gt;   2m54s   v1.17.2</pre><p>And you can observe that coredns pod is not started.</p><pre>NAMESPACE     NAME                                  READY   STATUS    RESTARTS   AGE<br>kube-system   coredns-6955765f44-9nlw5              0/1     Pending   0          4m33s<br>kube-system   coredns-6955765f44-wjxj2              0/1     Pending   0          4m33s<br>kube-system   etcd-master                      1/1     Running   0          4m45s<br>kube-system   kube-apiserver-master            1/1     Running   0          4m45s<br>kube-system   kube-controller-manager-master   1/1     Running   0          4m45s<br>kube-system   kube-proxy-bzcbw                      1/1     Running   0          2m6s<br>kube-system   kube-proxy-clmpz                      1/1     Running   0          2m14s<br>kube-system   kube-proxy-crx5v                      1/1     Running   0          4m32s<br>kube-system   kube-proxy-xcmlv                      1/1     Running   0          2m10s<br>kube-system   kube-scheduler-master            1/1     Running   0          4m45s</pre><p>This will be resolved when you deploy network CNI plugin in the cluster. Here, I will deploy <em>calico</em> by executing the following command in the master node.</p><pre>kubectl apply -f <a href="https://docs.projectcalico.org/v3.8/manifests/calico.yaml">https://docs.projectcalico.org/v3.8/manifests/calico.yaml</a></pre><p>In next few minutes, your cluster will be created successfully. Check the node status and ensure the successful creation.</p><pre>k8s@master:~$ kubectl get nodes<br>NAME          STATUS   ROLES    AGE   VERSION<br>master   Ready    master   50m   v1.17.2<br>host1    Ready    &lt;none&gt;   47m   v1.17.2<br>host2    Ready    &lt;none&gt;   47m   v1.17.2<br>host3    Ready    &lt;none&gt;   47m   v1.17.2</pre><p>You can check the cluster state by executing the following command.</p><pre>k8s@master:~$ kubectl get pods --all-namespaces</pre><pre>NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE<br>default       abc1-b95b76d84-2qmhw                       1/1     Running   0          2m41s<br>kube-system   calico-kube-controllers-5c45f5bd9f-r9rxj   1/1     Running   0          4m59s<br>kube-system   calico-node-bd4tx                          1/1     Running   0          5m<br>kube-system   calico-node-lxk75                          1/1     Running   0          5m<br>kube-system   calico-node-zmnn4                          1/1     Running   0          5m<br>kube-system   calico-node-zzvhk                          1/1     Running   0          5m<br>kube-system   coredns-6955765f44-9nlw5                   1/1     Running   0          10m<br>kube-system   coredns-6955765f44-wjxj2                   1/1     Running   0          10m<br>kube-system   etcd-master                           1/1     Running   0          10m<br>kube-system   kube-apiserver-master                 1/1     Running   0          10m<br>kube-system   kube-controller-manager-master        1/1     Running   0          10m<br>kube-system   kube-proxy-bzcbw                           1/1     Running   0          8m19s<br>kube-system   kube-proxy-clmpz                           1/1     Running   0          8m27s<br>kube-system   kube-proxy-crx5v                           1/1     Running   0          10m<br>kube-system   kube-proxy-xcmlv                           1/1     Running   0          8m23s<br>kube-system   kube-scheduler-master                 1/1     Running   0          10m</pre><p>Now, the kubernetes cluster has been created successfully. You can verify this by setting up a deployment/pod.</p><pre>k8s@master:~$ kubectl create deploy nginx --image=nginx</pre><pre>deployment.apps/nginx created</pre><p>You can check the pod status by executing the below command.</p><pre>k8s@master:~$ kubectl get pods<br>NAME                     READY   STATUS    RESTARTS   AGE<br>nginx-86c57db685-rpzm2   1/1     Running   0          70s</pre><h4>Deleting cluster.</h4><p>Kubernetes cluster can be teared down by executing the below single command.</p><pre>sudo kubeadm reset</pre><p>Thus, a cluster can be deleted.</p><p><em>Happy learning…</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=985372ee5b97" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy K3s cluster on K3OS and use OpenEBS as persistent storage provisioner]]></title>
            <link>https://gprasath.medium.com/deploy-k3s-cluster-on-k3os-and-use-openebs-as-persistent-storage-provisioner-3db229c0acf8?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/3db229c0acf8</guid>
            <category><![CDATA[k3os]]></category>
            <category><![CDATA[k3]]></category>
            <category><![CDATA[openebs]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 07:44:05 GMT</pubDate>
            <atom:updated>2021-02-17T04:54:50.816Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy K3s cluster on K3OS with OpenEBS as persistent storage provider</h3><p>K3s is a lightweight ,easy to install Kubernetes distribution which is less resource intensive.</p><p>k3OS is a Linux distribution designed to remove as much as possible OS maintenance in a Kubernetes cluster. The goal of k3OS is to minimize the operating system overhead while running Kubernetes (k3s) cluster. k3OS Kernel is forked from <a href="https://www.ubuntu.com/">Ubuntu</a>, whereas the user-space binaries are derived from <a href="https://alpinelinux.org/">Alpine Linux</a>.</p><p>Both K3OS and K3s are developed by rancher labs.</p><h3>Installing K3OS</h3><p>K3OS can be installed on any hypervisor of your choice. Here, we cover the procedure for deploying K3OS on VMware Vsphere environment.</p><ul><li>Download K3OS ISO file from the latest <a href="https://github.com/rancher/k3os/releases">release</a> and create a virtual machine in VMware VSphere. Mount the ISO file into hypervisor and start a virtual machine.</li><li>Select <strong>Run k3OS LiveCD or Installation</strong> and press &lt;ENTER&gt;.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*OPjMqTBWQTx8VhI88hLlug.png" /><figcaption>Install K3OS</figcaption></figure><p>The system will boot-up and gives you the login prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*7Iq6PpU2SDDTRuBQdYnTeA.png" /><figcaption>K3OS login prompt</figcaption></figure><ul><li>Login as <strong>rancher</strong> user without providing password.</li><li>Set the password for <strong>rancher</strong> user to enable connectivity from other machines by running sudo passwd rancher</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*oJpDtoQEqRUAFePsWOa6Pw.png" /><figcaption>Set password for rancher user</figcaption></figure><ul><li>Now, we have to install K3OS into disk. This can be done by running the command sudo os-config</li><li>Choose the option 1.Install to disk . Answer the proceeding questions and provide rancher user’s password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/435/1*98MF3fH93hpYC75rcqargw.png" /><figcaption>Install K3Os to disk</figcaption></figure><ul><li>As part of above command execution, you can configure the host as either server or agent. Select 1.server to configure K3s master.</li><li>While configuring server, set cluster secret which would be used while joining nodes to the server. After successful installation and server reboot, check the cluster status.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*ejg-NgTifIyNLJWEO7dDWA.png" /><figcaption>Checking nodes</figcaption></figure><h4>Configure agent</h4><ul><li>Follow the above steps till installing K3OS into disk in all the hosts that you want to be part of K3s cluster.</li><li>To configure kubernetes agent with K3OS, select the option 2. agent while running sudo os-config command. You need to provide URL of server and secret configured previously.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*DHOdYO9ldM94Sj6OfMPWUA.png" /><figcaption>configure K3s agent</figcaption></figure><p>After performing this, k3s agent will be configured as follows and it will be added to the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*3usbxHHh-IujXfkHhZuecQ.png" /></figure><p>Check the cluster configuration by checking the nodes,</p><pre>k3os-32750 [~]$ kubectl get nodes<br>NAME         STATUS   ROLES    AGE     VERSION<br>k3os-14539   Ready    &lt;none&gt;   5m16s   v1.14.1-k3s.4<br>k3os-32750   Ready    &lt;none&gt;   49m     v1.14.1-k3s.4</pre><p>Now , you have setup the K3s kubernetes cluster with two nodes.</p><h4>Deploying OpenEBS</h4><p>OpenEBS is the most widely deployed and easy to use open source storage solution for Kubernetes.</p><p>Deploy OpenEBS by running the following command.</p><pre>k3os-32750 [~]$ kubectl apply -f <a href="https://openebs.github.io/charts/openebs-operator-1.1.0.yaml">https://openebs.github.io/charts/openebs-operator-1.1.0.yaml</a></pre><pre><br>namespace/openebs created<br>serviceaccount/openebs-maya-operator created<br>clusterrole.rbac.authorization.k8s.io/openebs-maya-operator created<br>clusterrolebinding.rbac.authorization.k8s.io/openebs-maya-operator created<br>deployment.apps/maya-apiserver created<br>service/maya-apiserver-service created<br>deployment.apps/openebs-provisioner created<br>deployment.apps/openebs-snapshot-operator created<br>configmap/openebs-ndm-config created<br>daemonset.extensions/openebs-ndm created<br>deployment.apps/openebs-ndm-operator created<br>secret/admission-server-certs created<br>service/admission-server-svc created<br>deployment.apps/openebs-admission-server created<br>validatingwebhookconfiguration.admissionregistration.k8s.io/validation-webhook-cfg created<br>deployment.apps/openebs-localpv-provisioner created</pre><p>Check the OpenEBS components by running the following command.</p><pre>k3os-32750 [~]$ kubectl get pods -n openebs<br>NAME                                           READY   STATUS              RESTARTS   AGE<br>maya-apiserver-78c966c446-zpvhh                1/1     Running             2          101s<br>openebs-admission-server-66f46564f5-8sz8c      1/1     Running             0          101s<br>openebs-localpv-provisioner-698496cf9b-wkf95   1/1     Running             0          101s<br>openebs-ndm-9kt4n                              0/1     ContainerCreating   0          101s<br>openebs-ndm-mxqcf                              0/1     ContainerCreating   0          101s<br>openebs-ndm-operator-7fb4894546-d2whz          1/1     Running             1          101s<br>openebs-provisioner-7f9c99cf9-9jlgc            1/1     Running             0          101s<br>openebs-snapshot-operator-79f7d56c7d-tk24k     2/2     Running             0          101s</pre><p>Note that openebs-ndmpods are not created successfully. This is due to the lack of udev support in K3OS.(<a href="https://github.com/openebs/openebs/issues/2686">https://github.com/openebs/openebs/issues/2686</a>)</p><p>But you can use OpenEBS local PV to serve your application needs.</p><p>By default, OpenEBS deployment ports a list of storage classes which can be used as example for creating new storage classes. Check the storage classes created as part of OpenEBS deployment by running the following command.</p><pre>k3os-32055 [~]$ kubectl get sc<br>NAME                        PROVISIONER                                                AGE<br>openebs-device              openebs.io/local                                           57m<br>openebs-hostpath            openebs.io/local                                           57m<br>openebs-jiva-default        openebs.io/provisioner-iscsi                               57m<br>openebs-snapshot-promoter   volumesnapshot.external-storage.k8s.io/snapshot-promoter   57m</pre><p>The storage class openebs-hostpath can be used to create local PV on the path /var/openebs/localin your kubernetes node. You can either use the above storage class to create volume or create a new storage class specifying different path in the node by following the doc(<a href="https://docs.openebs.io/1.0.0-RC1/docs/next/uglocalpv.html">https://docs.openebs.io/1.0.0-RC1/docs/next/uglocalpv.html</a>)</p><h4>Deploy an application using OpenEBS local PV.</h4><p>For illustration, let us deploy Cassandra statefulset application on K3s in such a way to consume OpenEBS local PV.</p><p>We can use openebs-hostpath storage class in cassandra-statefulset manifest and provision the volumes.</p><p>Download cassandra application manifest,</p><pre>wget <a href="https://raw.githubusercontent.com/openebs/openebs/master/k8s/demo/cassandra/cassandra-statefulset.yaml">https://raw.githubusercontent.com/openebs/openebs/master/k8s/demo/cassandra/cassandra-statefulset.yaml</a></pre><pre>wget <a href="https://raw.githubusercontent.com/openebs/openebs/master/k8s/demo/cassandra/cassandra-statefulset.yaml">https://raw.githubusercontent.com/openebs/openebs/master/k8s/demo/cassandra/cassandra-service.yaml</a></pre><p>Update storage class to openebs-hostpath and replica count in the above cassandra-statefulset manifest file.</p><p>Now, deploy application by running the following command.</p><pre>k3os-32750 [~]$ kubectl apply -f cassandra-service.yaml <br>service/cassandra created</pre><pre>k3os-32750 [~]$ kubectl apply -f cassandra-statefulset.yaml <br>statefulset.apps/cassandra created</pre><p>Check the application pods by running the following command.</p><pre>k3os-32750 [~]$ kubectl get pods<br>NAME          READY   STATUS    RESTARTS   AGE<br>cassandra-0   1/1     Running   0          6m16s<br>cassandra-1   1/1     Running   0          5m8s</pre><p>Check the status of OpenEBS persistent volumes by running the following command.</p><pre>k3os-32750 [~]$ kubectl get pv<br>NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                STORAGECLASS       REASON   AGE<br>pvc-36f1d3d3-cf9b-11e9-bbd8-000c29b74861   5G         RWO            Delete           Bound    default/cassandra-data-cassandra-1   openebs-hostpath            8m43s<br>pvc-dbbcc44f-cf99-11e9-bbd8-000c29b74861   5G         RWO            Delete           Bound    default/cassandra-data-cassandra-0   openebs-hostpath            18m</pre><pre><br>k3os-32750 [~]$ kubectl get pvc<br>NAME                         STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE<br>cassandra-data-cassandra-0   Bound    pvc-dbbcc44f-cf99-11e9-bbd8-000c29b74861   5G         RWO            openebs-hostpath   18m<br>cassandra-data-cassandra-1   Bound    pvc-36f1d3d3-cf9b-11e9-bbd8-000c29b74861   5G         RWO            openebs-hostpath   8m54s</pre><p>OpenEBS local PV will not be bound until the application pod is scheduled as its <strong>volumeBindingMode</strong> is set to <strong>WaitForFirstConsumer. </strong>Once the application pod is scheduled on a certain node, OpenEBS local persistent volume will be bound on that node.</p><p>Thus, we can install K3s and utilize OpenEBS as storage provisioner for stateful applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3db229c0acf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Litmus for building CI pipelines for Cassandra when using OpenEBS]]></title>
            <link>https://medium.com/mayadata/using-litmus-for-building-ci-pipelines-for-cassandra-when-using-openebs-18efbdb15908?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/18efbdb15908</guid>
            <category><![CDATA[openebs]]></category>
            <category><![CDATA[cassandra]]></category>
            <category><![CDATA[chaos-engineering]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[litmus]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Wed, 22 May 2019 10:53:56 GMT</pubDate>
            <atom:updated>2019-06-27T15:49:13.019Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KepUFA4-157zKHpqzs7auA.png" /><figcaption>Chaos Engineering for Cassandra on Kubernetes using Litmus</figcaption></figure><p>“Litmus is a chaos engineering tool for Kubernetes. Litmus provides easy-to-use, readymade pipeline jobs that can be used to build a pipeline to help harden the applications that use Cassandra. Litmus helps in validating the functionality of Cassandra, OpenEBS, and Kubernetes itself.”</p><p>In this blog, I will describe some of the Litmus jobs in details which are related to Cassandra. Before, that a bit of recap on Cassandra, OpenEBS and Litmus itself.</p><p><strong>Apache Cassandra</strong> is an open-source, NoSQL, highly scalable, high-performance distributed database management system designed to handle an enormous amount of structured data across commodity servers.</p><p><strong>OpenEBS </strong>is an open-source <a href="https://www.cncf.io/sandbox-projects/">CNCF Sandbox</a> project for container-attached and container-native storage on Kubernetes. OpenEBS adopts Container Attached Storage (CAS) approach, where each workload is provided with a dedicated storage controller.</p><p><strong>Why use OpenEBS for Cassandra HA?</strong></p><p><a href="https://openebsblog.mayadata.io/using-litmus-to-build-ci-pipelines-for-cassandra-when-using-openebs">Continue Reading the article in MayaData’s Blog</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18efbdb15908" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mayadata/using-litmus-for-building-ci-pipelines-for-cassandra-when-using-openebs-18efbdb15908">Using Litmus for building CI pipelines for Cassandra when using OpenEBS</a> was originally published in <a href="https://medium.com/mayadata">MayaData</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using OpenEBS by Cassandra on OpenShift]]></title>
            <link>https://gprasath.medium.com/using-openebs-by-cassandra-on-openshift-d24a7bf5b19a?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/d24a7bf5b19a</guid>
            <category><![CDATA[openebs]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cassandra]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Tue, 07 May 2019 02:05:05 GMT</pubDate>
            <atom:updated>2019-05-07T03:16:09.838Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Cassandra on OpenEBS in OpenShift</strong></h3><p><strong>Cassandra:</strong></p><p><strong>Apache Cassandra</strong> is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure</p><p><strong>OpenEBS:</strong></p><p><strong>OpenEBS</strong> is the leading open-source project for container-attached and container-native storage on Kubernetes. OpenEBS adopts Container Attached Storage (CAS) approach, where each workload is provided with a dedicated storage controller. OpenEBS implements granular storage policies and isolation that enable users to optimize storage for each specific workload.</p><p><strong>OpenShift:</strong></p><p><strong>Red Hat OpenShift</strong> is a multifaceted, open source container application platform from Red Hat Inc. for the development, deployment and management of applications.</p><p><strong>Deploying Cassandra on OpenEBS:</strong></p><p><strong>Pre-requisites:</strong></p><p><strong>Storage pool:</strong></p><p>OpenEBS provisions persistent volumes for containerized applications in its storage pool. The disks attached in a cluster can be obtained through the following command.</p><pre>[root@master deployers]# oc get disks</pre><pre>NAME AGE</pre><pre>disk-0cfccca1c2b46241890953a725d6e5bd 80d</pre><pre>disk-0e570c2917f88f553460bfed72c33c5a 19d</pre><pre>disk-17f034148a30ef9ae2557cffda9ae869 20d</pre><pre>disk-2cb335326e30192286ce250a7e9562b8 80d</pre><pre>disk-42157bb4ec1762a13324453f57359964 81d</pre><pre>disk-42b4fb20cd36896dfc2a486b977363de 82d</pre><pre>disk-5ebe0072a9e937b28315006adf648dc2 82d</pre><pre>disk-5ffac6eccd389ed98a48e4ab3327e7e9 81d</pre><pre>disk-619def6e7b3147a7a57e9e31d71f2906 80d</pre><pre>disk-61efde57f8c657e83f23a3adbacfb08c 80d</pre><p>You can use above disks to create storage pool of different types using following manifest. Create <em>cstor-spc.yml</em> using the below manifest and populate the required disks under diskList spec.</p><pre>---</pre><pre>apiVersion: openebs.io/v1alpha1</pre><pre>kind: StoragePoolClaim</pre><pre>metadata:</pre><pre>name: cstor-pool</pre><pre>annotations:</pre><pre>cas.openebs.io/config: |</pre><pre>- name: PoolResourceRequests</pre><pre>value: |-</pre><pre>memory: 1Gi</pre><pre>cpu: 100m</pre><pre>- name: PoolResourceLimits</pre><pre>value: |-</pre><pre>memory: 4Gi</pre><pre>- name: AuxResourceLimits</pre><pre>value: |-</pre><pre>memory: 0.5Gi</pre><pre>cpu: 50m</pre><pre>spec:</pre><pre>name: cstor-pool</pre><pre>type: disk</pre><pre>maxPools: 5</pre><pre>poolSpec:</pre><pre>poolType: striped</pre><pre>cacheFile: /tmp/pool2.cache</pre><pre>overProvisioning: false</pre><pre>disks:</pre><pre>diskList:</pre><pre>- disk-0cfccca1c2b46241890953a725d6e5bd</pre><pre>- disk-2cb335326e30192286ce250a7e9562b8</pre><pre>- disk-619def6e7b3147a7a57e9e31d71f2906</pre><pre>- disk-61efde57f8c657e83f23a3adbacfb08c</pre><pre>- disk-99127001e6b6bc190b5169e42ebecad7</pre><p>Apply the above manifest after updating disk details.</p><pre>oc apply -f cstor-spc.yml</pre><p>To use OpenEBS Storage by an application, a storage class should have been created in the K8s cluster updated with its provisioner and storage pool.</p><p>Create a storage class template <em>storage-class.yml</em> using the following configuration.</p><pre>---</pre><pre>apiVersion: storage.k8s.io/v1</pre><pre>kind: StorageClass</pre><pre>metadata:</pre><pre>name: cstor-pool</pre><pre>annotations:</pre><pre>openebs.io/cas-type: cstor</pre><pre>cas.openebs.io/config: |</pre><pre>- name: StoragePoolClaim</pre><pre>value: “cstor-pool”</pre><pre>- name: ReplicaCount</pre><pre>value: “1”</pre><pre>provisioner: openebs.io/provisioner-iscsi</pre><p>Update the desired storage pool under StoragePoolClaim in above configuration and apply it to create storage class.</p><pre>oc apply -f storage-class.yml</pre><p><strong>Cassandra deployment:</strong></p><p>Lets deploy Cassandra as Kubernetes Statefulset. A statefulset in Kubernetes requires a headless service to provide network access to the pods it creates.</p><p>Create such headless service using the following manifest.</p><pre>---</pre><pre>apiVersion: v1</pre><pre>kind: Service</pre><pre>metadata:</pre><pre>labels:</pre><pre>app: cassandra</pre><pre>name: cassandra</pre><pre>spec:</pre><pre>clusterIP: None</pre><pre>ports:</pre><pre>- port: 9042</pre><pre>selector:</pre><pre>app: cassandra</pre><p>Apply the above manifest to create headless service.</p><pre>oc apply -f cassandra-service.yml</pre><p>Create <em>cassandra-statefulset.yml</em> as shown below which can create a Statefulset for Cassandra with three replicas.</p><pre>---<br>apiVersion: apps/v1beta1</pre><pre>kind: StatefulSet</pre><pre>metadata:</pre><pre>name: cassandra</pre><pre>labels:</pre><pre>app: cassandra</pre><pre>spec:</pre><pre>serviceName: cassandra</pre><pre>replicas: 3</pre><pre>selector:</pre><pre>matchLabels:</pre><pre>app: cassandra</pre><pre>template:</pre><pre>metadata:</pre><pre>labels:</pre><pre>app: cassandra</pre><pre>spec:</pre><pre>containers:</pre><pre>- name: cassandra</pre><pre>image: gcr.io/google-samples/cassandra:v11</pre><pre>imagePullPolicy: Always</pre><pre>ports:</pre><pre>- containerPort: 7000</pre><pre>name: intra-node</pre><pre>- containerPort: 7001</pre><pre>name: tls-intra-node</pre><pre>- containerPort: 7199</pre><pre>name: jmx</pre><pre>- containerPort: 9042</pre><pre>name: cql</pre><pre>resources:</pre><pre>limits:</pre><pre>cpu: “500m”</pre><pre>memory: 1Gi</pre><pre>requests:</pre><pre>cpu: “500m”</pre><pre>memory: 1Gi</pre><pre>securityContext:</pre><pre>capabilities:</pre><pre>add:</pre><pre>- IPC_LOCK</pre><pre>lifecycle:</pre><pre>preStop:</pre><pre>exec:</pre><pre>command: [“/bin/sh”, “-c”, “PID=$(pidof java) &amp;&amp; kill $PID &amp;&amp; while ps -p $PID &gt; /dev/null; do sleep 1; done”]</pre><pre>env:</pre><pre>- name: MAX_HEAP_SIZE</pre><pre>value: 512M</pre><pre>- name: HEAP_NEWSIZE</pre><pre>value: 100M</pre><pre>- name: CASSANDRA_SEEDS</pre><pre>value: “cassandra-0.cassandra.cassandra-cstor.svc.cluster.local”</pre><pre>- name: CASSANDRA_CLUSTER_NAME</pre><pre>value: “K8Demo”</pre><pre>- name: CASSANDRA_DC</pre><pre>value: “DC1-K8Demo”</pre><pre>- name: CASSANDRA_RACK</pre><pre>value: “Rack1-K8Demo”</pre><pre>- name: CASSANDRA_AUTO_BOOTSTRAP</pre><pre>value: “false”</pre><pre>- name: POD_IP</pre><pre>valueFrom:</pre><pre>fieldRef:</pre><pre>fieldPath: status.podIP</pre><pre>readinessProbe:</pre><pre>exec:</pre><pre>command:</pre><pre>- /bin/bash</pre><pre>- -c</pre><pre>- /ready-probe.sh</pre><pre>initialDelaySeconds: 15</pre><pre>timeoutSeconds: 5</pre><pre>volumeMounts:</pre><pre>- name: cassandra-claim</pre><pre>mountPath: /cassandra_data</pre><pre>volumeClaimTemplates:</pre><pre>- metadata:</pre><pre>name: cassandra-claim</pre><pre>annotations:</pre><pre>volume.beta.kubernetes.io/storage-class: cstor-sc</pre><pre>spec:</pre><pre>accessModes: [ “ReadWriteOnce” ]</pre><pre>resources:</pre><pre>requests:</pre><pre>storage: 5G</pre><p>Make sure to update the storage class, namespace and volume claim name in the above configuration before applying it.</p><p>Apply the above configuration to create cassandra ring.</p><pre>oc apply -f cassandra-statefulset.yml -n &lt;namespace&gt;</pre><p>You can check the statefulset status through following command.</p><pre>[root@master deployers]# oc get sts</pre><pre>NAME DESIRED CURRENT AGE</pre><pre>cassandra 3 3 3h</pre><p>Ensure that the PVC is bound to a volume through following command.</p><pre>oc get pvc -n &lt;namespace&gt;</pre><pre>NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE</pre><pre>cassandra-claim-cassandra-0 Bound pvc-c0d14696–6fd8–11e9–8a2a-0050569331ce 5G RWO cstor-sc 3h</pre><pre>cassandra-claim-cassandra-1 Bound pvc-1c040419–6fd9–11e9–8a2a-0050569331ce 5G RWO cstor-sc 3h</pre><pre>cassandra-claim-cassandra-2 Bound pvc-969bc0a9–6fd9–11e9–8a2a-0050569331ce 5G RWO cstor-sc 3h</pre><p>Ensure that the cassandra cluster is created using <em>nodetool status</em> command.</p><pre>root@cassandra-2:/var/lib/cassandra# nodetool status</pre><pre>Datacenter: DC1-K8Demo</pre><pre>======================</pre><pre>Status=Up/Down</pre><pre>|/ State=Normal/Leaving/Joining/Moving</pre><pre>— Address Load Tokens Owns (effective) Host ID Rack</pre><pre>UN 192.30.5.71 166.93 KiB 32 60.8% 93b884e0-fb26–4ef3–903c-782cdde6bf74 Rack1-K8Demo</pre><pre>UN 192.28.6.145 129.61 KiB 32 64.0% 1b7d60d2–7cbb-4445–8bcb-3389c0c7b0e4 Rack1-K8Demo</pre><pre>UN 192.29.6.160 107.04 KiB 32 75.3% 7d37c2e5–1929–4d01-a164-ef243a575ae3 Rack1-K8Demo</pre><h4><strong>Write sample data:</strong></h4><pre>kubectl exec -it cassandra-0 -- bash<br>root@cassandra-0:/# cqlsh<br><br>Connected to K8Demo at 127.0.0.1:9042.<br>[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]<br>Use HELP for help.<br><br>cqlsh&gt; CREATE KEYSPACE openebsdb WITH REPLICATION = { &#39;class&#39; : &#39;SimpleStrategy&#39;, &#39;replication_factor&#39; : 2 };<br>cqlsh&gt; use openebsdb;<br>cqlsh:openebsdb&gt; CREATE TABLE emp(emp_id int PRIMARY KEY, emp_name text, emp_city text, emp_sal varint,emp_phone varint);<br>cqlsh:demodb&gt; INSERT INTO emp (emp_id, emp_name, emp_city, emp_phone) VALUES(42,&#39;giri&#39;, &#39;blr&#39;, &#39;3278362832&#39;)</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d24a7bf5b19a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy DataStax Enterprise consuming OpenEBS Persistent volumes using Litmus in OpenShift Cluster]]></title>
            <link>https://gprasath.medium.com/deploy-datastax-enterprise-consuming-openebs-persistent-volumes-using-litmus-in-openshift-cluster-d4221994d9da?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4221994d9da</guid>
            <category><![CDATA[openebs]]></category>
            <category><![CDATA[cassandra]]></category>
            <category><![CDATA[litmus]]></category>
            <category><![CDATA[datastax]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Tue, 16 Apr 2019 10:38:02 GMT</pubDate>
            <atom:updated>2020-09-05T03:35:46.331Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to deploy DataStax Enterprise on OpenEBS storage and use litmus for chaos Engineering.</h3><p><strong>DataStax Enterprise</strong> is based on <strong>Apache Cassandra</strong>, was designed to solve the problems of scale and replication by embracing a masterless architecture that scales linearly on commodity servers. The application can read or write to any node in the cluster and no single point of failure exists.</p><p><strong>OpenEBS</strong> is an open-source project for container-attached and container-native storage on Kubernetes. It implements granular storage policies and isolation that enable users to optimize storage for each specific workload.</p><p><strong>Litmus</strong> is a framework capable of performing e2e testing and chaos engineering for Kubernetes, focusing on stateful workloads. The primary objective of Litmus is to ensure consistent and reliable behaviour of Kubernetes objects for various persistent workloads and to catch <em>hard-to-find</em> or <em>unacceptable issues</em>. It provides “Litmus experiments” or “Chaos experiments” which are essentially Kubernetes jobs running test containers. Litmus can inject chaos into the specified K8s object and observe the impact and behavior.</p><p>In this blog, we can see how Litmus can be used to deploy DSE in OpenShift Cluster consuming OpenEBS Persistent volumes.</p><h4>Pre-requisites</h4><ul><li>Litmus framework has to be configured in the target cluster. It can be set up by following the steps provided in this <a href="https://docs.litmuschaos.io/docs/1.5.0/getstarted/">document.</a></li><li>Create a namespace for running DataStax components.</li></ul><pre><strong>oc create ns app-datastax</strong></pre><ul><li>Run the following command to allow security context to the pods in the above application namespace.</li></ul><pre><strong>oc adm policy add-scc-to-user anyuid system:serviceaccount:app-datastax:default</strong></pre><ul><li>Ensure that the OpenEBS cStor Storage pool has been created. If not, use the below claim template to create the pool.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/72826d99b1e71b88cade81b7339d240a/href">https://medium.com/media/72826d99b1e71b88cade81b7339d240a/href</a></iframe><p>Populate the above template with your requirement and apply this YAML to create Storage Pool.</p><ul><li>The next step is to create OpenEBS Storage class using above storage pool. Users can use the below manifest to create storage class.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccb85bdb268288c0063ab98ee3f71769/href">https://medium.com/media/ccb85bdb268288c0063ab98ee3f71769/href</a></iframe><p>Populate the above template with storage class name and storage pool name. Then, apply the manifest to create the desired storage class.</p><h4>Deploying DSE using Litmus and OpenEBS</h4><p>The <em>Litmus-experiment </em>for deploying DataStax Enterprise is as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f33a6ea6157ee3ae149822525d036442/href">https://medium.com/media/f33a6ea6157ee3ae149822525d036442/href</a></iframe><p>The User can modify environmental variables in the above litmus experiment based on their requirements.</p><p>To install DSE, create litmus job using the above manifest,</p><pre><strong><em>oc create -f run_litmus_test.yml</em></strong></pre><pre>job.batch &quot;litmus-datastax-hxfwn&quot; created</pre><p>It used to take some time to complete the configuration. This litmus experiment is capable of installing both DSE and OpsCenter components.</p><p>Once deployed successfully, You can list objects using the below command.</p><pre><strong>&gt; oc get pods -n &lt;namespace&gt;</strong><br>NAME                         READY     STATUS    RESTARTS   AGE<br>dse-0                        1/1       Running   0          2h<br>dse-1                        1/1       Running   0          2h<br>dse-2                        1/1       Running   0          2h<br>opscenter-0                  1/1       Running   0          2h</pre><p>The services created by above litmus experiment can be viewed through the following command.</p><pre>&gt; <strong>oc get svc</strong><br>NAME               TYPE           CLUSTER-IP       EXTERNAL-IP                 PORT(S)                       AGE<br>dse                ClusterIP      None                &lt;none&gt;                      9042/TCP                      2h<br>opscenter          ClusterIP      None                &lt;none&gt;                      8888/TCP,8443/TCP,61620/TCP   2h<br>opscenter-ext-lb   LoadBalancer   172.24.216.201   172.29.250.2,172.29.250.2   8443:31793/TCP                2h</pre><p>Now you are set to use DataStax Enterprise.</p><p>User can create OpenShift route to access OpsCenter externally.</p><pre><strong>oc expose service/&lt;serviceName&gt; --hostname=&lt;domainName&gt; -n &lt;nameSpace&gt;</strong></pre><p>Generate the certificate using the following command,</p><pre><strong>sudo certbot --nginx -d &lt;domainName&gt; -d &lt;domainName&gt;</strong></pre><p>This will create the certificates in the following directory,</p><p><em>/etc/letsencrypt/live/&lt;domainName&gt;</em></p><p>Add the certificates to the route of the application through OpenShift web console.</p><p>Finally, you can access the OpsCenter console through the domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*srzYv58FZRbH14ujYQ3l0Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4221994d9da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing Helm in Kubernetes cluster and its usage]]></title>
            <link>https://gprasath.medium.com/installing-helm-in-k8s-cluster-and-its-usage-8071aba156a1?source=rss-e5983f07b5ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8071aba156a1</guid>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Giridharaprasad]]></dc:creator>
            <pubDate>Wed, 27 Jun 2018 07:06:21 GMT</pubDate>
            <atom:updated>2018-06-29T07:38:38.474Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Installing Helm in Kubernetes cluster and its usage</strong></p><p>Pre-requisites:</p><ul><li>Bring up a k8s cluster.</li><li>Make sure that all the nodes are ready.</li></ul><p>There are two parts to Helm: The Helm client (helm) and the Helm server (Tiller). Helm now has an installer script that will automatically fetchthe latest version of the Helm client and <a href="https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get">install it locally</a>.</p><p>You can fetch that script, and then execute it locally,</p><pre>$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get &gt; get_helm.sh<br>$ chmod 700 get_helm.sh<br>$ ./get_helm.sh</pre><p>Helm client would be installed as part of above execution. In order to install tiller, do</p><pre>$ helm init</pre><pre>ubuntu@kubemaster-01:~$ helm init<br>Creating /home/ubuntu/.helm <br>Creating /home/ubuntu/.helm/repository <br>Creating /home/ubuntu/.helm/repository/cache <br>Creating /home/ubuntu/.helm/repository/local <br>Creating /home/ubuntu/.helm/plugins <br>Creating /home/ubuntu/.helm/starters <br>Creating /home/ubuntu/.helm/cache/archive <br>Creating /home/ubuntu/.helm/repository/repositories.yaml <br>Adding stable repo with URL: <a href="https://kubernetes-charts.storage.googleapis.com/">https://kubernetes-charts.storage.googleapis.com</a> <br>Adding local repo with URL: <a href="http://127.0.0.1:8879/charts">http://127.0.0.1:8879/charts</a> <br>$HELM_HOME has been configured at /home/ubuntu/.helm.</pre><pre>Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.</pre><pre>Please note: by default, Tiller is deployed with an insecure &#39;allow unauthenticated users&#39; policy.<br>For more information on securing your installation see: <a href="https://docs.helm.sh/using_helm/#securing-your-helm-installation">https://docs.helm.sh/using_helm/#securing-your-helm-installation</a><br>Happy Helming!</pre><p>To ensure the successful deployment, check if the tiller pod is running in kube-system namespace,</p><pre>ubuntu@kubemaster-01:~$ kubectl get pods -n kube-system | grep tiller<br>tiller-deploy-f9b8476d-vgfvr            1/1       Running   0          3m</pre><p>Check the versions of both client and server through the following command.</p><pre>ubuntu@kubemaster-01:~$ helm version<br>Client: &amp;version.Version{SemVer:&quot;v2.9.1&quot;, GitCommit:&quot;20adb27c7c5868466912eebdf6664e7390ebe710&quot;, GitTreeState:&quot;clean&quot;}<br>Server: &amp;version.Version{SemVer:&quot;v2.9.1&quot;, GitCommit:&quot;20adb27c7c5868466912eebdf6664e7390ebe710&quot;, GitTreeState:&quot;clean&quot;}</pre><p><strong>HELM USAGE:</strong></p><p>There are three concepts of helm:</p><ul><li>Chart</li><li>Repository</li><li>Release</li></ul><p>A <em>Chart</em> is a Helm package. It contains all of the resource definitions necessary to run an application, tool, or service inside of a Kubernetes cluster. Think of it like the Kubernetes equivalent of a Homebrew formula, an Apt dpkg, or a Yum RPM file.</p><p>A <em>Repository</em> is the place where charts can be collected and shared.</p><p>A <em>Release</em> is an instance of a chart running in a Kubernetes cluster. One chart can often be installed many times into the same cluster. And each time it is installed, a new <em>release</em> is created. Consider a MySQL chart. If you want two databases running in your cluster, you can install that chart twice. Each one will have its own <em>release</em>, which will in turn have its own <em>release name</em>.</p><p>You can find the charts using,</p><pre>helm search &lt;relevant string for chart&gt; </pre><pre>For example:</pre><pre>ubuntu@kubemaster-01:~$ helm search openebs<br>NAME           CHART VERSION APP VERSION DESCRIPTION                         <br>stable/openebs 0.5.5         0.5.3       Containerized Storage for Containers</pre><p>Use ```helm inspect``` command to view the chart description and the default values associated with the chart.</p><pre>ubuntu@kubemaster-01:~$ helm inspect stable/openebs<br>apiVersion: v1<br>appVersion: 0.5.3<br>description: Containerized Storage for Containers<br>home: <a href="http://www.openebs.io/">http://www.openebs.io/</a><br>icon: <a href="https://raw.githubusercontent.com/openebs/chitrakala/master/OpenEBS%20logo/openebs%20logos-03.png">https://raw.githubusercontent.com/openebs/chitrakala/master/OpenEBS%20logo/openebs%20logos-03.png</a><br>keywords:<br>- cloud-native-storage<br>- block-storage<br>- iSCSI<br>- storage<br>maintainers:<br>- email: <a href="/service/mailto:kiran.mova@openebs.io">kiran.mova@openebs.io</a><br>  name: kmova<br>name: openebs<br>sources:<br>- <a href="https://github.com/openebs/openebs">https://github.com/openebs/openebs</a><br>version: 0.5.5</pre><pre>---<br># Default values for openebs.<br># This is a YAML-formatted file.<br># Declare variables to be passed into your templates.</pre><pre>rbac:<br>  # Specifies whether RBAC resources should be created<br>  create: true</pre><pre>serviceAccount:<br>  create: true<br>  name:</pre><pre>image:<br>  pullPolicy: IfNotPresent</pre><pre>apiserver:<br>  image: &quot;openebs/m-apiserver&quot;<br>  imageTag: &quot;0.5.3&quot;<br>  replicas: 1<br>  ports:<br>    externalPort: 5656<br>    internalPort: 5656<br>  nodeSelector: {}<br>  tolerations: {}<br>  affinity: {}</pre><pre>provisioner:<br>  image: &quot;openebs/openebs-k8s-provisioner&quot;<br>  imageTag: &quot;0.5.3&quot;<br>  replicas: 1<br>  nodeSelector: {}<br>  tolerations: {}<br>  affinity: {}</pre><pre>jiva:<br>  image: &quot;openebs/jiva&quot;<br>  imageTag: &quot;0.5.3&quot;<br>  replicas: 3</pre><pre>policies:<br>  monitoring:<br>    enabled: true<br>    image: &quot;openebs/m-exporter&quot;<br>    imageTag: &quot;0.5.3&quot;</pre><pre>---<br>OpenEBS<br>=======</pre><pre>[OpenEBS](<a href="https://github.com/openebs/openebs">https://github.com/openebs/openebs</a>) is an open source storage platform that provides persistent and containerized block storage for DevOps and container environments.</pre><pre>OpenEBS can be deployed on any Kubernetes cluster - either in cloud, on-premise or developer laptop (minikube). OpenEBS itself is deployed as just another container on your cluster, and enables storage services that can be designated on a per pod, application, cluster or container level.</pre><pre>Introduction<br>------------</pre><pre>This chart bootstraps OpenEBS deployment on a [Kubernetes](<a href="http://kubernetes.io/">http://kubernetes.io</a>) cluster using the [Helm](<a href="https://helm.sh/">https://helm.sh</a>) package manager.</pre><pre>## Prerequisites<br>- Kubernetes 1.7.5+ with RBAC enabled<br>- iSCSI PV support in the underlying infrastructure</pre><pre>## Installing OpenEBS <br>```<br>helm install stable/openebs<br>```</pre><pre>## Installing OpenEBS with the release name `my-release`:<br>```<br>helm install --name `my-release` stable/openebs<br>```</pre><pre>## To uninstall/delete the `my-release` deployment:<br>```<br>helm ls --all<br>helm delete `my-release`<br>```</pre><pre>## Configuration</pre><pre>The following table lists the configurable parameters of the OpenEBS chart and their default values.</pre><pre>| Parameter                            | Description                                   | Default                           |<br>| ------------------------------------ | --------------------------------------------- | --------------------------------- |<br>| `rbac.create`                        | Enable RBAC Resources                         | `true`                            |<br>| `serviceAccount.create`              | Specify if Service Account should be created  | `true`                            |<br>| `serviceAccount.name`                | Specify the name of service account           | `openebs-maya-operator`           |<br>| `image.pullPolicy`                   | Container pull policy                         | `IfNotPresent`                    |<br>| `apiserver.image`                    | Docker Image for API Server                   | `openebs/m-apiserver`             |<br>| `apiserver.imageTag`                 | Docker Image Tag for API Server               | `0.5.3`                           |<br>| `apiserver.replicas`                 | Number of API Server Replicas                 | `1`                               |<br>| `provisioner.image`                  | Docker Image for Provisioner                  | `openebs/openebs-k8s-provisioner` |<br>| `provisioner.imageTag`               | Docker Image Tag for Provisioner              | `0.5.3`                           |<br>| `provisioner.replicas`               | Number of Provisioner Replicas                | `1`                               |<br>| `jiva.image`                         | Docker Image for Jiva                         | `openebs/jiva`                    |<br>| `jiva.imageTag`                      | Docker Image Tag for Jiva                     | `0.5.3`                           |<br>| `jiva.replicas`                      | Number of Jiva Replicas                       | `3`                               |</pre><pre>Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.</pre><pre>Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,</pre><pre>```shell<br>helm install --name `my-release` -f values.yaml stable/openebs<br>```</pre><pre>&gt; **Tip**: You can use the default [values.yaml](values.yaml)</pre><p>To install a new package, use the helm install command followed by the chart name.</p><pre>helm install &lt;chart name&gt;</pre><p>In case, if you want to change the default values use — set key=value argument in the installation command as follows:</p><pre>helm install stable/openebs --set apiserver.imageTag=ci --set provisioner.imageTag=ci --set jiva.imageTag=ci --namespace openebs</pre><p>You can also define the name for release by using the flag — name in the above command.</p><p>Note: The installation may take time according to the size of docker images used.</p><p>To view the releases, use the following command</p><pre>helm ls --all</pre><pre>ubuntu@kubemaster-01:~$ helm ls --all<br>NAME            REVISION UPDATED                  STATUS   CHART         NAMESPACE<br>bilging-maltese 1        Wed Jun 27 06:46:53 2018 DEPLOYED openebs-0.5.5 openebs</pre><p>To view the status of chart, use ```helm status``` command followed by the release name.</p><pre>helm status &lt;release name&gt;</pre><p>To delete the release completely from the K8s cluster, use the following command.</p><pre>helm del --purge &lt;release name&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8071aba156a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>