4.5. Startup probes


Startup probes verify whether a service has started successfully, helping to reduce cold start times for containers with slow startup processes. Startup probes run only during the container’s initialization phase and do not execute periodically. If a startup probe fails, the container adheres to the defined restartPolicy.

4.5.1. Progress deadline

By default, services have a progress deadline that defines the time limit for a service to complete its initial startup. When using startup probes, ensure that the progress deadline is set to exceed the maximum time required by the startup probes. If the progress deadline is set too low, the startup probes might not finish before the deadline is reached, which can prevent the service from starting.

Consider increasing the progress deadline if you encounter any of these conditions in your deployment:

  • The service image takes a long time to pull due to its size.
  • The service takes a long time to become READY because of initial cache priming.
  • The cluster relies on autoscaling to allocate resources for new pods.

4.5.2. Configuring startup probing

For OpenShift Serverless Serving, startup probes are not defined by default. You can define startup probes for your containers in your deployment configuration.

Procedure

  • Define startup probes for your service by modifying your deployment configuration. The following example shows a configuration with two containers:

    Example of defined starup probes

    apiVersion: serving.knative.dev/v1
    kind: Service
    # ...
    spec:
      template:
        spec:
           containers:
            - name: first-container
              image: <image>
              ports:
                - containerPort: 8080
              # ...
              startupProbe: 
    1
    
              httpGet:
                port: 8080
                path: "/"
            - name: second-container
              image: <image>
              # ...
              startupProbe: 
    2
    
              httpGet:
                port: 8081
                path: "/"

    1
    Startup probe of the first-container.
    2
    Startup probe of the second-container.

4.5.3. Configuring the progress deadline

You can configure progress deadline settings to specify the maximum time allowed for your deployment to progress before the system reports a failure for the Knative Revision. This time limit can be specified in seconds or minutes.

To configure the progress deadline effectively, consider the following parameters:

  • initialDelaySeconds
  • failureThreshold
  • periodSeconds
  • timeoutSeconds

If the initial scale is not achieved within the specified time limit, the Knative Autoscaler component scales the revision to 0, and the Knative service enters a terminal Failed state.

By default, the progress deadline is set to 600 seconds. This value is specified as a Golang time.Duration string and must be rounded to the nearest second.

Procedure

  • To configure the progress deadline setting, use an annotation in your deployment configuration.

    Example of progress deadline set to 60 seconds

    apiVersion: serving.knative.dev/v1
    kind: Service
    ...
    spec:
      template:
        metadata:
           annotations:
                serving.knative.dev/progress-deadline: "60s"
        spec:
            containers:
                - image: ghcr.io/knative/helloworld-go:latest

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동