【发布时间】:2019-12-27 07:33:52
【问题描述】:
我正在尝试修补部署,但我一直点击 deployment.extensions/velero not patched。
我尝试了以下几种不同的变体:
kubectl patch deployment velero -n velero -p '{"spec":{"containers":[{"env":[{"name":"AWS_CLUSTER_NAME","value":"test-cluster"}]}]}}'
我最初的 deployment.yaml 文件
apiVersion: apps/v1
kind: Deployment
metadata:
name: velero
labels:
app.kubernetes.io/name: velero
app.kubernetes.io/instance: velero
app.kubernetes.io/managed-by: Tiller
helm.sh/chart: velero-2.1.1
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: velero
app.kubernetes.io/name: velero
template:
metadata:
labels:
app.kubernetes.io/name: velero
app.kubernetes.io/instance: velero
app.kubernetes.io/managed-by: Tiller
helm.sh/chart: velero-2.1.1
spec:
restartPolicy: Always
serviceAccountName: velero-server
containers:
- name: velero
image: "gcr.io/heptio-images/velero:v1.0.0"
imagePullPolicy: IfNotPresent
command:
- /velero
args:
- server
volumeMounts:
- name: plugins
mountPath: /plugins
- name: cloud-credentials
mountPath: /credentials
- name: scratch
mountPath: /scratch
env:
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
- name: VELERO_SCRATCH_DIR
value: /scratch
volumes:
- name: cloud-credentials
secret:
secretName: cloud-credentials
- name: plugins
emptyDir: {}
- name: scratch
emptyDir: {}
我现在有点卡住了,担心我可能会以错误的方式解决这个问题。任何建议将不胜感激。
【问题讨论】:
标签: kubernetes yaml kubectl