The use of 'startupProbe' in PODs

Hello, a question wanted to know in your what is the difference with the handling of the ‘startupProbe’ in the PODs, in relation to the execution of the ‘commands’. Here are 2 examples:

EXAMPLE#1:
apiVersion: v1
kind: Pod
metadata:
name: dummy01
spec:
containers:

  • name: busybox
    image: busybox:1.28
    command: [‘sh’, ‘-c’, ‘sleep 1000’]

EXAMPLE#2:
apiVersion: v1
kind: Pod
metadata:
name: dummy02
spec:
containers:

  • name: busybox
    image: busybox:1.28
    startupProbe:
    exec:
    command:
    - sh
    - -c
    - ‘sleep 1000’

Thank you.

  • startupProbe : Indicates whether the application within the container is started. All other probes are disabled if a startup probe is provided, until it succeeds. If the startup probe fails, the kubelet kills the container, and the container is subjected to its restart policy. If a Container does not provide a startup probe, the default state is Success .

For more information about how to set up a liveness, readiness, or startup probe, see Configure Liveness, Readiness and Startup Probes.