Cheatsheet: Kubernetes Kind


- PDF Link: cheatsheet-kind-A4.pdf, Category: Cloud
- Blog URL: https://cheatsheet.dennyzhang.com/cheatsheet-kind-A4
- Related posts: Minikube CheatSheet, Kubernetes Yaml, #denny-cheatsheets
File me Issues or star this repo.
See more CheatSheets from Denny: #denny-cheatsheets
- Check kubernetes cheatsheet: https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-A4
1.1 Kind Basic
Name | Command |
---|---|
Kind | Kubernetes IN Docker – local clusters for testing Kubernetes |
Install kind | Install go and docker, then go get -u sigs.k8s.io/kind |
Check kind cli | which kind , kind version |
Reference | Minikube CheatSheet, Kubectl CheatSheet, Kubernetes Yaml |
1.2 Kind Command
Name | Command |
---|---|
List all kind clusters | kind get clusters |
Get kubeconfig for a given cluster | kind get kubeconfig-path --name $cluster-name |
List all nodes for a given cluster | kind get nodes --name $cluster_name |
Create kind cluster | kind create cluster --name clusterapi |
Create cluster with different version of k8s | kind create cluster --image=kindest/node:v1.15.0@sha256:XXX |
Delete kind cluster | kind delete cluster --name clusterapi |
Load docker image from host to nodes | kind load docker-image debian:9 |
1.3 Kind Conf
Name | Command |
---|---|
Conf files | /etc/kubernetes |
Services start conf files | /etc/kubernetes/manifests |
kube api server conf file | /etc/kubernetes/manifests/kube-apiserver.yaml |
1.4 Kind Serviceability
Name | Command |
---|---|
Restart kind clusters, after dockerd restarts | docker start kind-control-plane , GitHub: Cluster doesn’t restart when docker restarts |
1.5 Kind CLI Online Help
> kind version 0.3.0-alpha > kind --help kind creates and manages local Kubernetes clusters using Docker container 'nodes' Usage: kind [command] Available Commands: build Build one of [base-image, node-image] completion Output shell completion code for the specified shell (bash or zsh) create Creates one of [cluster] delete Deletes one of [cluster] export exports one of [logs] get Gets one of [clusters, nodes, kubeconfig-path] help Help about any command load Loads images into nodes version prints the kind CLI version Flags: -h, --help help for kind --loglevel string logrus log level [panic, fatal, error, warning, info, debug] (default "warning") --version version for kind Use "kind [command] --help" for more information about a command.
1.6 More Resources
License: Code is licensed under MIT License.