标签:lob efault man vim git unity 必须 api href
vim my-app.yml
apiVersion: v1 # kubectl api-versions 查看支持的版本
# 类型,如:Pod | ReplicationController | Deployment | Service | Ingress
kind: Pod
metadata:
name: my-app # Kind 的名称
namespace: default # 命名空间
labels:
app: myapp # 标签
spec:
containers:
- name: nginx
image: habor-repo.com/library/nginx:v1
command:
- "/bin/sh"
- "-c"
- "sleep 5"
kubectl create -f my-app.yml # 创建pod
kubectl get pod
kubectl describe pod my-app # 查看描述信息
kubectl logs my-app # 查看pod日志
kubectl logs my-app -c nginx # 查看pod内的nginx容器的日志
kubectl delete pod my-app # 删除pod
kubectl get pod -o wide # 查看详情
# 查看帮助
kubectl explain pod
标签:lob efault man vim git unity 必须 api href
原文地址:https://www.cnblogs.com/bartggg/p/12996883.html