k8s学习笔记-就绪检测

apiVersion: v1
kind: Pod
metadata:
  name: check-ready
  namespace: default
spec:
  containers:
  - name: check-ready-container
    image: httpd
    imagePullPolicy: IfNotPresent
    readinessProbe:
      httpGet:
        port: 80
        path: /index1.html
      initialDelaySeconds: 1  #容器启动1s后开始检测
      periodSeconds: 3  #每隔3s检测一次

检测/index1.html文件是否存在,存在即就绪,不存在容器虽然是running状态,但不就绪,不对外提供服务
k8s学习笔记-就绪检测
k8s学习笔记-就绪检测
k8s学习笔记-就绪检测
k8s学习笔记-就绪检测

猜你喜欢

转载自blog.51cto.com/11954248/2477632
今日推荐