#chapter_3.8
apiVersion: v1
kind: Pod
metadata:
  name: pod-with-healthcheck
spec:
  containers:
  - name: nginx
    image: nginx
    ports:
    - containerPort: 80
    livenessProbe:
      tcpSocket:
        port: 80 #通过与容器内的localhost:80建立TCP连接进行健康检查
      initialDelaySeconds: 30
      timeoutSeconds: 1