Kubernetes - Tools
Last Updated: 2023-03-24
Tools
- kubectl
- kubeadm: it cares only about bootstrapping, not about provisioning machines. Likewise, installing various nice-to-have addons, like the Kubernetes Dashboard, monitoring solutions, and cloud-specific addons, is not in scope. Used by other tools like minikube, kind, etc.
kubeadm init
to bootstrap a Kubernetes control-plane nodekubeadm join
to bootstrap a Kubernetes worker node and join it to the clusterkubeadm upgrade
to upgrade a Kubernetes cluster to a newer version; Perform the upgrade of etcd by default.
- kops
- kube-ps1: change bash prompt
export '$(kube-ps1)'$PS1
- kubens: work with namespaces
- k9s: https://k9scli.io/
- krew: a plugin manager, Extend
kubectl
with plugins. - The KUbernetes Test TooL (kuttl): https://kuttl.dev/
Provision Tools
- Metal3: to provision bare metal hosts. Metals -> OpenStack Ironic -> PXE
- The Metal3 baremetal operator watches for BareMetalHost (CRD) objects
- PXE (Preboot Execution Environment) boot: to install a fresh OS on new or malfunctioning computers. On the client side it requires only a PXE-capable network interface controller (NIC), for operating system booting, installation and deployment in data centers.
Lightweight versions
For local testing or environment with limited resources.
- k3s: not a full k8s, a stripped down / recompiled version; for edge and IoT.
- minikube: run a local k8s cluster.
- kind (Kubernetes in Docker): primarily designed for testing Kubernetes itself; kind uses Weave for CNI.
minikube vs kind vs k3s
- minikube: a node is a VM. spawning a VM that is essentially a single node K8s cluster.
- kind: a node is a docker container. Cluster into Docker containers, faster startup speed compared to spawning VM. Can load local images directly into the cluster instead of setting up a registry.
- k3s: running natively on the host. is a minified version of Kubernetes developed by Rancher Labs. By removing dispensable features (legacy, alpha, non-default, in-tree plugins) and using lightweight components (e.g. sqlite3 instead of etcd3)
kind
> docker exec -it kind-control-plane bash
[email protected]:/# ps auxf
you will see
kube-apiserver
,kube-scheduler
, etc- kind uses
containerd
as a CRI implementation to deal with Pods (and hence - containers). - There is no docker command or dockerd inside this container to list the images
lists all the images
$ crictl images
crictl
to any CRI runtime is what docker
command-line tool to the dockerd
daemon.
kind uses podman