{"id":5484,"date":"2020-05-11T08:00:14","date_gmt":"2020-05-11T02:30:14","guid":{"rendered":"https:\/\/www.upnxtblog.com\/?p=5484"},"modified":"2020-07-06T12:05:52","modified_gmt":"2020-07-06T06:35:52","slug":"portworx-tutorial-demonstrate-ha-cassandra-stateful-application","status":"publish","type":"post","link":"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/","title":{"rendered":"Portworx Tutorial : Demonstrate HA Cassandra Stateful Application"},"content":{"rendered":"<div class='booster-block booster-read-block'><\/div><p><strong><a href=\"https:\/\/portworx.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Portworx <\/a><\/strong>is a popular <a href=\"https:\/\/portworx.com\/use-case\/kubernetes-storage\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Kubernetes persistent storage<\/a>\u00a0and\u00a0<a href=\"https:\/\/portworx.com\/use-case\/docker-persistent-storage\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Docker storage<\/a> solution. It&#8217;s a clustered block storage solution and provides a Cloud-Native layer from which containerized stateful applications programmatically consume block, file, and object storage services directly through the scheduler.<\/p>\n<p>With Portworx, you can manage any database or stateful service on any infrastructure using any container scheduler. You get a single data management layer for all of your stateful services, no matter where they run.<\/p>\n<p>In this post, we will learn how to deploy Cassandra to Kubernetes and use Portworx Volumes to provide HA capability:<\/p>\n<ol>\n<li>Install, configure <strong>Portworx<\/strong><\/li>\n<li>Use the <strong>Portworx Storage Class<\/strong> to create a PVC with 3 replicas of the data<\/li>\n<li>Use a simple YAML file to <strong>deploy Cassandra<\/strong> using this storage class<\/li>\n<li>How to validate data persistence by deleting the Cassandra pod<\/li>\n<\/ol>\n<p>First, we will deploy Cassandra in a StatefulSet with a single node (replicas=1) to show the basics of node failover. We will create sample data, force Cassandra to flush the data to disk, and then failover the Cassandra pod and show how it comes back up with its data intact. Then, we&#8217;re going to show how we can scale the cluster to 3 nodes and dynamically create volumes for each.<\/p>\n\n<h2>Step #1.Validate Kubernetes<\/h2>\n<p>Use <code>kubectl get nodes<\/code> to check if the Kubernetes nodes are ready.<\/p>\n<figure id=\"attachment_5485\" aria-describedby=\"caption-attachment-5485\" style=\"width: 414px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5485\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port1.png?fit=414%2C146&amp;ssl=1\" data-orig-size=\"414,146\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port1\" data-image-description=\"&lt;p&gt;Kubernetes Pods are ready&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Kubernetes Pods are ready&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port1.png?fit=414%2C146&amp;ssl=1\" class=\"size-full wp-image-5485 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port1.png?resize=414%2C146&#038;ssl=1\" alt=\"\" width=\"414\" height=\"146\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port1.png?w=414&amp;ssl=1 414w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port1.png?resize=300%2C106&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 414px) 100vw, 414px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 414px; --smush-placeholder-aspect-ratio: 414\/146;\" \/><figcaption id=\"caption-attachment-5485\" class=\"wp-caption-text\">Image &#8211; Kubernetes Pods are ready<\/figcaption><\/figure>\n<h2>Step #2.Install Portworx<\/h2>\n<p>Portworx requires at least 2 to 3 nodes in the cluster to have dedicated storage for use. It will then carve out virtual volumes from these storage pools. In this example, we use a 20GB block device that exists on each node.<\/p>\n<figure id=\"attachment_5507\" aria-describedby=\"caption-attachment-5507\" style=\"width: 690px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5507\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/lsblk\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/lsblk.jpg?fit=690%2C287&amp;ssl=1\" data-orig-size=\"690,287\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;S Karthikeyan&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1588270200&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"lsblk\" data-image-description=\"&lt;p&gt;Choose the device to install portworx&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Choose the device to install portworx&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/lsblk.jpg?fit=690%2C287&amp;ssl=1\" class=\"size-full wp-image-5507 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/lsblk.jpg?resize=690%2C287&#038;ssl=1\" alt=\"\" width=\"690\" height=\"287\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/lsblk.jpg?w=690&amp;ssl=1 690w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/lsblk.jpg?resize=300%2C125&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/lsblk.jpg?resize=600%2C250&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 690px) 100vw, 690px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 690px; --smush-placeholder-aspect-ratio: 690\/287;\" \/><figcaption id=\"caption-attachment-5507\" class=\"wp-caption-text\">Image &#8211; Choose the device to install portworx<\/figcaption><\/figure>\n<figure id=\"attachment_5506\" aria-describedby=\"caption-attachment-5506\" style=\"width: 891px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5506\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port16\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?fit=891%2C119&amp;ssl=1\" data-orig-size=\"891,119\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;S Karthikeyan&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1588269902&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port16\" data-image-description=\"&lt;p&gt;Install Portworx&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Install Portworx&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?fit=891%2C119&amp;ssl=1\" class=\"size-full wp-image-5506 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?resize=891%2C119&#038;ssl=1\" alt=\"\" width=\"891\" height=\"119\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?w=891&amp;ssl=1 891w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?resize=300%2C40&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?resize=768%2C103&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port16.jpg?resize=600%2C80&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 891px) 100vw, 891px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 891px; --smush-placeholder-aspect-ratio: 891\/119;\" \/><figcaption id=\"caption-attachment-5506\" class=\"wp-caption-text\">Image &#8211; Install Portworx<\/figcaption><\/figure>\n<p>In the above install command, note the below:<\/p>\n<ul>\n<li><code>c=px-demo<\/code>\u00a0specifies the cluster name<\/li>\n<li><code>b=true<\/code>\u00a0specifies to use internal etcd<\/li>\n<li><code>kbVer=${VER}<\/code>\u00a0specifies the Kubernetes version<\/li>\n<li><code>s=\/dev\/vdb<\/code>\u00a0specifies the block device to use<\/li>\n<\/ul>\n<p>Use <code>kubectl get pods -n kube-system -l name=portworx -o w<\/code> to check if the Portworx pods are ready and status is in <code>RUNNING<\/code> state.<\/p>\n<figure id=\"attachment_5486\" aria-describedby=\"caption-attachment-5486\" style=\"width: 670px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5486\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port2.png?fit=670%2C117&amp;ssl=1\" data-orig-size=\"670,117\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port2\" data-image-description=\"&lt;p&gt;Portworx pods are ready&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Portworx pods are ready&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port2.png?fit=670%2C117&amp;ssl=1\" class=\"size-full wp-image-5486 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port2.png?resize=670%2C117&#038;ssl=1\" alt=\"\" width=\"670\" height=\"117\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port2.png?w=670&amp;ssl=1 670w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port2.png?resize=300%2C52&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port2.png?resize=600%2C105&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 670px) 100vw, 670px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 670px; --smush-placeholder-aspect-ratio: 670\/117;\" \/><figcaption id=\"caption-attachment-5486\" class=\"wp-caption-text\">Image &#8211; Portworx pods are ready<\/figcaption><\/figure>\n<p>You can also take a look at the cluster status using the <code>pxctl<\/code> command as well.<\/p>\n<p>Now, we have the Portworx cluster ready, we can proceed to the next step.<\/p>\n<h2>Step #3: Create StorageClass<\/h2>\n<p><strong>StorageClass<\/strong> provides a way to describe the \u201cclasses\u201d of storage. Various classes might map to quality-of-service levels, or to backup policies, or to arbitrary policies determined by the cluster administrators.<\/p>\n<p>Storage class may differ according to the needs of the business application. Now for our scenario, we have defined below storage class with a replication factor of 2 to accelerate Cassandra node recovery and we also defined a group name for Cassandra so that we can take 3DSnapshots.<\/p>\n<figure id=\"attachment_5487\" aria-describedby=\"caption-attachment-5487\" style=\"width: 373px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5487\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port3.png?fit=373%2C274&amp;ssl=1\" data-orig-size=\"373,274\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port3\" data-image-description=\"&lt;p&gt;Cassandra StorageClass&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Cassandra StorageClass&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port3.png?fit=373%2C274&amp;ssl=1\" class=\"size-full wp-image-5487 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port3.png?resize=373%2C274&#038;ssl=1\" alt=\"\" width=\"373\" height=\"274\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port3.png?w=373&amp;ssl=1 373w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port3.png?resize=300%2C220&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 373px) 100vw, 373px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 373px; --smush-placeholder-aspect-ratio: 373\/274;\" \/><figcaption id=\"caption-attachment-5487\" class=\"wp-caption-text\">Image &#8211; Cassandra StorageClass<\/figcaption><\/figure>\n<p>Refer <a href=\"https:\/\/docs.portworx.com\/manage\/volumes.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">here<\/a> for a full list of supported parameters for Portworx volume.<\/p>\n<p>Create the storage class using <code>kubectl create<\/code> command.<\/p>\n<figure id=\"attachment_5488\" aria-describedby=\"caption-attachment-5488\" style=\"width: 651px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5488\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.jpg?fit=651%2C100&amp;ssl=1\" data-orig-size=\"651,100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;S Karthikeyan&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1588263154&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port4\" data-image-description=\"&lt;p&gt;Create the storage class&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create the storage class&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.jpg?fit=651%2C100&amp;ssl=1\" class=\"size-full wp-image-5488 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.jpg?resize=651%2C100&#038;ssl=1\" alt=\"\" width=\"651\" height=\"100\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.jpg?w=651&amp;ssl=1 651w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.jpg?resize=300%2C46&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.jpg?resize=600%2C92&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 651px) 100vw, 651px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 651px; --smush-placeholder-aspect-ratio: 651\/100;\" \/><figcaption id=\"caption-attachment-5488\" class=\"wp-caption-text\">Image &#8211; Create the storage class<\/figcaption><\/figure>\n<p>In case of production environments, you would also have to add the <code>\"fg=true\"<\/code> parameter to your StorageClass to ensure that Portworx places each Cassandra volume and their replica on separate nodes so that in case of node failure we never failover to a node where it is already running. To enable this feature with a 3 volume group and 2 replicas you need a minimum of 6 worker nodes.<\/p>\n<p>We have got StorageClass ready, let&#8217;s deploy Cassandra on the cluster.<\/p>\n<h2>Step #4: Deploy Cassandra<\/h2>\n<p>In this step, we are going to deploy a 3 node Cassandra application using a stateful set. <strong>StatefulSet<\/strong> is used to manage stateful applications i.e., maintains a sticky identity for each of their Pods. Kubernetes maintains a persistent identifier so that it can maintain across any rescheduling.<\/p>\n<p>Create below Cassandra StatefulSet that uses a Portworx PVC created in the earlier step.<\/p>\n<p><code>apiVersion: v1<\/code><br \/>\n<code>kind: Service<\/code><br \/>\n<code>metadata:<\/code><br \/>\n<code>labels:<\/code><br \/>\n<code>app: cassandra<\/code><br \/>\n<code>name: cassandra<\/code><br \/>\n<code>spec:<\/code><br \/>\n<code>clusterIP: None<\/code><br \/>\n<code>ports:<\/code><br \/>\n<code>- port: 9042<\/code><br \/>\n<code>selector:<\/code><br \/>\n<code>app: cassandra<\/code><br \/>\n<code>---<\/code><br \/>\n<code>apiVersion: \"apps\/v1beta1\"<\/code><br \/>\n<code>kind: StatefulSet<\/code><br \/>\n<code>metadata:<\/code><br \/>\n<code>name: cassandra<\/code><br \/>\n<code>spec:<\/code><br \/>\n<code>serviceName: cassandra<\/code><br \/>\n<code>replicas: 1<\/code><br \/>\n<code>template:<\/code><br \/>\n<code>metadata:<\/code><br \/>\n<code>labels:<\/code><br \/>\n<code>app: cassandra<\/code><br \/>\n<code>spec:<\/code><br \/>\n<code># Use the stork scheduler to enable more efficient placement of the pods<\/code><br \/>\n<code>schedulerName: stork<\/code><br \/>\n<code>containers:<\/code><br \/>\n<code>- name: cassandra<\/code><br \/>\n<code>image: gcr.io\/google-samples\/cassandra:v14<\/code><br \/>\n<code>imagePullPolicy: Always<\/code><br \/>\n<code>ports:<\/code><br \/>\n<code>- containerPort: 7000<\/code><br \/>\n<code>name: intra-node<\/code><br \/>\n<code>- containerPort: 7001<\/code><br \/>\n<code>name: tls-intra-node<\/code><br \/>\n<code>- containerPort: 7199<\/code><br \/>\n<code>name: jmx<\/code><br \/>\n<code>- containerPort: 9042<\/code><br \/>\n<code>name: cql<\/code><br \/>\n<code>resources:<\/code><br \/>\n<code>limits:<\/code><br \/>\n<code>cpu: \"500m\"<\/code><br \/>\n<code>memory: 1Gi<\/code><br \/>\n<code>requests:<\/code><br \/>\n<code>cpu: \"500m\"<\/code><br \/>\n<code>memory: 1Gi<\/code><br \/>\n<code>securityContext:<\/code><br \/>\n<code>capabilities:<\/code><br \/>\n<code>add:<\/code><br \/>\n<code>- IPC_LOCK<\/code><br \/>\n<code>lifecycle:<\/code><br \/>\n<code>preStop:<\/code><br \/>\n<code>exec:<\/code><br \/>\n<code>command: [\"\/bin\/sh\", \"-c\", \"PID=$(pidof java) &amp;&amp; kill $PID &amp;&amp; while ps -p $PID &gt; \/dev\/null; do sleep 1; done\"]<\/code><br \/>\n<code>env:<\/code><br \/>\n<code>- name: MAX_HEAP_SIZE<\/code><br \/>\n<code>value: 512M<\/code><br \/>\n<code>- name: HEAP_NEWSIZE<\/code><br \/>\n<code>value: 100M<\/code><br \/>\n<code>- name: CASSANDRA_SEEDS<\/code><br \/>\n<code>value: \"cassandra-0.cassandra.default.svc.cluster.local\"<\/code><br \/>\n<code>- name: CASSANDRA_CLUSTER_NAME<\/code><br \/>\n<code>value: \"K8Demo\"<\/code><br \/>\n<code>- name: CASSANDRA_DC<\/code><br \/>\n<code>value: \"DC1-K8Demo\"<\/code><br \/>\n<code>- name: CASSANDRA_RACK<\/code><br \/>\n<code>value: \"Rack1-K8Demo\"<\/code><br \/>\n<code>- name: CASSANDRA_AUTO_BOOTSTRAP<\/code><br \/>\n<code>value: \"false\"<\/code><br \/>\n<code>- name: POD_IP<\/code><br \/>\n<code>valueFrom:<\/code><br \/>\n<code>fieldRef:<\/code><br \/>\n<code>fieldPath: status.podIP<\/code><br \/>\n<code>- name: POD_NAMESPACE<\/code><br \/>\n<code>valueFrom:<\/code><br \/>\n<code>fieldRef:<\/code><br \/>\n<code>fieldPath: metadata.namespace<\/code><br \/>\n<code>readinessProbe:<\/code><br \/>\n<code>exec:<\/code><br \/>\n<code>command:<\/code><br \/>\n<code>- \/bin\/bash<\/code><br \/>\n<code>- -c<\/code><br \/>\n<code>- \/ready-probe.sh<\/code><br \/>\n<code>initialDelaySeconds: 15<\/code><br \/>\n<code>timeoutSeconds: 5<\/code><br \/>\n<code># These volume mounts are persistent. They are like inline claims,<\/code><br \/>\n<code># but not exactly because the names need to match exactly one of<\/code><br \/>\n<code># the stateful pod volumes.<\/code><br \/>\n<code>volumeMounts:<\/code><br \/>\n<code>- name: cassandra-data<\/code><br \/>\n<code>mountPath: \/cassandra_data<\/code><br \/>\n<code># These are converted to volume claims by the controller<\/code><br \/>\n<code># and mounted at the paths mentioned above.<\/code><br \/>\n<code>volumeClaimTemplates:<\/code><br \/>\n<code>- metadata:<\/code><br \/>\n<code>name: cassandra-data<\/code><br \/>\n<code>annotations:<\/code><br \/>\n<code>volume.beta.kubernetes.io\/storage-class: px-storageclass<\/code><br \/>\n<code>spec:<\/code><br \/>\n<code>accessModes: [ \"ReadWriteOnce\" ]<\/code><br \/>\n<code>resources:<\/code><br \/>\n<code>requests:<\/code><br \/>\n<code>storage: 1Gi<\/code><br \/>\n<code>---<\/code><br \/>\n<code>apiVersion: v1<\/code><br \/>\n<code>kind: Pod<\/code><br \/>\n<code>metadata:<\/code><br \/>\n<code>name: cqlsh<\/code><br \/>\n<code>spec:<\/code><br \/>\n<code>containers:<\/code><br \/>\n<code>- name: cqlsh<\/code><br \/>\n<code>image: mikewright\/cqlsh<\/code><br \/>\n<code>command:<\/code><br \/>\n<code>- sh<\/code><br \/>\n<code>- -c<\/code><br \/>\n<code>- \"exec tail -f \/dev\/null\"<\/code><\/p>\n<p>Create the StatefulSet using <code>kubectl create<\/code> command.<\/p>\n<figure id=\"attachment_5489\" aria-describedby=\"caption-attachment-5489\" style=\"width: 361px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5489\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port4-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.png?fit=361%2C107&amp;ssl=1\" data-orig-size=\"361,107\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port4\" data-image-description=\"&lt;p&gt;Create a Cassandra StatefulSet &lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create a Cassandra StatefulSet &lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.png?fit=361%2C107&amp;ssl=1\" class=\"size-full wp-image-5489 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.png?resize=361%2C107&#038;ssl=1\" alt=\"\" width=\"361\" height=\"107\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.png?w=361&amp;ssl=1 361w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port4.png?resize=300%2C89&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 361px) 100vw, 361px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 361px; --smush-placeholder-aspect-ratio: 361\/107;\" \/><figcaption id=\"caption-attachment-5489\" class=\"wp-caption-text\">Image &#8211; Create a Cassandra StatefulSet<\/figcaption><\/figure>\n<p>Use <code>kubectl get pods<\/code> the command to validate if the pod is <code>READY<\/code>.<\/p>\n<figure id=\"attachment_5490\" aria-describedby=\"caption-attachment-5490\" style=\"width: 649px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5490\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port5.png?fit=649%2C121&amp;ssl=1\" data-orig-size=\"649,121\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port5\" data-image-description=\"&lt;p&gt;Validate if pods are ready&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Validate if pods are ready&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port5.png?fit=649%2C121&amp;ssl=1\" class=\"size-full wp-image-5490 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port5.png?resize=649%2C121&#038;ssl=1\" alt=\"\" width=\"649\" height=\"121\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port5.png?w=649&amp;ssl=1 649w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port5.png?resize=300%2C56&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port5.png?resize=600%2C112&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 649px) 100vw, 649px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 649px; --smush-placeholder-aspect-ratio: 649\/121;\" \/><figcaption id=\"caption-attachment-5490\" class=\"wp-caption-text\">Image &#8211; Validate if pods are ready<\/figcaption><\/figure>\n<p>As an optional step, you can use <code>pxctl<\/code> the command line to inspect the volumes underlying volumes of Cassandra pod. that we have created.<\/p>\n<figure id=\"attachment_5491\" aria-describedby=\"caption-attachment-5491\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5491\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.jpg?fit=552%2C475&amp;ssl=1\" data-orig-size=\"552,475\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;S Karthikeyan&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1588264501&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port6\" data-image-description=\"&lt;p&gt;Inspect volume using pxctl&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Inspect volume using pxctl&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.jpg?fit=552%2C475&amp;ssl=1\" class=\"size-full wp-image-5491 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.jpg?resize=552%2C475&#038;ssl=1\" alt=\"\" width=\"552\" height=\"475\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.jpg?w=552&amp;ssl=1 552w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.jpg?resize=300%2C258&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 552px) 100vw, 552px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 552px; --smush-placeholder-aspect-ratio: 552\/475;\" \/><figcaption id=\"caption-attachment-5491\" class=\"wp-caption-text\">Image &#8211; Inspect volume using pxctl<\/figcaption><\/figure>\n<p>From the output, infer the following<\/p>\n<ul>\n<li><code>State<\/code> indicates the volume is attached and shows the node on which it is attached and This is the node where the Kubernetes pod is running.<\/li>\n<li><code>HA<\/code> shows the number of configured replicas for this volume.<\/li>\n<li><code>Labels<\/code> show the name of the PVC for this volume.<\/li>\n<li><code>Replica sets on nodes<\/code> shows the px nodes on which volume is replicated.<\/li>\n<\/ul>\n<p>Now that we have Cassandra ready, we can create a sample database and populate some data.<\/p>\n<h2>Step #5: Create a Cassandra Database<\/h2>\n<p>Initialize a sample database on our Cassandra instance using CQL commands.<\/p>\n<figure id=\"attachment_5492\" aria-describedby=\"caption-attachment-5492\" style=\"width: 891px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5492\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port6-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?fit=891%2C146&amp;ssl=1\" data-orig-size=\"891,146\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port6\" data-image-description=\"&lt;p&gt;Connect to CQL Shell session&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Connect to CQL Shell session&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?fit=891%2C146&amp;ssl=1\" class=\"size-full wp-image-5492 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?resize=891%2C146&#038;ssl=1\" alt=\"\" width=\"891\" height=\"146\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?w=891&amp;ssl=1 891w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?resize=300%2C49&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?resize=768%2C126&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port6.png?resize=600%2C98&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 891px) 100vw, 891px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 891px; --smush-placeholder-aspect-ratio: 891\/146;\" \/><figcaption id=\"caption-attachment-5492\" class=\"wp-caption-text\">Image &#8211; Connect to CQL Shell session<\/figcaption><\/figure>\n<p>Next step is to create a keyspace with replication of 3 and insert some sample data:<\/p>\n<figure id=\"attachment_5493\" aria-describedby=\"caption-attachment-5493\" style=\"width: 898px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5493\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port7\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?fit=898%2C309&amp;ssl=1\" data-orig-size=\"898,309\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port7\" data-image-description=\"&lt;p&gt;Create a keyspace and insert sample data&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Create a keyspace and insert sample data&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?fit=898%2C309&amp;ssl=1\" class=\"size-full wp-image-5493 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?resize=898%2C309&#038;ssl=1\" alt=\"\" width=\"898\" height=\"309\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?w=898&amp;ssl=1 898w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?resize=300%2C103&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?resize=768%2C264&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port7.png?resize=600%2C206&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 898px) 100vw, 898px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 898px; --smush-placeholder-aspect-ratio: 898\/309;\" \/><figcaption id=\"caption-attachment-5493\" class=\"wp-caption-text\">Image &#8211; Create a keyspace and insert sample data<\/figcaption><\/figure>\n<p>Once the data is inserted, check if the same has been created.<\/p>\n<figure id=\"attachment_5494\" aria-describedby=\"caption-attachment-5494\" style=\"width: 556px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5494\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port8\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port8.png?fit=556%2C253&amp;ssl=1\" data-orig-size=\"556,253\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port8\" data-image-description=\"&lt;p&gt;Select rows from the keyspace&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Select rows from the keyspace&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port8.png?fit=556%2C253&amp;ssl=1\" class=\"size-full wp-image-5494 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port8.png?resize=556%2C253&#038;ssl=1\" alt=\"\" width=\"556\" height=\"253\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port8.png?w=556&amp;ssl=1 556w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port8.png?resize=300%2C137&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 556px) 100vw, 556px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 556px; --smush-placeholder-aspect-ratio: 556\/253;\" \/><figcaption id=\"caption-attachment-5494\" class=\"wp-caption-text\">Image &#8211; Select rows from the keyspace<\/figcaption><\/figure>\n<p>Now that we have got the records created, we can proceed to check if the failover works properly or not but before that, we will have to flush (use <code>nodetool flush<\/code> command) the in-memory data onto disk so that when the Cassandra starts on another node it will have access to the data that was just written. Cassandra by default keeps data in memory and only flushes it to disk after 10 minutes by default.<\/p>\n<figure id=\"attachment_5496\" aria-describedby=\"caption-attachment-5496\" style=\"width: 365px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5496\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port9-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port9-1.png?fit=365%2C129&amp;ssl=1\" data-orig-size=\"365,129\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port9\" data-image-description=\"&lt;p&gt;Flush data to disk&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Flush data to disk&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port9-1.png?fit=365%2C129&amp;ssl=1\" class=\"size-full wp-image-5496 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port9-1.png?resize=365%2C129&#038;ssl=1\" alt=\"\" width=\"365\" height=\"129\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port9-1.png?w=365&amp;ssl=1 365w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port9-1.png?resize=300%2C106&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 365px) 100vw, 365px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 365px; --smush-placeholder-aspect-ratio: 365\/129;\" \/><figcaption id=\"caption-attachment-5496\" class=\"wp-caption-text\">Image &#8211; Flush data to disk<\/figcaption><\/figure>\n<h2>Step #6: Delete Cassandra Instance<\/h2>\n<p>Let us simulate failure by cordoning the node where Cassandra is running and then deleting the Cassandra pod. The pod will then be rescheduled to make sure it lands on one of the nodes that have the replica of the data.<\/p>\n<figure id=\"attachment_5498\" aria-describedby=\"caption-attachment-5498\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5498\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port10\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port10.png?fit=750%2C134&amp;ssl=1\" data-orig-size=\"750,134\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port10\" data-image-description=\"&lt;p&gt;Delete Cassandra instance&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Delete Cassandra instance&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port10.png?fit=750%2C134&amp;ssl=1\" class=\"size-full wp-image-5498 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port10.png?resize=750%2C134&#038;ssl=1\" alt=\"\" width=\"750\" height=\"134\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port10.png?w=750&amp;ssl=1 750w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port10.png?resize=300%2C54&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port10.png?resize=600%2C107&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 750px) 100vw, 750px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 750px; --smush-placeholder-aspect-ratio: 750\/134;\" \/><figcaption id=\"caption-attachment-5498\" class=\"wp-caption-text\">Image &#8211; Delete Cassandra instance<\/figcaption><\/figure>\n<p>Once the Cassandra pod gets deleted, Kubernetes will start to create a new Cassandra pod on another node. Use <code>kubectl get pods<\/code> to verify, when the pod comes back up it will be in the <code>RUNNING<\/code> and <code>READY(1\/1)<\/code> state.<\/p>\n<figure id=\"attachment_5499\" aria-describedby=\"caption-attachment-5499\" style=\"width: 624px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5499\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port11\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port11.png?fit=624%2C79&amp;ssl=1\" data-orig-size=\"624,79\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port11\" data-image-description=\"&lt;p&gt;Verify replacement pod starts running&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Verify replacement pod starts running&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port11.png?fit=624%2C79&amp;ssl=1\" class=\"size-full wp-image-5499 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port11.png?resize=624%2C79&#038;ssl=1\" alt=\"\" width=\"624\" height=\"79\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port11.png?w=624&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port11.png?resize=300%2C38&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port11.png?resize=600%2C76&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 624px) 100vw, 624px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 624px; --smush-placeholder-aspect-ratio: 624\/79;\" \/><figcaption id=\"caption-attachment-5499\" class=\"wp-caption-text\">Image &#8211; Verify replacement pod starts running<\/figcaption><\/figure>\n<p>Also, we have to <code>uncordon<\/code> the node before the next step.<\/p>\n<figure id=\"attachment_5500\" aria-describedby=\"caption-attachment-5500\" style=\"width: 325px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5500\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port12\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port12.png?fit=325%2C80&amp;ssl=1\" data-orig-size=\"325,80\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port12\" data-image-description=\"&lt;p&gt;Uncordon node&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Uncordon node&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port12.png?fit=325%2C80&amp;ssl=1\" class=\"size-full wp-image-5500 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port12.png?resize=325%2C80&#038;ssl=1\" alt=\"\" width=\"325\" height=\"80\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port12.png?w=325&amp;ssl=1 325w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port12.png?resize=300%2C74&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 325px) 100vw, 325px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 325px; --smush-placeholder-aspect-ratio: 325\/80;\" \/><figcaption id=\"caption-attachment-5500\" class=\"wp-caption-text\">Image &#8211; Uncordon node<\/figcaption><\/figure>\n<p>We have the new Cassandra pod running, let&#8217;s check if the database we previously created is still intact.<\/p>\n<h2>Step #7: Verify data is still available<\/h2>\n<p>Let&#8217;s start a CQL Shell session and validate if the data is available.<\/p>\n<figure id=\"attachment_5501\" aria-describedby=\"caption-attachment-5501\" style=\"width: 898px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5501\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port13\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?fit=898%2C358&amp;ssl=1\" data-orig-size=\"898,358\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port13\" data-image-description=\"&lt;p&gt;Verify if data is still available&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Verify if data is still available&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?fit=898%2C358&amp;ssl=1\" class=\"size-full wp-image-5501 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?resize=898%2C358&#038;ssl=1\" alt=\"\" width=\"898\" height=\"358\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?w=898&amp;ssl=1 898w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?resize=300%2C120&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?resize=768%2C306&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port13.png?resize=600%2C239&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 898px) 100vw, 898px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 898px; --smush-placeholder-aspect-ratio: 898\/358;\" \/><figcaption id=\"caption-attachment-5501\" class=\"wp-caption-text\">Image &#8211; Verify if data is still available<\/figcaption><\/figure>\n<p><em>Congrats! we have our data and survived the node failure too!<\/em><\/p>\n<h2>Step #8: Scale the cluster<\/h2>\n<p>We will scale our Cassandra stateful set to 3 replicas using <code>kubectl scale<\/code> command.<\/p>\n<figure id=\"attachment_5502\" aria-describedby=\"caption-attachment-5502\" style=\"width: 436px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5502\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port14\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port14.png?fit=436%2C80&amp;ssl=1\" data-orig-size=\"436,80\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port14\" data-image-description=\"&lt;p&gt;Scale the cluster&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Scale the cluster&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port14.png?fit=436%2C80&amp;ssl=1\" class=\"size-full wp-image-5502 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port14.png?resize=436%2C80&#038;ssl=1\" alt=\"\" width=\"436\" height=\"80\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port14.png?w=436&amp;ssl=1 436w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port14.png?resize=300%2C55&amp;ssl=1 300w\" data-sizes=\"auto, (max-width: 436px) 100vw, 436px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 436px; --smush-placeholder-aspect-ratio: 436\/80;\" \/><figcaption id=\"caption-attachment-5502\" class=\"wp-caption-text\">Image &#8211; Scale the cluster<\/figcaption><\/figure>\n<p>You can watch the pods getting added:<\/p>\n<figure id=\"attachment_5503\" aria-describedby=\"caption-attachment-5503\" style=\"width: 644px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"5503\" data-permalink=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/05\/11\/portworx-tutorial-demonstrate-ha-cassandra-stateful-application\/port15\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?fit=644%2C106&amp;ssl=1\" data-orig-size=\"644,106\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"port15\" data-image-description=\"&lt;p&gt;Cluster scaled&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Image &amp;#8211; Cluster scaled&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?fit=644%2C106&amp;ssl=1\" class=\"size-full wp-image-5503 lazyload\" data-src=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?resize=644%2C106&#038;ssl=1\" alt=\"\" width=\"644\" height=\"106\" data-srcset=\"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?w=644&amp;ssl=1 644w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?resize=300%2C49&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?resize=638%2C106&amp;ssl=1 638w, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/04\/port15.png?resize=600%2C99&amp;ssl=1 600w\" data-sizes=\"auto, (max-width: 644px) 100vw, 644px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 644px; --smush-placeholder-aspect-ratio: 644\/106;\" \/><figcaption id=\"caption-attachment-5503\" class=\"wp-caption-text\">Image &#8211; Cluster scaled<\/figcaption><\/figure>\n<p>It will take a minute or two for all three Cassandra nodes to come online and discover each other.<\/p>\n<h2>Additional Resources :<\/h2>\n<ul>\n<li>Guide to\u00a0<a href=\"https:\/\/docs.portworx.com\/applications\/cassandra.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Kubernetes and Cassandra<\/a><\/li>\n<li><a href=\"https:\/\/portworx.com\/products\/introduction\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Introduction to Portworx<\/a><\/li>\n<li><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/04\/15\/what-are-the-key-kubernetes-metrics-that-you-have-to-monitor\/\">What are the key Kubernetes metrics that you have to monitor ?<\/a><\/li>\n<li><a href=\"https:\/\/www.upnxtblog.com\/index.php\/2020\/01\/29\/take-look-at-podman-red-hats-daemon-less-docker-alternative\/\">Take look at Podman, Red Hat\u2019s daemon-less Docker Alternative<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Portworx is a popular Kubernetes persistent storage\u00a0and\u00a0Docker storage solution. It&#8217;s a clustered block storage solution and provides a Cloud-Native layer from which containerized stateful applications programmatically consume block, file, and object storage services directly through the scheduler. With Portworx, you can manage any database or stateful service on any infrastructure using any container scheduler. You [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1031,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[311],"tags":[408,149,407],"class_list":["post-5484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","tag-cassandra","tag-kubernetes","tag-portworx"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9fbQS-1qs","jetpack-related-posts":[{"id":2975,"url":"https:\/\/www.upnxtblog.com\/index.php\/2018\/10\/03\/top-7-managed-kubernetes-platforms\/","url_meta":{"origin":5484,"position":0},"title":"TOP 7 Managed Kubernetes Platforms","author":"Karthik","date":"October 3, 2018","format":false,"excerpt":"Introduction Kubernetes is a production-ready, open-source platform designed with Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community. It is designed to automate deploying, scaling, and operating application containers. Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit.\u2026","rel":"","context":"In &quot;Kubernetes Guides&quot;","block_context":{"text":"Kubernetes Guides","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/kubernetes\/"},"img":{"alt_text":"kubernetes logo","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":6387,"url":"https:\/\/www.upnxtblog.com\/index.php\/2021\/07\/03\/15-interesting-facts-about-kubernetes-and-cloud-native-operations-report-2021\/","url_meta":{"origin":5484,"position":1},"title":"15 Interesting facts about Kubernetes and cloud-native operations report 2021","author":"Karthik","date":"July 3, 2021","format":false,"excerpt":"Canonical recently conducted a survey to measure the usage of Kubernetes, Cloud-native technologies their goals, benefits, challenges, operators, advanced usage, edge, etc., Detailed report includes responses to 50+ questions from ~1200 respondents and analysis from 7 industry experts(this includes me as well, you can read the report for my commentary).\u2026","rel":"","context":"In &quot;Kubernetes Guides&quot;","block_context":{"text":"Kubernetes Guides","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/kubernetes\/"},"img":{"alt_text":"kubernetes logo","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":4610,"url":"https:\/\/www.upnxtblog.com\/index.php\/2019\/12\/16\/how-to-back-up-and-restore-your-kubernetes-cluster-resources-and-persistent-volumes\/","url_meta":{"origin":5484,"position":2},"title":"How to back up and restore your Kubernetes cluster resources and persistent volumes?","author":"Karthik","date":"December 16, 2019","format":false,"excerpt":"Kubernetes, as we know,\u00a0coordinates a highly available cluster of computers that are connected to work as a single unit. Kubernetes contains a number of abstractions that allows deployment of containerized applications to the cluster without attaching them to individual machines. In short, Kubernetes is - Portable: public, private, hybrid, multi-cloud\u2026","rel":"","context":"In &quot;Kubernetes Guides&quot;","block_context":{"text":"Kubernetes Guides","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/kubernetes\/"},"img":{"alt_text":"kubernetes logo","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":5757,"url":"https:\/\/www.upnxtblog.com\/index.php\/2020\/10\/13\/10-best-practices-worth-implementing-to-adopt-kubernetes\/","url_meta":{"origin":5484,"position":3},"title":"Kubernetes Adoption in 2024: Key Statistics","author":"Karthik","date":"October 13, 2020","format":false,"excerpt":"We already know that\u00a0Kubernetes is the No. 1 orchestration platform for container-based applications, automating the deployment and scaling of these apps, and streamlining maintenance operations. However, Kubernetes comes with its own complexity challenges. So how can an enterprise take advantage of containerization to tackle complexity and not end up with\u2026","rel":"","context":"In &quot;Kubernetes Guides&quot;","block_context":{"text":"Kubernetes Guides","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/kubernetes\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/10\/Big-Idea.jpg?fit=770%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/10\/Big-Idea.jpg?fit=770%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/10\/Big-Idea.jpg?fit=770%2C330&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2020\/10\/Big-Idea.jpg?fit=770%2C330&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":4962,"url":"https:\/\/www.upnxtblog.com\/index.php\/2020\/04\/15\/what-are-the-key-kubernetes-metrics-that-you-have-to-monitor\/","url_meta":{"origin":5484,"position":4},"title":"What are the key Kubernetes metrics that you have to monitor ?","author":"Karthik","date":"April 15, 2020","format":false,"excerpt":"We have already looked at BEST Kubernetes monitoring tools, with the increasing adoption of containers and microservices in the enterprises, monitoring utilities have to handle more services and server instances than ever before. Kubernetes environments vary from deployment to deployment, but they generally have a handful of key components, resources,\u2026","rel":"","context":"In &quot;Kubernetes Guides&quot;","block_context":{"text":"Kubernetes Guides","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/kubernetes\/"},"img":{"alt_text":"kubernetes logo","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":845,"url":"https:\/\/www.upnxtblog.com\/index.php\/2017\/11\/13\/kubernetes-platform-intro-key-concepts\/","url_meta":{"origin":5484,"position":5},"title":"Kubernetes &#8211; Introduction &#038; key concepts","author":"Karthik","date":"November 13, 2017","format":false,"excerpt":"From the last post on containers, we know what are containers & its benefits. Just to recap, here are the points below : Uses OS Level virtualization Isolated from each of them and from the host Filesystems Processes Resources Increased ease and efficiency of container image creation compared to VM\u2026","rel":"","context":"In &quot;Cloud Computing&quot;","block_context":{"text":"Cloud Computing","link":"https:\/\/www.upnxtblog.com\/index.php\/category\/cloud\/"},"img":{"alt_text":"kubernetes logo","src":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.upnxtblog.com\/wp-content\/uploads\/2017\/11\/kubernetes.jpg?fit=722%2C612&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts\/5484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/comments?post=5484"}],"version-history":[{"count":1,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts\/5484\/revisions"}],"predecessor-version":[{"id":5510,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/posts\/5484\/revisions\/5510"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/media\/1031"}],"wp:attachment":[{"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/media?parent=5484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/categories?post=5484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.upnxtblog.com\/index.php\/wp-json\/wp\/v2\/tags?post=5484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}