The usage of tcp Survival Detection in K8s
This article mainly introduces in detail the use of tcp survival detection in k8s, the sample code in this article is very detailed, zero basis can also refer to this article, interested friends can refer to it.
apiVersion: v1kind: Podmetadata: name: liveness-tcp namespace: defaultspec: containers: - name: liveness-tcp-container image: httpd imagePullPolicy: IfNotPresent livenessProbe: initialDelaySeconds: 5 timeoutSeconds: 10 tcpSocket: port: 8080 periodSeconds: 3
The default port of the image should be 80, but the yaml file is deliberately written as 8080, tcp detection fails, pod will repeatedly restart until port 80 is detected.
After reading the above, do you know how to use tcp survival detection in k8s? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!