The Pod "nginx1" is invalid: spec.restartPolicy: Unsupported value: "IfNotPresent": supported values: "Always", "OnFailure", "Never"
时间: 2023-11-21 08:58:41 浏览: 292
分享:nginx.docx
这个错误提示是因为在Pod的spec中restartPolicy的值被设置为了不支持的值"IfNotPresent"。正确的值应该是"Always"、"OnFailure"或"Never"。你需要修改Pod的配置文件,将restartPolicy的值改为正确的值。例如,将restartPolicy设置为"Always",可以这样修改配置文件:
```yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx1
spec:
restartPolicy: Always
containers:
- name: nginx
image: nginx
```
阅读全文