Pod Template Configuration Guide

Quick Navigation

Getting Started:

Common Scenarios:

Troubleshooting:

Why Use Pod Templates?

When running Tekton Pipelines in production environments, you'll likely encounter scenarios where the default Pod configuration doesn't meet your needs:

Common Challenges:

  • Security Policy Requirements: Your organization's security policies require all containers to run as non-root users, but some Pipeline executions fail with permission errors.
  • Private Registry Access: Your Pipeline uses custom images from a private registry, but Pods fail to pull images due to missing credentials.
  • Resource Scheduling: You need build tasks to run on high-performance nodes with SSD storage, but Pods are scheduled to regular nodes, causing slow builds.
  • Multi-tenant Environments: Different teams need different security settings or node placements for their Pipelines.
  • Compliance Requirements: You must meet specific compliance standards (PCI DSS, HIPAA, etc.) that mandate certain Pod security configurations.

Without Pod Templates:

You would need to modify individual Task definitions or create multiple versions of the same Task with different configurations, leading to:

  • Configuration duplication and maintenance overhead
  • Difficulty enforcing consistent security policies
  • Unable to adapt community Tasks (like Tekton catalog Tasks) to your environment

How Pod Templates Solve These Problems:

Pod templates provide a flexible, multi-level configuration system that allows you to:

  • Set secure baseline configurations for all Pipelines in your cluster
  • Override configurations for specific Pipelines or Tasks when needed
  • Use official Tekton catalog Tasks while adapting them to your environment
  • Maintain separation between Task logic and execution environment configuration

What Are Pod Templates?

Pod templates are configuration fields that allow you to customize the Pod specifications for your Tekton TaskRuns and PipelineRuns. They define a portion of a PodSpec that Tekton uses to configure the Pods executing your Tasks and Pipelines.

Pod templates can be configured at different levels (global, per-pipeline, per-task), providing flexibility to apply configurations with varying scopes and priorities.

For detailed information about Pod template concepts and supported fields, see Pod Templates Concepts.

When to Use Pod Templates

Pod templates are useful in the following scenarios:

  • Security Requirements: Configure security contexts (e.g., runAsUser, fsGroup) to meet security policies
  • Private Registry Access: Configure image pull secrets for accessing private container registries
  • Node Scheduling: Configure node selectors, tolerations, or affinity rules to control Pod placement
  • Volumes: Add Pod volumes, such as an emptyDir cache, that Steps mount with volumeMounts. Pod templates have no CPU or memory field; set compute resources with computeResources on a Step, or with computeResources on the TaskRun or on a PipelineRun taskRunSpecs entry (beta fields, enabled when enable-api-fields is beta, the default).
  • Environment Variables: Set environment variables for Pipeline executions
  • Network Configuration: Configure DNS policies and network settings
  • Consistency: Ensure consistent execution environments across multiple Pipeline executions

Which Configuration Method to Choose

Use this decision guide to quickly determine which configuration method fits your needs:

ScenarioRecommended MethodWhy
One-off execution with special requirementsMethod 1: TaskRunApply to a single TaskRun only.
Testing a configuration before applying globallyMethod 1: TaskRunTest safely without affecting other executions.
One specific pipeline needs special configurationMethod 2: PipelineRunOverride for this pipeline only without affecting others.
Different tasks in the same pipeline need different configurationsMethod 3: TaskRunSpecsFine-grained control per task. Useful for mixed workloads (official + custom Tasks).
Set baseline configuration for all pipelines in the clusterMethod 4: Global (TektonConfig)Apply once, affects all executions. Good for security defaults, image pull secrets.

How to Configure Pod Templates

Pod templates can be configured at four different levels, each serving different purposes and having different scopes of impact.

Method 1: TaskRun Level Configuration

Configure Pod template directly in a TaskRun. This affects only the specific TaskRun execution.

Use Case: Apply specific configurations to individual TaskRun executions.

Configuration Location: spec.podTemplate in TaskRun

Example:

apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: build-task-run
spec:
  taskRef:
    name: build-task
  podTemplate:
    securityContext:
      runAsUser: 65532  # Can be modified as needed (e.g., 1000 for a custom user; for root, see Example 4)
      fsGroup: 65532
    nodeSelector:
      disktype: ssd

Method 2: PipelineRun Level Configuration

Configure Pod template at the PipelineRun level. This affects all Tasks within the PipelineRun unless overridden by taskRunSpecs.

Use Case: Apply consistent configurations to all Tasks in a Pipeline execution.

Configuration Location: spec.taskRunTemplate.podTemplate in PipelineRun

Example:

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: build-deploy-pipeline-run
spec:
  pipelineRef:
    name: build-deploy-pipeline
  taskRunTemplate:
    podTemplate:
      securityContext:
        runAsUser: 65532  # Can be modified as needed (for root, see Example 4)
        fsGroup: 65532
      nodeSelector:
        environment: production
      imagePullSecrets:
        - name: private-registry-secret

The run's imagePullSecrets list is written into each of its TaskRun Pods, so Kubernetes no longer adds the ServiceAccount's pull secrets to those Pods, and a global imagePullSecrets list from Method 4 is not used either. List every Secret that the run needs (see Example 2).

Method 3: PipelineRun TaskRunSpecs Configuration

Configure Pod template for specific Tasks within a PipelineRun. This allows fine-grained control over individual Tasks in a Pipeline.

Use Case: Apply different configurations to different Tasks within the same Pipeline execution.

Configuration Location: spec.taskRunSpecs[].podTemplate in PipelineRun

Example:

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: build-deploy-pipeline-run
spec:
  pipelineRef:
    name: build-deploy-pipeline
  taskRunSpecs:
    - pipelineTaskName: build
      podTemplate:
        nodeSelector:
          disktype: ssd
          performance: high
        tolerations:
          - key: "dedicated"
            operator: "Equal"
            value: "build"
            effect: "NoSchedule"
    - pipelineTaskName: deploy
      podTemplate:
        securityContext:
          runAsUser: 65532  # Use secure default for this task
          runAsNonRoot: true
          fsGroup: 65532
          fsGroupChangePolicy: "OnRootMismatch"
        nodeSelector:
          environment: production

Method 4: Global Default Configuration (TektonConfig)

Configure a global default Pod template that applies to all TaskRuns and PipelineRuns in the cluster.

Use Case: Apply consistent baseline configurations across all Pipeline executions in the cluster.

Configuration Location: spec.pipeline.default-pod-template in TektonConfig

Security Best Practice

It is recommended to use a non-root user (e.g., runAsUser: 65532) as the default configuration to follow the principle of least privilege. Official Tekton Tasks are designed to work with UID 65532. Only set runAsUser: 0 on the steps of specific Tasks when required by custom images or legacy applications (see Example 4).

Why UID 65532?

UID 65532 is the standard non-root user ID used by official Tekton Tasks and most Tekton catalog Tasks. This ID follows the principle of least privilege and is widely adopted in the Tekton ecosystem for security best practices.

fsGroup: Adds the group ID as a supplemental group to every container in the Pod; the primary group of the container process does not change. For volume types that support it, Kubernetes also changes the group ownership of the volume to this ID and sets the setgid bit, so new files created in the volume are owned by this group.

Steps:

Step 1

The change applies to every new TaskRun on the cluster. Read the default Pod template in effect and the value set in TektonConfig first, and save both outputs, so that you can keep the default's fields and restore it later:

kubectl get configmap -n tekton-pipelines config-defaults -o jsonpath='{.data.default-pod-template}'
kubectl get tektonconfig config -o jsonpath='{.spec.pipeline.default-pod-template}'

tekton-pipelines is the default of TektonConfig spec.targetNamespace; replace it in the commands if your installation uses another namespace.

Step 2

Save the spec.pipeline.default-pod-template configuration in a file, for example tektonconfig-pod-template.yaml. The value replaces the current default Pod template as a whole, so the sample keeps the shipped fsGroup: 65532 and fsGroupChangePolicy: "OnRootMismatch" next to runAsUser:

apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  pipeline:
    default-pod-template: |
      securityContext:
        runAsUser: 65532
        fsGroup: 65532
        fsGroupChangePolicy: "OnRootMismatch"
      imagePullSecrets:
        - name: private-registry-secret
WARNING

A cluster-wide imagePullSecrets list is written into every TaskRun Pod whose run does not set its own list, so Kubernetes no longer adds the ServiceAccount's pull secrets to those Pods. The named Secret must exist in every namespace that runs TaskRuns. To give a pull secret only to some runs, attach the pull secret to the ServiceAccount that those runs use, and leave imagePullSecrets out of the global template. A per-run list (see Example 2) also works, but it replaces the ServiceAccount's pull secrets in that run's Pods in the same way, so it must name every pull secret that the run needs.

Merge the file into the existing TektonConfig. A merge patch changes only the keys in the file and keeps the other fields of TektonConfig. It needs permission to patch TektonConfig, which is cluster-scoped, usually a cluster administrator:

kubectl patch tektonconfig config --type merge --patch-file tektonconfig-pod-template.yaml

Do not use kubectl apply -f for a file that holds only part of TektonConfig: a later kubectl apply -f of another partial file deletes the fields that this file set and the later file leaves out, such as this default-pod-template.

To undo the change later: if the saved TektonConfig output was empty, remove the field from TektonConfig; otherwise set the saved TektonConfig value again:

kubectl patch tektonconfig config --type json \
  -p '[{"op":"remove","path":"/spec/pipeline/default-pod-template"}]'

Step 3

Verify the configuration. The command prints the whole default Pod template, which must be the template that you set in Step 2:

kubectl get configmap -n tekton-pipelines config-defaults -o jsonpath='{.data.default-pod-template}'

Configuration Methods Comparison

MethodScopePriority LevelWhen to UseAdvantagesDisadvantages
Method 1: TaskRunSingle TaskRun executionMediumTesting, one-off executionsSafe, isolated, easy to testNeed to configure for each TaskRun
Method 2: PipelineRunAll tasks in one PipelineRunMediumPipeline-specific requirementsEasy to manage, applies to all tasks in pipelineMust specify for each PipelineRun
Method 3: TaskRunSpecsSpecific tasks within a PipelineRunHighestMixed workloads (official + custom Tasks)Fine-grained control per taskMore complex configuration
Method 4: Global (TektonConfig)All TaskRuns/PipelineRuns in clusterLowestBaseline security and defaultsSet once, affects all executionsGlobal impact, requires cluster permissions

Priority Rule: When the same field is configured at multiple levels, the configuration with the higher priority level takes effect. TaskRunSpecs (highest) > PipelineRun/TaskRun (medium) > Global (lowest). A field such as securityContext is replaced as a whole, not merged: a securityContext in a TaskRun Pod template drops every securityContext setting of the global default, including runAsNonRoot, so repeat the settings you still need. The default is the default-pod-template key of the config-defaults ConfigMap in tekton-pipelines (read it as in Step 1 of Method 4). The roles shipped with Tekton Pipelines let every authenticated user read only the pipelines-info ConfigMap in that namespace, so if you cannot read config-defaults, ask your cluster administrator for the default Pod template.

Configuration Priority

Pod template configurations follow a clear priority hierarchy. When multiple configurations exist for the same field, the higher priority configuration overrides the lower priority one.

Priority Order (Highest to Lowest):

  1. PipelineRun taskRunSpecs podTemplate - Highest priority, applies to specific tasks
  2. PipelineRun podTemplate or TaskRun podTemplate - Medium priority, applies to pipeline or task level
  3. Global default-pod-template - Lowest priority, applies to all executions

Merging Behavior:

  • Environment Variables: Merged by name; higher priority values override lower priority ones
  • Volumes: Merged by name; higher priority values override lower priority ones
  • Other Fields: Higher priority configuration completely replaces lower priority configuration

Example:

If you have:

  • Global config: runAsUser: 65532 (secure default)
  • PipelineRun config: runAsUser: 1000 (override for custom images)
  • TaskRunSpec config: runAsUser: 65532 (restore secure default for official Tasks)

The result will be:

  • Specific task (using official Task): runAsUser: 65532
  • Other tasks in the pipeline (using custom images): runAsUser: 1000

Configuration Examples

Scenario: Set a secure default configuration with non-root user for all Pipeline tasks. This is the recommended baseline configuration that follows security best practices.

Global Configuration:

apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  pipeline:
    default-pod-template: |
      securityContext:
        runAsUser: 65532
        runAsNonRoot: true
        fsGroup: 65532
        fsGroupChangePolicy: "OnRootMismatch"

Note: Official Tekton Tasks and catalog Tasks are designed to work with UID 65532. This configuration ensures all Pipeline executions run securely by default.

Before you merge it into TektonConfig with kubectl patch tektonconfig config --type merge --patch-file <file>, read and save the default Pod template in effect and the value set in TektonConfig, and keep any of the default's fields that you still need. To undo the change: if the saved TektonConfig output was empty, remove the field from TektonConfig; otherwise set the saved TektonConfig value again. These steps are shown in Method 4.

Example 2: Image Pull Secrets

Scenario: Configure image pull secrets for accessing private registries.

PipelineRun Configuration:

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: build-pipeline-run
spec:
  pipelineRef:
    name: build-pipeline
  taskRunTemplate:
    podTemplate:
      imagePullSecrets:
        - name: private-registry-secret
        - name: enterprise-registry-secret

The run's own imagePullSecrets list is written into each of its TaskRun Pods, so Kubernetes no longer adds the ServiceAccount's pull secrets to those Pods, and a global imagePullSecrets list from Method 4 is not used either. List every Secret that the run needs.

Example 3: Node Scheduling

Scenario: Run build tasks on high-performance nodes.

TaskRunSpecs Configuration:

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: build-deploy-pipeline-run
spec:
  pipelineRef:
    name: build-deploy-pipeline
  taskRunSpecs:
    - pipelineTaskName: build
      podTemplate:
        nodeSelector:
          disktype: ssd
          performance: high
        tolerations:
          - key: "dedicated"
            operator: "Equal"
            value: "build"
            effect: "NoSchedule"

Example 4: Override for Custom Images Requiring Root Access

Scenario: Your global default uses secure non-root user (65532), but you have a pipeline with custom images that require root access. Set runAsUser: 0 on the steps of the Task that needs root, and use TaskRunSpecs for that task's Pod template, while maintaining secure defaults for official Tasks.

With set-security-context: true, the default in Alauda DevOps Pipelines, Tekton starts its init containers (for example prepare) with runAsNonRoot: true and without runAsUser, so they run with the Pod-level runAsUser. A Pod-template runAsUser: 0 therefore makes the TaskRun fail (see Common Pitfalls); set runAsUser: 0 in the step securityContext instead. A namespace that enforces the restricted Pod Security Standard rejects the Pod of a step that runs as root (the TaskRun fails with PodAdmissionFailed), so use this example only in a namespace that does not enforce restricted; see Comply with Pod Security Restricted Standard.

Global Configuration (merge it into TektonConfig with kubectl patch tektonconfig config --type merge --patch-file <file>; read and save the current values first and undo the change as described in Method 4):

# Global baseline configuration (secure default)
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  pipeline:
    default-pod-template: |
      securityContext:
        runAsUser: 65532
        fsGroup: 65532
        fsGroupChangePolicy: "OnRootMismatch"
      imagePullSecrets:
        - name: default-registry-secret

Task Configuration (the Task that the custom-build pipeline task runs; replace the image with the custom image that needs root):

apiVersion: tekton.dev/v1
kind: Task
metadata:
  name: custom-build
spec:
  steps:
    - name: build
      image: docker.io/library/alpine:3
      securityContext:
        runAsUser: 0  # Only this step runs as root
      script: |
        #!/bin/sh
        id -u

PipelineRun Configuration (a separate object in the namespace of the run):

# Pipeline execution with selective overrides
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  name: mixed-workload-pipeline-run
spec:
  pipelineRef:
    name: build-deploy-pipeline
  taskRunSpecs:
    # Override ONLY for tasks whose steps set runAsUser: 0
    - pipelineTaskName: custom-build
      podTemplate:
        securityContext:
          # Replaces the global securityContext as a whole. Do not set a
          # Pod-level runAsNonRoot: true here: it would also apply to the
          # step that runs as root, and that step could not start
          fsGroup: 65532
          fsGroupChangePolicy: "OnRootMismatch"
    # Tasks using official Tekton catalog Tasks inherit the secure default (65532)
    # No override needed for 'git-clone', 'kaniko-build', etc.

The imagePullSecrets list in the global configuration above is written into every TaskRun Pod whose run does not set its own list, so Kubernetes no longer adds the ServiceAccount's pull secrets to those Pods, and default-registry-secret must exist in every namespace that runs TaskRuns (see the warning in Method 4).

With this Pod template, the step of custom-build runs as UID 0 and prints 0, while the init containers run as the non-root user of their images.

Best Practice: Only set runAsUser: 0 on the steps of specific Tasks that truly require root access. Let official Tekton Tasks use the secure default (65532).

Example 5: Using Official Tasks with Legacy Global Configuration

Scenario: You migrated from Alauda DevOps Tekton v3 to Alauda Container Platform Pipelines and set the global default-pod-template to runAsUser: 0 for backward compatibility with existing custom images. Now you want to use official Tekton catalog Tasks, which require runAsUser: 65532 and fsGroup: 65532.

With set-security-context: true, the default in Alauda DevOps Pipelines, this global value makes the TaskRuns that use it fail, those of the custom images included (see Common Pitfalls).

Solution: Remove runAsUser: 0 from the global configuration, and run only the steps of the custom-image Tasks as root, as in Example 4.

Current Global Configuration (set during migration):

apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  pipeline:
    default-pod-template: |
      securityContext:
        runAsUser: 0  # Legacy global setting for custom images

Read and save the current values first, then set the securityContext of the global configuration of Example 4 in TektonConfig as described in Method 4. Leave out the imagePullSecrets list of that example unless you want it for every TaskRun Pod (see the note under Example 4). Official Tasks then use the secure default without an override, and the custom-image Tasks set runAsUser: 0 on their steps, with the Pod template shown in Example 4 for their pipeline tasks.

Long-term Recommendation: Gradually update your custom images to support non-root users, then remove runAsUser: 0 from their steps.

Example 6: Temporary Override During Active Migration

Scenario: You are currently migrating from Alauda DevOps Tekton v3 to Alauda Container Platform Pipelines and your custom images are not yet updated to support non-root users. You need a temporary solution to run legacy pipelines while you update your images.

Context: Unlike Example 5 (where the global default still sets runAsUser: 0), this scenario is for users who:

  • Have a secure global default (runAsUser: 65532)
  • Are actively migrating legacy pipelines
  • Need temporary overrides while updating container images

Temporary Configuration: A PipelineRun-level Pod template with runAsUser: 0 makes the TaskRuns fail while set-security-context is true (see Common Pitfalls). Set runAsUser: 0 on the steps of the legacy Tasks that require root, and give their pipeline tasks a Pod template securityContext without runAsUser and runAsNonRoot, as in Example 4.

Migration Path:

  1. Short-term: Use these step settings for legacy pipelines that require root
  2. Medium-term: Update your custom container images to support non-root users (UID 65532)
  3. Long-term: Remove these overrides and rely on the secure global default

Important: This is a temporary workaround during active migration.

Important Considerations

Common Pitfalls

These are the most common issues users encounter. Review these before configuring Pod templates:

  1. ❌ Setting Global runAsUser to 0: Do not set runAsUser: 0 in the global default-pod-template. This violates security best practices and exposes all Pipeline executions to unnecessary risk. Always use runAsUser: 65532 as the global default. If you need root access, set runAsUser: 0 on the steps that need it, as in Example 4.

  2. ❌ Security Context Conflicts: A Pod template with runAsUser: 0, at any level, conflicts with the runAsNonRoot: true that Tekton sets on its init containers while set-security-context is true, the default. In a namespace that does not enforce the restricted Pod Security Standard, the TaskRun fails with CreateContainerConfigError, and the Pod events show Error: container's runAsUser breaks non-root policy (pod: "<pod-name>_<namespace>(<pod-uid>)", container: prepare). In a namespace that enforces restricted, the Pod is rejected at admission instead, and the TaskRun fails with PodAdmissionFailed. Remove runAsUser: 0 from the Pod template and set it on the steps that need root, as in Example 4.

  3. ❌ Configuration Priority Misunderstanding: Remember that higher-priority configurations override lower-priority ones:

    • TaskRunSpecs (highest) > PipelineRun/TaskRun (medium) > Global (lowest)
    • If a configuration doesn't take effect, check for overrides at higher priority levels.
  4. ❌ Global Configuration Impact: Be cautious when modifying global default-pod-template as it affects ALL Pipeline executions in the cluster. Test changes with TaskRun/PipelineRun first.

  5. ❌ YAML Formatting: When configuring default-pod-template in TektonConfig, use the pipe (|) character for proper YAML multiline string formatting:

    default-pod-template: |
      securityContext:
        runAsUser: 65532
        fsGroup: 65532
        fsGroupChangePolicy: "OnRootMismatch"

Configuration Scope and Timing

  • Global Configuration: Affects all TaskRuns and PipelineRuns created after the configuration is applied. It also reaches the TaskRuns that an already running PipelineRun creates after the change: they get every field of the new default that the PipelineRun did not store when it was created. Fields stored at creation, including those filled in from the previous default, keep their values, and existing Pods do not change.
  • TaskRun/PipelineRun Configuration: Affects only the specific execution.
  • Configuration Changes: Take effect immediately for new executions. No restart of Tekton components is required.

Permissions Required

  • Global Configuration: Requires cluster-level permissions to modify TektonConfig resource (typically cluster-admin or equivalent).
  • TaskRun/PipelineRun Configuration: Requires namespace-level permissions to create/modify TaskRun or PipelineRun resources.

Best Practices

  1. Follow Security Best Practices: Always use non-root user (runAsUser: 65532) as the global default. Official Tekton Tasks are designed to work with UID 65532. Only set runAsUser: 0 on the steps of specific Tasks that require root privileges.

  2. Start with Secure Global Defaults: Configure secure baseline settings in the global default-pod-template, and keep the shipped fsGroupChangePolicy:

    securityContext:
      runAsUser: 65532
      runAsNonRoot: true
      fsGroup: 65532
      fsGroupChangePolicy: "OnRootMismatch"

    Read and save the value in effect and the value set in TektonConfig before the change. To undo it: if the saved TektonConfig output was empty, remove the field from TektonConfig; otherwise set the saved TektonConfig value again; see Method 4.

  3. Override Selectively: When you have custom images requiring root access, set runAsUser: 0 ONLY on the steps of those Tasks, with a Pod template for their tasks that sets no runAsUser or runAsNonRoot, as in Example 4. Do not change the global default to runAsUser: 0.

  4. Use TaskRunSpecs for Fine-Grained Control: When different tasks in a pipeline require different security contexts (e.g., custom images vs. official Tasks), use taskRunSpecs to apply different configurations.

  5. Document Security Exceptions: Clearly document why specific tasks require root access (runAsUser: 0). Review these exceptions regularly to see if they can be eliminated.

  6. Test Configuration Changes: Test Pod template configuration changes in non-production environments before applying to production, especially security context changes.

Verification

After applying Pod template configurations, verify they are effective:

For Global Configuration

Check that the configuration is applied to the ConfigMap. The command prints the whole default Pod template, which must be the template that you set in TektonConfig:

# Check ConfigMap
kubectl get configmap -n tekton-pipelines config-defaults -o jsonpath='{.data.default-pod-template}'

On a default installation, where TektonConfig sets no default-pod-template, it prints the shipped template:

securityContext:
  fsGroup: 65532
  fsGroupChangePolicy: "OnRootMismatch"

For TaskRun/PipelineRun Configuration

Step 1: Find the Pod created by your TaskRun or PipelineRun

# For TaskRun
kubectl get pods -n <namespace> -l tekton.dev/taskRun=<taskrun-name>

# For PipelineRun (shows all Pods created by the PipelineRun)
kubectl get pods -n <namespace> -l tekton.dev/pipelineRun=<pipelinerun-name>

# Example output:
# NAME                                      READY   STATUS      RESTARTS   AGE
# build-task-run-pod                        0/1     Completed   0          2m

Step 2: Verify the Pod specification

# Check the Pod-level runAsUser
kubectl get pod -n <namespace> <pod-name> -o jsonpath='{.spec.securityContext.runAsUser}'
# Should output: 65532 (or your configured value)

# Check fsGroup
kubectl get pod -n <namespace> <pod-name> -o jsonpath='{.spec.securityContext.fsGroup}'
# Should output: 65532 (or your configured value)