Interface PodSpecProps

    • Method Detail

      • getContainers

        @Stability(Stable)
        @Nullable
        default List<ContainerProps> getContainers()
        List of containers belonging to the pod.

        Containers cannot currently be added or removed. There must be at least one container in a Pod.

        You can add additionnal containers using podSpec.addContainer()

        Default: - No containers. Note that a pod spec must include at least one container.

      • getRestartPolicy

        @Stability(Stable)
        @Nullable
        default RestartPolicy getRestartPolicy()
        Restart policy for all containers within the pod.

        Default: RestartPolicy.ALWAYS

      • getServiceAccount

        @Stability(Stable)
        @Nullable
        default IServiceAccount getServiceAccount()
        A service account provides an identity for processes that run in a Pod.

        When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).

        Default: - No service account.

      • getVolumes

        @Stability(Stable)
        @Nullable
        default List<Volume> getVolumes()
        List of volumes that can be mounted by containers belonging to the pod.

        You can also add volumes later using podSpec.addVolume()

        Default: - No volumes.