返回到文章

采纳

编辑于 3年前

如何强制Kubernetes重新拉动一个镜像?

kubernetes k8s

我的Kubernetes项目yaml如下:

apiVersion: v1
kind: ReplicationController
metadata:
  name: myapp
  labels:
    app: myapp
spec:
  replicas: 2
  selector:
    app: myapp
    deployment: initial
  template:
    metadata:
      labels:
        app: myapp
        deployment: initial
    spec:
      containers:
      - name: myapp
        image: kubebiz.com/myapp:5c3dda6b
        ports:
        - containerPort: 80
      imagePullPolicy: Always
      imagePullSecrets:
        - name: myregistry.com-registry-key

我执行

kubectl rolling-update myapp --image=us.gcr.io/project-107012/myapp:5c3dda6b

我执行了滚动更新,但不重新拉。为什么?