<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jeff Banks</title>
    <description>The latest articles on DEV Community by Jeff Banks (@jeffbanks).</description>
    <link>https://dev.to/jeffbanks</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F645596%2F7bc52be6-d40d-4f31-aff8-285a565f9346.jpeg</url>
      <title>DEV Community: Jeff Banks</title>
      <link>https://dev.to/jeffbanks</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeffbanks"/>
    <language>en</language>
    <item>
      <title>Kubernetes Data Simplicity: Getting started with K8ssandra</title>
      <dc:creator>Jeff Banks</dc:creator>
      <pubDate>Thu, 07 Jul 2022 17:20:41 +0000</pubDate>
      <link>https://dev.to/datastax/kubernetes-data-simplicity-getting-started-with-k8ssandra-2k1d</link>
      <guid>https://dev.to/datastax/kubernetes-data-simplicity-getting-started-with-k8ssandra-2k1d</guid>
      <description>&lt;p&gt;``You might have heard about the &lt;a href="https://github.com/k8ssandra/k8ssandra" rel="noopener noreferrer"&gt;K8ssandra&lt;/a&gt; project and want to start contributing, or maybe you want to start using all of its features. If you aren’t familiar with K8ssandra (pronounced like “Kate Sandra”), you can read this &lt;a href="https://k8ssandra.io/" rel="noopener noreferrer"&gt;overview&lt;/a&gt; before digging into the developer activities in this post.&lt;/p&gt;

&lt;p&gt;In a nutshell, K8ssandra is an open-source distribution of Apache Cassandra™ for Kubernetes, which includes a rich set of trusted open-source services and tooling. K8ssandra comes with handy features that are baked-in and pluggable, which allows for flexible deployment and configuration.&lt;/p&gt;

&lt;p&gt;This post walks the K8ssandra developer through various activities for getting set up to run K8ssandra on a local machine, while including maintainer tips and tricks. Information and activities are split into four sections as some readers may already have varied foundations existing for Kubernetes development.&lt;/p&gt;

&lt;p&gt;The sections include: editor and tooling installation, installation and setup of K8ssandra, hands-on exercises, and information shared from K8ssandra maintainers. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Configuring the development environment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s set the foundation for a K8ssandra development environment. Where possible, this guide attempts to maintain an operating system agnostic approach. K8ssandra supports the following operating systems for development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MacOS&lt;/li&gt;
&lt;li&gt;Linux&lt;/li&gt;
&lt;li&gt;Windows 10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: For Windows, we recommend using &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/about" rel="noopener noreferrer"&gt;Windows Subsystem for Linux&lt;/a&gt; (WSL2) to execute the shell scripts referenced below.&lt;/p&gt;

&lt;p&gt;Although K8ssandra is created primarily to run in Kubernetes cloud environments, we’ll focus here on local machine development.&lt;/p&gt;

&lt;p&gt;Reference “&lt;a href="https://k8ssandra.io/blog/2021/03/10/requirements-for-running-k8ssandra-for-development/" rel="noopener noreferrer"&gt;Requirements for running K8ssandra for development&lt;/a&gt;” for details on managing expectations if you are running on a resource-constrained machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Development editor&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you already have a code editor setup supporting Kubernetes development AND have Go installed, feel free to skip this section.&lt;/p&gt;

&lt;p&gt;One option available is &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; (VS Code) for development on K8ssandra because it is free, open-source, and supports editing all of the artifacts that make up the K8ssandra project. Another great alternative is JetBrains &lt;a href="https://www.jetbrains.com/go/" rel="noopener noreferrer"&gt;GoLand&lt;/a&gt; IDE, which isn’t free for all users, but does provide an evaluation/trial period.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;VS Code installation&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;First, download the VS Code binaries and install the necessary extensions to assist with K8ssandra development.&lt;/p&gt;

&lt;p&gt;1 . &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Download&lt;/a&gt; VS Code specific to your operating system. \&lt;br&gt;
Note: this guide is based on version 1.54.2.&lt;br&gt;
2 . Add a Go extension to your VS Code editor for editing and compiling of Go source. &lt;/p&gt;

&lt;p&gt;To install an extension, navigate to &lt;strong&gt;File-&lt;/strong&gt;&amp;gt;&lt;strong&gt;Preferences-&lt;/strong&gt;&amp;gt;&lt;strong&gt;Extensions&lt;/strong&gt; in VS Code and search for “Go”. This guide uses version 0.23.2 (not the nightly build) from the Go Team at Google.&lt;br&gt;
3 . Follow the steps in the Go extension’s documentation, which includes a &lt;a href="https://golang.org/" rel="noopener noreferrer"&gt;Download&lt;/a&gt; of &lt;strong&gt;Go&lt;/strong&gt; specific to your operating system. Select 1.14+ as a version.&lt;/p&gt;

&lt;p&gt;Here is a list of useful VS Code extensions for K8ssandra development. Search for them by name in the VS Code extensions page.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools" rel="noopener noreferrer"&gt;ms-kubernetes-tools.vscode-kubernetes-tools&lt;/a&gt; - develop, deploy, and debug Kubernetes applications&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ipedrazas.kubernetes-snippets" rel="noopener noreferrer"&gt;ipedrazas.kubernetes-snippets&lt;/a&gt; - code snippets of Kubernetes for easier development and configuration.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml" rel="noopener noreferrer"&gt;redhat.vscode-yaml&lt;/a&gt; - YAML language support with Kubernetes syntax assistance included. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the VS Code editor and Go binaries are installed, let’s make sure you’re ready to pull in the K8ssandra source.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Git and GitHub&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you already have Git setup and you’ve got a GitHub account, feel free to skip this section.&lt;/p&gt;

&lt;p&gt;1 . Reference the following to install Git properly: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;About Git&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/git-guides/install-git" rel="noopener noreferrer"&gt;Setup Guide&lt;/a&gt;&lt;br&gt;
&lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Basic Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2 . Reference information for setting up a GitHub account.&lt;br&gt;
&lt;a href="https://github.com/join" rel="noopener noreferrer"&gt;Getting started&lt;/a&gt; with GitHub&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Checkpoint&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;At this point, you should have the following setup &amp;amp; installed:&lt;/p&gt;

&lt;p&gt;✔ VS Code (the editor)&lt;/p&gt;

&lt;p&gt;✔ Go (the Golang binaries)&lt;/p&gt;

&lt;p&gt;✔ Git (a version control system)&lt;/p&gt;

&lt;p&gt;✔ GitHub account (for forking and contributing)&lt;/p&gt;

&lt;p&gt;See the references listed below of useful information developers use when starting out with the technologies installed above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;a href="https://vscode.github.com/" rel="noopener noreferrer"&gt;VS Code and Github&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A Git &lt;a href="https://training.github.com/downloads/github-git-cheat-sheet/" rel="noopener noreferrer"&gt;cheat sheet&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Go &lt;a href="https://golang.org/doc/tutorial/getting-started" rel="noopener noreferrer"&gt;tutorial&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Installing and configuring a Kubernetes and K8ssandra environment&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you already have a Kubernetes environment setup with K8ssandra, feel free to skip this section.&lt;/p&gt;

&lt;p&gt;This &lt;a href="https://k8ssandra.io/docs/getting-started/" rel="noopener noreferrer"&gt;10-minute quick-start&lt;/a&gt; will guide you through the steps to run a basic K8ssandra deployment in a local Kubernetes environment.&lt;/p&gt;

&lt;p&gt;For a more visual and interactive demonstration of setting up K8ssandra, check out &lt;a href="https://k8ssandra.io/blog/2021/03/30/k8ssandra-first-touch/" rel="noopener noreferrer"&gt;K8ssandra First Touch&lt;/a&gt;, a step-by-step 15 minute video.&lt;/p&gt;

&lt;p&gt;Now it’s time to learn about the file types contained in the K8ssandra codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Getting hands-on&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Repository&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The K8ssandra GitHub repository resides &lt;a href="https://github.com/k8ssandra/k8ssandra" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Follow these steps to download the current K8ssandra source code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on the &lt;strong&gt;Fork&lt;/strong&gt; button (top right corner of the screen).&lt;/li&gt;
&lt;li&gt;This will fork the K8ssandra to your personal GitHub repository.&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;Git&lt;/strong&gt;, you can now pull the K8ssandra source code and documentation to your local machine. Some developers choose to do this via the GitHub plugin-in in an IDE or from a command line.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Command line example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
git clone https://github.com/your-github-repo-name/k8ssandra.git&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Insert your personal GitHub repository name followed by k8ssandra.git.&lt;/p&gt;

&lt;p&gt;If you want to take GitHub to the command line, checkout &lt;a href="https://cli.github.com/" rel="noopener noreferrer"&gt;GitHub CLI&lt;/a&gt;. It is GitHub’s official command line tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Project composition&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;K8ssandra is primarily composed of &lt;a href="https://en.wikipedia.org/wiki/YAML" rel="noopener noreferrer"&gt;YAML&lt;/a&gt; files used for declarative configurations. In fact, many of the YAML files are a collection of &lt;a href="https://helm.sh/" rel="noopener noreferrer"&gt;Helm charts&lt;/a&gt;. Helm is an open source package management solution for Kubernetes, and its charts are the packaging format used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnx875nflbvc8bg9q7mxz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnx875nflbvc8bg9q7mxz.png" alt="image" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to YAML, you will see some &lt;strong&gt;.go&lt;/strong&gt; files in the K8ssandra project. &lt;a href="https://golang.org/" rel="noopener noreferrer"&gt;Go&lt;/a&gt; within K8ssandra is used for utilities and tests.&lt;/p&gt;

&lt;p&gt;K8ssandra’s reference documentation is maintained with languages including: HTML, Markdown, and CSS. The artifacts reside under the top-level &lt;strong&gt;/&lt;/strong&gt;docs folder in the K8ssandra repository and are used to generate content for the &lt;a href="https://bit.ly/3rWG9m8" rel="noopener noreferrer"&gt;k8ssandra.io&lt;/a&gt; website.&lt;/p&gt;

&lt;p&gt;To round out the different file types, there are shell and Python scripts provided for automation of tasks including documentation publishing and assisting the developer with environment setup tasks. The scripts reside under the top-level /scripts folder in the K8ssandra repository. See their README for more information.&lt;/p&gt;

&lt;p&gt;The K8ssandra project contains multiple GitHub repositories, with the main repository at &lt;a href="https://github.com/k8ssandra/k8ssandra" rel="noopener noreferrer"&gt;k8ssandra/k8ssandra&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/k8ssandra" rel="noopener noreferrer"&gt;K8ssandra organization page&lt;/a&gt; provides a bird’s eye view of the project’s repository. Each repository has a README that will allow you to learn more about the K8ssandra family.&lt;/p&gt;

&lt;p&gt;In addition, there are two very important repositories that currently reside outside of the K8ssandra project; they’re provided as optional tooling for management of Apache Cassandra:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/thelastpickle/cassandra-medusa" rel="noopener noreferrer"&gt;Medusa for Apache Cassandra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/thelastpickle/cassandra-reaper" rel="noopener noreferrer"&gt;Reaper for Apache Cassandra&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The K8ssandra repository itself has a few important folders to take note of.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Charts&lt;/strong&gt; - Helm-based charts, categorized by sub-chart.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docs&lt;/strong&gt; - layouts, content, etc. that drives &lt;a href="https://bit.ly/3rWG9m8" rel="noopener noreferrer"&gt;k8ssandra.io&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/k8ssandra/k8ssandra/tree/main/docs" rel="noopener noreferrer"&gt;docs readme&lt;/a&gt; for more detail.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scripts&lt;/strong&gt; - a collection of useful scripts for working with K8ssandra that you can use or extend. Also included are documentation scripts for K8ssandra docs management.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tests - unit, integration, and end-to-end testing for K8ssandra.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Running tests&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The K8ssandra test directory contains subdirectories for managing and executing tests at the unit and integration levels. Let’s run the unit tests as an example. Using the command line, navigate to the K8ssandra project root directory where the Makefile resides.&lt;/p&gt;

&lt;p&gt;Issue the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
make unit-test&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once complete, you should see something like the following:&lt;/p&gt;

&lt;p&gt;ok github.com/k8ssandra/k8ssandra/tests/unit 47.156s&lt;/p&gt;

&lt;p&gt;Feel free to explore the K8ssandra &lt;a href="https://github.com/k8ssandra/k8ssandra/blob/main/Makefile" rel="noopener noreferrer"&gt;Makefile&lt;/a&gt; for other recipes that can be targeted.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Maintainer tips and tricks&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The K8ssandra maintainer team has developed a set of common knowledge and best practices that we wanted to share with you. Think of it as a starting point for learning and growing with K8ssandra. This will enable you to become more comfortable with contributing to the project and/or utilizing K8sssandra to deploy your own applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Make testing a priority&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The K8ssandra maintainers have created test foundations for unit and integration tests with the goal of aligning with Kubernetes developer practices. As you continue to customize and/or expand the K8ssandra ecosystem, it’s recommended to include verifications at all levels.&lt;/p&gt;

&lt;p&gt;The K8ssandra project creates separation between the tests themselves and the supporting test data. The illustration below shows sample unit tests written in Go, with their supporting test data files.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Unit test artifacts with test data files&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8y0ogvdpy941zhpmr2pp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8y0ogvdpy941zhpmr2pp.png" alt="image" width="269" height="463"&gt;&lt;/a&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F956d0i45fczdce80t9e9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F956d0i45fczdce80t9e9.png" alt="image" width="263" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Watch for the expansion of testing practices as K8ssandra continues to grow!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Visually inspect your Kubernetes environment&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For a more visual way to obtain an overview of the resources and components in a Kubernetes cluster, consider using a free Kubernetes IDE like &lt;a href="https://k8slens.dev/" rel="noopener noreferrer"&gt;Lens&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Here’s an example of what it looks like to view your K8ssandra pods, deployments, jobs, and other Kubernetes objects using the Lens UI. The tool has support for Windows, Linux, and MacOS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86fh3c0y3qcjg70ajf2q.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86fh3c0y3qcjg70ajf2q.PNG" alt="image" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A UI can be great for some users, but there will be times when only a command line will be required or needed. That’s why tips related to Kubernetes command-line usage specific to K8ssandra are included below.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Commands to collect useful information&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you have an error after editing a K8ssandra configuration, or you just want to inspect resources as you learn, there are many useful commands that can save you lots of time.&lt;/p&gt;

&lt;p&gt;The tips are written to use the &lt;em&gt;k8ssandra&lt;/em&gt; namespace, but this can be easily adjusted as needed for your own usage.&lt;/p&gt;

&lt;p&gt;The shorthand -n is used in the examples in place of the full --namespace designation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: it is possible you may experience a “missing in charts/ directory” error message, when issuing some of the commands. To prevent this error, utilize the K8ssandra script ./scripts/update-helm-deps.sh. The script assists with ensuring charts are updated in the appropriate order.&lt;/p&gt;

&lt;p&gt;Let’s get started with some useful commands for looking at important K8ssandra logs.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Log related commands&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;➠ View &lt;a href="https://github.com/k8ssandra/management-api-for-apache-cassandra" rel="noopener noreferrer"&gt;Management-api&lt;/a&gt; logs. Replace cassandra-pod with an actual pod instance name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl logs cassandra-pod -c cassandra -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The Management-api is a service layer that attempts to build a well supported set of operational actions on Apache Cassandra nodes. This service shares the same container as Apache Cassandra and runs as process ID 1 (as an init process).&lt;/p&gt;

&lt;p&gt;➠ View &lt;a href="https://cassandra.apache.org/" rel="noopener noreferrer"&gt;Apache Cassandra&lt;/a&gt; logs. Replace cassandra-pod with an actual pod instance name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl logs cassandra-pod -c server-system-logger -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;➠ View &lt;a href="https://github.com/thelastpickle/cassandra-medusa" rel="noopener noreferrer"&gt;Medusa&lt;/a&gt; logs. Replace cassandra-pod with an actual pod instance name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl logs cassandra-pod -c medusa -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;See also kubectl documentation describing the &lt;a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#logs" rel="noopener noreferrer"&gt;logs command&lt;/a&gt; in more detail.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Pod &amp;amp; Cassandra Datacenter related commands&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;➠ Collect a bird’s eye view of the K8ssandra namespaced pods.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl get pods -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example: A summarized version of the output.&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
NAME&lt;/p&gt;

&lt;p&gt;k8ssandra-cass-operator-64db8585d7-kqhmf&lt;br&gt;
k8ssandra-dc1-default-sts-0&lt;br&gt;
k8ssandra-dc1-stargate-74558b9d76-hswj9&lt;br&gt;
k8ssandra-grafana-575dfb8f98-94j2n&lt;br&gt;
k8ssandra-kube-prometheus-operator-7dcccdcc86-sxsxz&lt;br&gt;
k8ssandra-reaper-7bb77d575c-6bpng&lt;br&gt;
k8ssandra-reaper-operator-6c9c4576d5-kpjfb&lt;br&gt;
k8ssandra-reaper-schema-w5x8n&lt;br&gt;
prometheus-k8ssandra-kube-prometheus-prometheus-0&lt;br&gt;
traefik-57d7955dcc-dgm7z&lt;br&gt;
&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;Another variation with the -o wide option provides details of IP and node, which is super helpful when you need to trace a pod back to a node or require IP details for network troubleshooting.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl get pods -n k8ssandra -o wide&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;➠ Gather container information for a pod.&lt;/p&gt;

&lt;p&gt;First, list out the pods scoped to the K8ssandra namespace and instance with a target release.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl get pods -l app.kubernetes.io/instance=release-name -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you don't know the release name, look it up with a common Helm command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
helm list -n k8ssandra -o yaml&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example: output of the releases in YAML format.&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;app_version: ""
chart: k8ssandra-1.0.0
name: k8ssandra
namespace: k8ssandra
revision: "1"
status: deployed
updated: 2021-04-01 10:46:23.1836929 -0500 CDT&lt;/li&gt;
&lt;li&gt;app_version: 2.4.8
chart: traefik-9.18.1
name: traefik
namespace: k8ssandra
revision: "1"
status: deployed
updated: 2021-04-01 10:46:07.048129 -0500 CDT
&lt;code&gt;&lt;/code&gt;`&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next, targeting a specific pod, filtering out container-specific information. Replace pod-name with the target pod of interest.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl describe pod/pod-name -n k8ssandra | grep container -C 1&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;: describe with output returning one line above, and one line below the word being grepped.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl describe pod/k8ssandra-dc1-default-sts-0 &lt;br&gt;
-n k8ssandra | grep container -C 1&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;server-config-init:&lt;/strong&gt;&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
Container ID: containerd://eceb37bacb91b261dc7dc7ae03852a7d5a5c2e2181a4bf613aec68d72b0b8cdc &lt;br&gt;
Image: datastax/cass-config-builder:1.0.3&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;&lt;/code&gt;`
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;jmx-credentials:&lt;/strong&gt;&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
Container ID: containerd://084fa60db282be00c79970f4cb32dc5397e56ac7a6044313634e8481a3ecc55b &lt;br&gt;
Image: busybox&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;&lt;/code&gt;`
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;cassandra:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Container ID: containerd://3dbc4ebaa07e08139360c8321f1c3986d001896c087564595207e63fb6f6c740 Image: datastax/cassandra-mgmtapi-3_11_10:v0.1.22&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;server-system-logger:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;`&lt;br&gt;
Container ID: containerd://4420cc9591aa683490478846dd278ed050e1cdf1832f597948494fa93aab56de &lt;br&gt;
Image: busybox:1.32.0-uclibc&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;➠ A slight variation, get pods having a label for a Cassandra cluster.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl get pods -l cassandra.datastax.com/cluster=release-name -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, using one of the pod names returned, describe the pod details.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl describe pod/pod-name -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;➠ Describe the CassandraDatacenter resource. This provides a wealth of information about the resource, which includes aged events with detail to assist when trying to troubleshoot an issue.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
kubectl describe cassandradatacenter/dc1 -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Example: includes a sample of the output provided.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
Name: dc1&lt;br&gt;
Namespace: k8ssandra&lt;br&gt;
Labels: app.kubernetes.io/instance=k8ssandra&lt;br&gt;
app.kubernetes.io/managed-by=Helm&lt;br&gt;
app.kubernetes.io/name=k8ssandra&lt;br&gt;
app.kubernetes.io/part-of=k8ssandra-k8ssandra-k8ssandra&lt;br&gt;
helm.sh/chart=k8ssandra-1.0.0&lt;br&gt;
Annotations: meta.helm.sh/release-name: k8ssandra&lt;br&gt;
meta.helm.sh/release-namespace: k8ssandra&lt;br&gt;
reaper.cassandra-reaper.io/instance: k8ssandra-reaper&lt;br&gt;
API Version: cassandra.datastax.com/v1beta1&lt;br&gt;
Kind: CassandraDatacenter&lt;br&gt;
Metadata:&lt;br&gt;
Creation Timestamp: 2021-04-01T15:46:35Z&lt;br&gt;
Finalizers:&lt;br&gt;
finalizer.cassandra.datastax.com&lt;br&gt;
Generation: 2&lt;br&gt;
Managed Fields:&lt;br&gt;
API Version: cassandra.datastax.com/v1beta1&lt;br&gt;
Fields Type: FieldsV1&lt;br&gt;
fieldsV1:&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;...&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Helm commands&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;➠ Determine what K8ssandra chart version you have deployed. This is helpful when diagnosing a problem or looking for new features in releases of K8ssandra. Helm, like kubectl, also allows for a shorthand specification of a namespace using -n.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
helm list -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;➠ Determine what configurations have been applied. That is, a full picture of the current K8ssandra configuration for a scoped release. Look out, it returns lots of content!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
helm get all k8ssandra -n k8ssandra&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It’s advisable to add some filtering to this output, based on what resource you are trying to locate.&lt;/p&gt;

&lt;p&gt;Example: locating information around Stargate configurations.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`&lt;br&gt;
helm get all k8ssandra -n k8ssandra | grep stargate -C 2&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Summing up&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We’ve covered a lot in this post, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installing an editor supporting K8ssandra development&lt;/li&gt;
&lt;li&gt;Installing the Go and Git binaries needed for K8ssandra development&lt;/li&gt;
&lt;li&gt;Setting up a GitHub account and forking the K8ssandra repository&lt;/li&gt;
&lt;li&gt;An overview of the project structure and K8ssandra file types&lt;/li&gt;
&lt;li&gt;Running K8ssandra unit tests&lt;/li&gt;
&lt;li&gt;Tips and tricks from K8ssandra maintainers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Completing the activities and understanding the information in this article prepares you to be productive doing K8ssandra development on your local machine. It will also provide you with a foundation for understanding upcoming K8ssandra deep dives.&lt;/p&gt;

&lt;p&gt;There are additional open source repositories that makeup the overall K8ssandra project. They all contribute to the overall functionality provided by K8ssandra. For more exploration, the primary repositories include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/k8ssandra/management-api-for-apache-cassandra" rel="noopener noreferrer"&gt;management-api-for-apache-cassandra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/k8ssandra/reaper-operator" rel="noopener noreferrer"&gt;reaper-operator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/k8ssandra/medusa-operator" rel="noopener noreferrer"&gt;medusa-operator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/k8ssandra/cass-operator" rel="noopener noreferrer"&gt;cass-operator&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Next steps&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Here are some recommended next steps for learning more about K8ssandra: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Examine the &lt;a href="https://docs.k8ssandra.io/roadmap/" rel="noopener noreferrer"&gt;roadmap&lt;/a&gt; to see where K8ssandra is headed.&lt;/li&gt;
&lt;li&gt;Contribute to K8ssandra; check out this &lt;a href="https://k8ssandra.io/docs/contribution-guidelines/" rel="noopener noreferrer"&gt;guide&lt;/a&gt; to get started.&lt;/li&gt;
&lt;li&gt;Explore K8ssandra deep-dives shared in the official &lt;a href="https://k8ssandra.io/blog/" rel="noopener noreferrer"&gt;K8ssandra blog&lt;/a&gt;, where everyone can learn and share.&lt;/li&gt;
&lt;li&gt;Get to know Apache Cassandra quickly and easily on &lt;a href="https://astra.dev/3ItFNxy" rel="noopener noreferrer"&gt;DataStax Astra DB's&lt;/a&gt; free tier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://bit.ly/3rWG9m8" rel="noopener noreferrer"&gt;K8ssandra.io&lt;/a&gt; has a wealth of detailed information for digging deeper into features available. This will assist with making the most of your Cassandra deployments in Kubernetes.&lt;/p&gt;

&lt;p&gt;Stay tuned for future K8ssandra articles to expand your knowledge and build on the foundation presented. Feel free to post &lt;strong&gt;questions and/or feedback&lt;/strong&gt; through the following channels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/k8ssandra" rel="noopener noreferrer"&gt;K8ssandra Twitter @k8ssandra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/k8ssandra/k8ssandra/issues" rel="noopener noreferrer"&gt;K8ssandra GitHub repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://community.datastax.com/topics/k8ssandra.html" rel="noopener noreferrer"&gt;K8ssandra DataStax Community&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
