Ensure readiness probe is configured

Error: Readiness probe is not configured

Bridgecrew Policy ID: BC_K8S_8
Checkov Check ID: CKV_K8S_9
Severity: LOW

Readiness probe is not configured

Description

Readiness Probe is a Kubernetes capability that enables teams to make their applications more reliable and robust. This probe regulates under what circumstances the pod should be taken out of the list of service endpoints so that it no longer responds to requests. In defined circumstances the probe can remove the pod from the list of available service endpoints.

Using the Readiness Probe ensures teams define what actions need to be taken to prevent failure and ensure recovery in case of unexpected errors.

Kubernetes.io Documentation

Fix - Buildtime

Kubernetes

Resource: Container
Field: readinessProbe (Optional)
The probe describes a health check to be performed against a container to determine whether it is ready for traffic or not.
Its configurations may include: exec, failureThreshold, httpGet, initialDelaySeconds, periodSeconds, successThreshold, tcpSocket and timeoutSeconds.

apiVersion: v1
kind: Pod
metadata:
  name: <name>
spec:
  containers:
  - name: <container name>
    image: <image>
+   readinessProbe:
      <Probe configurations>

Did this page help you?