이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 1. Troubleshooting RuntimeClass


Diagnose and resolve common build configuration errors related to RuntimeClass isolation. Identifying these issues ensures that builds run in the intended isolated environments and helps maintain cluster security.

1.1. Resolving build failures with RuntimeClassNameNotValid

If the runtimeClassName value violates DNS subdomain naming conventions, the Build or BuildRun status is set to RuntimeClassNameNotValid.

Procedure

  1. Run the following command to check the build status:

    $ oc get build buildah-build-kata -o jsonpath='{.status.reason}'
  2. To fix this issue, update the runtimeClassName to use only lowercase alphanumeric characters, dots (.), or hyphens (-), and ensure it begins and ends with an alphanumeric character.

    The following example output displays the invalid names:

runtimeClassName: My_Runtime!  # Invalid: uppercase, underscore, and special character
runtimeClassName: Kata         # Invalid: uppercase letter
runtimeClassName: -kata        # Invalid: starts with hyphen

+ The following example output displays the valid names:

runtimeClassName: kata              # Valid
runtimeClassName: gvisor.runsc      # Valid: contains dot
runtimeClassName: kata-containers   # Valid: contains hyphen

1.2. Resolving build pods in Pending state

When a build pod fails to schedule, examine the pod events for diagnostic details to identify the root cause.

Procedure

  1. Run the following command to examine the pod events:

    $ oc describe pod <build-pod-name>
  2. Identify any FailedScheduling events, which often result from the following scenarios:

    • The Build validation only checks string format, a name that is syntactically valid but refers to a missing RuntimeClass will fail during scheduling. Run the following command to verify the resource exists:

      $ oc get runtimeclass kata
    • The targeted nodes must have the Kata runtime properly installed. Confirm the KataConfig status and node readiness:

      $ oc get kataconfig -o yaml

      Check status.installationStatus to ensure the installation on worker nodes was successful.

    • The operator-managed kata runtimeClass applies a node-role.kubernetes.io/kata-oc: "" selector. If your build configuration defines additional selectors, they must intersect with the runtimeClass requirements. Verify node labels:

      $ oc get nodes --show-labels | grep kata

1.3. Resolve buildRun failures with BuildRunBuildFieldOverrideForbidden

The BuildRunBuildFieldOverrideForbidden error occurs if you try to set runtimeClassName on a BuildRun that has an embedded spec.build.spec rather than a reference to a named Build.

Procedure

  1. Run the following command to check the BuildRun status message:

    $ oc get buildrun <buildrun-name> -o jsonpath='{.status.conditions[0].message}'
  2. To resolve this issue, use one of the following methods:

    1. Define the runtimeClassName directly within the inline spec.build.spec block:

      apiVersion: shipwright.io/v1beta1
      kind: BuildRun
      spec:
        build:
          spec:
            # ... source and strategy fields ...
            runtimeClassName: kata
    2. Reference a standalone Build by name to use the override field:

      apiVersion: shipwright.io/v1beta1
      kind: BuildRun
      spec:
        build:
          name: buildah-build-kata
        runtimeClassName: kata

1.4. Resolving build pod failures with RuntimeClass not found error

If events report that the runtimeClass is missing, the operator setup might be incomplete.

Procedure

  1. Confirm the operator is active:

    $ oc get csv -n openshift-sandboxed-containers-operator
  2. Check the KataConfig installation status:

    $ oc get kataconfig -o jsonpath='{.items[0].status.installationStatus}'
  3. Ensure all worker nodes have completed the mandatory reboot process.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

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

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

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

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동