8 things to look out for when using k8s

8 things to look out for when using k8s

This short blog will walk through few things to take care of when using Kubernetes, just like the heading says.

Document your interaction with k8s:

When using Kubernetes you're definitely gonna face some issues as one doesn't simply use Kubernetes, alone. The CNCF landscape is huge and it's ideal to use other cloud-native tools with k8s. Just setting up the local environment for development is a long process that is worth documenting. Not to mention, you'll also face a lot of issues while using it. Documenting the important things will help you in the long run.

Use Automation:

The DRY principle is applicable in k8s as well. You might not want to do kubectl apply -f several times when you want to deploy dozens of clusters.

Familiarity with kubectl commands:

You won't need the CLI when you use tools like Rancher. But knowing how things work under the hood always helps. Also, GUI tools won't be there for you all the time. What if the web UI isn't available? That's when your kubectl knowledge will help you ;)

kubectl is a command-line tool used to interact with Kubernetes

Local development:

If you want to quickly deploy your app to see if everything is working fine or not. You don't need to go through the entire lengthy CI/CD procedure. Tools like kind and minikube can be employed in such situations.

Do not use :latest tags:

Let's say you're working with the latest image of an XYZ library and successfully building and deploying your app. In the meantime, a newer version of that library is released and the next time you deploy your app the base image is rebuilt entirely and you cannot guarantee everything to work seamlessly. Because the newer version of that library might break something somewhere. Don't use the :latest tag in k8s deployments REMEMBER TO MENTION THE VERSION EXPLICITLY.

Use private registries:

If your company uses k8s for their workloads hosting the base images in a private registry. That way you'll have more control and you can also scan for vulnerabilities, enforce policies, add additional configurations, and whatnot. (using Harbor)

Use helm:

Users often have similar configuration YAML files for most of their deployments using helm saves you from doing repetitive tasks. I repeat a simple helm install --name sql-server stable/mssql-linux can save you from creating and managing multiple YAML config. files just to set up an SQL server.

Follow:

Follow @saiyampathak, @anaisurlichs, and @njuchi especially in their YouTube channels where they advocate about different CNCF projects. As, I said earlier one doesn't simply use Kubernetes, alone there are hecka lot of tools that you don't know exist and can help you significantly.

Aaaaand, that's a wrap! Thanks for reading and don't forget to mention your feedback below as this is my first blog and k8s is a new thing for me (I'm very skeptical that I must have added a few misinforms here.)

Special thanks to @wurstsalat I was inspired to write a blog out of his talk @ Kubecon: How NOT to Start with Kubernetes, they are a very wonderful person go smash that follow button.