DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Follow publication

kubectl cheat sheet

D
DevOps.dev
Published in
6 min readNov 30, 2024

--

Generated using meta.ai

To view a free version of this story click this link.

Let’s aim to distill the intricacies, that is kubectl, in this article. We will look into an explanation of the basic types of kubectl aspects, before delving into the various commands used and finally we can look at playgrounds where we can put our skills to the test.

A brief history of orchestration can be found in a previous article I have written. In essense Kubernetes acts as an orchestration system for containers. More details about orchestration are provided below.

Aspects of Kubernetes

Kubernetes, alternatively known as k8, is an orchestration system built on top of containerisation technologies such as docker. While there are competing proxy solutions such as the Docker Swarm, k8 is arguably a mainstay in the field. Container orchestration involves things like

  • load balancing
  • dynamic scaling which would other wise be harder tasks if done manually
  • dealing with programmes that have died and need to be respawned
  • deploying version upgrades to the programmes

By no means is the above list exhaustive, it is merely some of the more common features that users make use of.

For example, in Kubernetes one can can create what is called replicas, which essentially means multiple docker containers are able to run concurently. This can be scaled dynamically. If a docker container goes down a new docker container can automatically be spawned again.

What is a pod?

The pod is the basic unit of k8. Essentially a docker image (or any image really), can be used to run a container. That running container is encapsulated in a pod.

A pod in k8

A pod isn’t limited to a single running container. It can have multiple containers sometimes known as init containers or sidecars.

Bear in mind that the concept of statelessness and statefulness are important in K8. Stateless programmes are those that can be restarted with ease because they do not hold any…

--

--

Published in DevOps.dev

Devops.dev is a community of DevOps enthusiasts sharing insight, stories, and the latest development in the field.

Written by D

An aspiring Robotics Researcher. I am currently in my 4th year of undergraduate studies. I am working on optimising the ROS navigation packages. Follow 4 more!

No responses yet

Write a response