Kind

In order to quicly bring up a new kubernetes cluster in your local laptop, then you can use kind. Kind ( Kubernetes in Docker) Kind basically creates the nodes as a containers and create a kubernetes cluster https://kind.sigs.k8s.io/ https://github.com/kubernetes-sigs/kind brew install kind Deploying a Single node cluster kind create cluster docker images kindest/node <none> d372b674475a 3 months ago 1.1GB docker ps -a 3047fe4988f4 kindest/node:v1.21.1 "/usr/local/bin/entr…" 8 days ago Up 8 days 127.0.0.1:50941->6443/tcp kind-control-plane docker exec -it kind-control-plane sh # crictl ps -a CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID be7d88399e276 1a1f05a2cd7c2 8 days ago Running coredns 0 bb3eb2d8b0138 dc91af853f8d4 1a1f05a2cd7c2 8 days ago Running coredns 0 72e459f147b24 2bcbac91131f1 2b703ea309660 8 days ago Running local-path-provisioner 0 1b9b5b3329128 3787410dc6121 f37b7c809e5dc 8 days ago Running kindnet-cni 0 66b72ef1c9758 af1073c036c7b 4bbef4ca108cd 8 days ago Running kube-proxy 0 e254cfacdfb75 b29d7fa01b9ea 05b738aa1bc63 8 days ago Running etcd 0 4109caeae008c cb638fbd4988d 18e61c783b417 8 days ago Running kube-apiserver 0 f87bb12d4816e 181e0b63e3db1 0c6dccae49de8 8 days ago Running kube-controller-manager 0 0d00a01acb283 ccd3b21c436ec 8c783dd252088 8 days ago Running kube-scheduler 0 72a8570b0c0b2 kubectl get cluster-info ...

September 18, 2021 · 2 min · Kiran Chavala

Using crictl and nerdctl

With the removal docker as the default container runtime in kubernetes. When a situation arises where you need to debug the container application container You can use Crictl and Nerdctl and debug the issue quickly Crictl Install crictl VERSION="v1.22.0" wget https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz sudo tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin Create a endpoint configuration file (crictl.yaml) Example To interact with containerd runtime env cat /etc/crictl.yaml runtime-endpoint: unix:///run/containerd/containerd.sock image-endpoint: unix:///run/containerd/containerd.sock timeout: 2 debug: false pull-image-on-create: false To interact with docker runtime cat /etc/crictl.yaml runtime-endpoint: unix:///var/run/dockershim.sock image-endpoint: unix:///var/run/dockershim.sock timeout: 2 debug: false pull-image-on-create: false To interact with Crio runtime cat /etc/crictl.yaml runtime-endpoint: unix:///run/crio/crio.sock image-endpoint: unix:///run/crio/crio.sock timeout: 2 debug: false Execute the crictl commands Example: ...

August 23, 2021 · 2 min · Kiran Chavala

K9scli

k9s is an excellent cli tool to interact with the kubernetes clusters brew install derailed/k9s/k9s Ref: https://k9scli.io/topics/install/ https://k9scli.io/

August 26, 2020 · 1 min · Kiran Chavala

Installing k3s

K3s is light weight kubernetes distribution from Rancher https://gist.github.com/kiranchavala/71835ec52a2c5020a5e439345b57d744 Ref: https://k3s.io/ https://github.com/alexellis/k3sup

August 26, 2020 · 1 min · Kiran Chavala

Mergingkubeconfig

Merging kubeconfig files When you have multiple kubernetes clusters, manually entering to the kubectl config is time consuming and error prone Add the two config files to the env var export KUBECONFIG=/.kube/config:/Desktop/configFile2.yaml Review that you have two configurations in one view kubectl config view View the raw config and output to a new file kubectl config view –raw > test.yaml cp test.yaml .kube/config env you can unset the KUBECONFIG later on ...

August 25, 2020 · 1 min · Kiran Chavala

Installing Rancher

Rancher is a tool to manage your kubernetes cluster The installation steps are here https://gist.github.com/kiranchavala/893ec350dd55f9fb4747b602208bb4fc

August 25, 2020 · 1 min · Kiran Chavala

Installing kubernetes via kubeadm

The steps are here https://gist.github.com/kiranchavala/7e4cda9bff5e141bd7601c870191e051

August 19, 2020 · 1 min · Kiran Chavala