Add TCP socket health check example (#3977)

* Add TCP socket health check example

* Add test case for pod-with-tcp-socket-healthcheck
This commit is contained in:
tompizmor
2017-06-05 22:50:29 +02:00
committed by Andrew Chen
parent 8d20ed8580
commit 9f2ecee260
4 changed files with 32 additions and 9 deletions
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
name: pod-with-tcp-socket-healthcheck
spec:
containers:
- name: redis
image: redis
# defines the health checking
livenessProbe:
# a TCP socket probe
tcpSocket:
port: 6379
# length of time to wait for a pod to initialize
# after pod startup, before applying health checking
initialDelaySeconds: 30
timeoutSeconds: 1
ports:
- containerPort: 6379