Kind
基础¶
安装¶
brew install kind
K8S Dashboard¶
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.0/aio/deploy/recommended.yaml
kubectl get pod -n kubernetes-dashboard
kubectl create clusterrolebinding default-admin --clusterrole cluster-admin --serviceaccount=default:default
token=$(kubectl get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='default')].data.token}"|base64 --decode)
echo $token
kubectl proxy
open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
操作¶
kind create cluster [--config <config.yaml>]
kind get clusters
kind get kubeconfig --name <cluster-name>
kubectl cluster-info --context <cluster-name>
kind delete cluster --name <cluster-name>
FAQ¶
Control groups¶
Ubuntu¶
# /etc/default/grub.d/70-cgroup-unified.cfg
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} systemd.unified_cgroup_hierarchy=1"
sudo update-grub
sudo reboot
docker info
Docker Desktop¶
# ~/Library/Group Containers/group.com.docker/settings.json
"deprecatedCgroupv1": true
网络配置¶
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: "192.168.205.4"
apiServerPort: 6443
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 8080
hostPort: 8080
listenAddress: "0.0.0.0"
protocol: tcp
资源¶
- Kind | Quick Start
Istio
| Kind- Skaffold
- GitHub | Kubernetes Dashboard
- How to Troubleshoot and Address Liveness / Readiness probe failure
- Understanding the Available condition of a Kubernetes deployment
- Runtime metrics
- 一篇搞懂容器技术的基石: cgroup
- 在 Ubuntu 裡面啓用 cgroups v2
- A visual guide on troubleshooting Kubernetes deployments
- KIND and Load Balancing with MetalLB on Mac
最后更新: September 10, 2023