D73fY9.jpg
升级到1.16后需要调整下Deployment
正确的Deployment,让matchLabels 和template.metadata.lables完全比配不报错,例如:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
spec:
  selector:
    matchLabels:
      app: my-nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: my-nginx
    spec:
      containers:
      - name: my-nginx
        image: nginx
        ports:
        - containerPort: 80

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code