k8s部署pod
apiversion: 版本
kind: 类型
metadata: 字面意识,元素信息,POD信息
name: POD名字
labels: 字母意识,标签
通过拓扑 label 进行副本调度
label的使用无非就是增删改查
还有个重要的标签namespace(命名空间)
zone: 可用区
版本: v1
spec: 详细信息
containers: 容器参数
通过yaml文件生成pod:
349 kubectl apply -f a.yaml
350 kubectl get pods
351 docker ps
352 kubectl get pods
354 kubectl get pod -n kube-system
355 kubectl get pod -n kube-system -o wide hello-pod
356 kubectl get pods
357 kubectl describe pod hello-pod #可以查看详细信息,部署在哪个POD,id
358 kubectl exec hello-pod -- ps x #查看所有进程
kubectl exec -it hello-pod --container hello-ctr sh #多container 的单哥container
ctrl + c