Presentation of useful tools to develop with Kubernetes locally
-
Minikube : Run Kubernetes locally on Windows, Mac or Linux.
-
MicroK8S : A single package of k8s that installs on 42 flavours of Linux.
-
Kind : A tool for running local Kubernetes clusters using Docker container “nodes”.
-
kubeadm-dind-cluster : A Kubernetes multi-node test cluster based on kubeadm. DEPRECATED
- kubectx+kubens : Fast way to switch between clusters and namespaces
# Tip : easy merge kube config files and switch contexts
export KUBECONFIG=~/.kube/k1_config:~/.kube/k2_config:~/.kube/k3_config
kubectx
<3 contexts>
- kube-shell : An integrated shell for working with the Kubernetes CLI
- kube-prompt : An interactive kubernetes client featuring auto-complete
- K9S : A terminal UI to interact with your Kubernetes clusters
- kube-ps1 : Kubernetes prompt info for bash and zsh
- Stern : Multi pod and container log tailing
- Kail : Kubernetes log viewer
- KubeSpy : Tools for observing Kubernetes resources in real time
kubectl create ns gd
kubens gd
# In one shell (keep it displayed)
kubespy trace deploy gd/nginx-deployment
# In another shell
kubectl create -f https://k8s.io/examples/controllers/nginx-deployment.yaml
# Pod
kubespy status v1 Pod gd/nginx
kubectl create -f https://github.com/pulumi/kubespy/raw/master/examples/trivial-pulumi-example/yaml/nginx.yaml
# Service
kubespy trace service gd/nginx
kubectl create -f https://github.com/pulumi/kubespy/raw/master/examples/trivial-service-trace-example/yaml/nginx.yaml
- Kubectl plugins
- Krew : Package manager for "kubectl plugins"
- Plugins index
kubectl krew {search,info,install,upgrade,remove}
-
Examples :
kubectl view-utilization -h
kubectl get-all --only-scope=namespace --namespace=default
-
Arkade : helps you install kubernetes application with a single install command
- kubefwd : Bulk port forwarding Kubernetes services for local development
- Skaffolfd : Easy and Repeatable Kubernetes Development
- KSync
- Telepresence : Debug your Kubernetes service locally
- MirrorD : "remocal" = making remote services feel local
- Tilt : Manages local development instances for teams that deploy to Kubernetes
- KubeSquash
- Kompose (Conversion Matrix)
- K8S Dashboard
- Kube-ops-view : Read-only system dashboard for multiple K8s clusters
- K9S
- Octant
- Kubernetic
- k3x for k3d
- Portainer : Beta version for Kubernetes
- KubeNav
- Lens
- Okteto
kubereport () {
mkdir -p /tmp/kubereport-output
echo ""
echo "----------------------------------------------------------"
echo "Merging config files found in KUBECONFIG var..."
echo "----------------------------------------------------------"
echo $KUBECONFIG | sed 's/:/\n/g'
echo ""
echo "----------------------------------------------------------"
kubectl config view --flatten > ~/.kube/config
echo "Generating report..."
echo "----------------------------------------------------------"
docker pull hjacobs/kube-resource-report
docker run -it --net=host -v ~/.kube/:/root/.kube/ -v /tmp/output:/output hjacobs/kube-resource-report /output
echo ""
echo "----------------------------------------------------------"
echo "Opening report..."
echo "----------------------------------------------------------"
xdg-open /tmp/output/index.html &
}
-
Comics
https://garden.slides.com/ellenkorbes/k8sdevtools?token=t3egVfZS#/38
https://ostechnix.com/kubernetes-features/
https://github.com/medmouine/Kubernetes-autoscaling-poster/blob/main/k8s-auto-scaling-poster.pdf