apiVersion: v1 kind: Pod metadata: name: liveness-tcp namespace: default spec: containers: - name: liveness-tcp-container image: httpd imagePullPolicy: IfNotPresent livenessProbe: initialDelaySeconds: 5 timeoutSeconds: 10 tcpSocket: port: 8080 periodSeconds: 3
鏡像默認端口應該是80,可是yaml文件故意寫成8080,tcp檢測失敗,pod會反覆執行重啓操做知道檢測到80端口
api