我有一个 Angular 应用程序,部署在 Kubernetes 上运行的 apache 容器上。我想为 pod 设置 active 和就绪探针,但我没有主意。任何帮助将不胜感激。
最佳答案
根据您提供的链接,您可以使用以下内容作为开始:
apiVersion: v1
kind: Pod
...
spec:
...
containers:
- name: ...
...
livenessProbe:
tcpSocket:
port: 80 # <-- live when your web server is running
initialDelaySeconds: 5 # <-- wait 5s before starting to probe
periodSeconds: 20 # <-- do this probe every 20 seconds
readinessProbe:
httpGet:
path: / # <-- ready to accept connection when your home page is serving
port: 80
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 3 # <-- must not fail > 3 probes
关于angular - 如何为 Angular 应用程序设计就绪性和活跃度探针,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71078419/