Usage of ready Readiness Detection in K8s
Today, the editor will bring you an article about the use of ready readiness detection in K8s. The editor thinks it is very practical, so I will share it for you as a reference. Let's follow the editor and have a look.
ApiVersion: v1kind: Podmetadata: name: check-ready namespace: defaultspec: containers:-name: check-ready-container image: httpd imagePullPolicy: IfNotPresent readinessProbe: httpGet: port: 80 path: / index1.html initialDelaySeconds: 1 # Container starts testing after 1s startup periodSeconds: 3 # check every 3 seconds
Check whether the / index1.html file exists, it is ready to exist, and there is no container. Although the container is in running state, it is not ready and does not provide services.
More articles on related knowledge points:
The meaning of kubernetes field in K8s
K8s how to solve the deployment problem with node status of NotReady
After reading the above, have you mastered the use of ready readiness test in K8s? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!