Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes livenessProbe/ReadinesProbe部署问题_Kubernetes_Readinessprobe - Fatal编程技术网

Kubernetes livenessProbe/ReadinesProbe部署问题

Kubernetes livenessProbe/ReadinesProbe部署问题,kubernetes,readinessprobe,Kubernetes,Readinessprobe,我尝试用livenessProbe和readinessProbe应用我的pod。 问题是我得到了一个错误:after apply:kubectl apply-f test1.yaml 错误: The Pod "test1" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spe

我尝试用livenessProbe和readinessProbe应用我的pod。 问题是我得到了一个错误:after apply:kubectl apply-f test1.yaml

错误:

The Pod "test1" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)....

检查名为test1的pod是否已经运行,当您应用yaml时,Kubernetes认为您想要修改已经运行的pod,并且此操作只允许更改消息指示的特定字段。 要检查pod是否正在运行,请使用此命令进行检查

kubectl get pod test1 
然后删除pod并应用yaml

kubectl delete pod test1

kubectl apply -f xxxx

检查名为test1的pod是否已经运行,当您应用yaml时,Kubernetes认为您想要修改已经运行的pod,并且此操作只允许更改消息指示的特定字段。 要检查pod是否正在运行,请使用此命令进行检查

kubectl get pod test1 
然后删除pod并应用yaml

kubectl delete pod test1

kubectl apply -f xxxx