CKA – Kubernetes命令和Docker命令的区别

以下是k8s和docker命令的区别

使用案例

  1. 使用run命令创建两个nginx的pod , nginx01 和 nginx02
kubectl run nginx01 --image=nginx
kubectl run nginx02 --image=nginx

2. 使用 get pods 查看创建的pod 列表,外加-o wide 可以看到列表更广的信息
注意:所有的列表都能加上-o wide

kubectl get pods -o wide

3. 使用 describe node 查看node内是否部署着nginx pod

kubectl get nodes
kubectl describe node minikube 

Loading

Facebook评论