1.docker
2.kubernetes
查看资源
kubectl get pods --all-namespaces
kubectl get pods --namespace kube-system
查看资源详细信息
kubectl describe pod kubernetes-dashboard -n kube-system
查看日志
kubectl logs my_pod
执行命令
kubectl exec my_pod ls
查看集群
kubectl cluster-info
kubectl cluster-info dump
节点管理
kubectl cordon my-pad
kubectl uncordon my-pad
查看切换多集群
kubectl config get-contexts
kubectl config use-context docker-for-desktop
3.kubernetes-dashboard
使用对应的版本:https://github.com/kubernetes/dashboard/releases?after=v2.0.0-beta6
kubectl apply -f kubernetes-dashboard.yaml
kubectl create -f kubernetes-dashboard.yaml
kubectl delete -f kubernetes-dashboard.yaml
查看token
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep dasboard-admin | awk '{print $1}')