angular - 如何为 Angular 应用程序设计就绪性和活跃度探针

标签 angular apache kubernetes readinessprobe livenessprobe

我有一个 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/

相关文章:

angular - Mat-select 滚动不跳转到选定的 mat-option

angular - 如何在 Angular 组件中使用 ionicons?

angular - “md-card”不是 Material 2 中的已知元素

java - Apache nutch-2.2.1 执行出错

django - request.META 不包含从curl -H 传递的 header

javascript - 如何获取li标签内的属性值?

apache - 在 apache web 服务器后面的 tomcat 中检查对 Apache web 服务器的请求是否为 https

kubernetes - 无法将图表上传到ChartMuseum

kubernetes - 在端口 80 上访问 nginx ingress controller

kubernetes - 如何在 kubernetes 的 alertmanager pod 中安装 curl