Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubia
spec:
  replicas: 3
  template:
    metadata:
      name: kubia
      labels:
        app: kubia
    spec:
      containers:
      - image: luksa/kubia:v1
        name: nodejs
  selector:
    matchLabels:
      app: kubia

kubectl create -f . --record

kubectl rollout status deploy kubia // 查看滚动过程中的状态

kubectl rollout history deploy kubia// 查看滚动历史

Deployment

kubectl rollout undo deploy kubia --to-revision=1

kubectl rollout pause deploy kubia

kubectl rollout resume deploy kubia

上一篇:Kubernetes(k8s)的deployment资源


下一篇:k8s-YAML字段太多,记不住怎么办