我通过了CKA的一个样本测试,有一个问题说:
“配置一个只运行LivenessProbe的true”
这是在一般问题中创建简单的nginx时,然后他们将其作为项目之一。这意味着什么,怎么做?
发布于 2022-07-04 08:14:41
...Configure a LivenessProbe which simply runs true...while creating simple nginx pod...
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx:alpine
name: nginx
ports:
- containerPort: 80
livenessProbe:
exec:
command: ["true"]true是一个返回零的命令。在这种情况下,它意味着探测不返回错误。或者,您可以用:command: ["ash","-c","nc -z localhost 80"]探测nginx。
https://stackoverflow.com/questions/72851800
复制相似问题