Package k8s.io.api.core.v1

Index

ConfigMapEnvSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.

The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.

Fields
local_object_reference
(deprecated)

LocalObjectReference

This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead.

optional

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the ConfigMap must be defined

name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The ConfigMap to select from.

ConfigMapKeySelector

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Selects a key from a ConfigMap.

Fields
local_object_reference
(deprecated)

LocalObjectReference

This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead.

key

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The key to select.

optional

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the ConfigMap or its key must be defined

name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The ConfigMap to select from.

ConfigMapVolumeSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths.

Fields
name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Name of the config.

items[]

KeyToPath

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional.

default_mode

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

optional

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret or its keys must be defined.

Container

A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.

Fields
name

string

(Optional)

Name of the container specified as a DNS_LABEL.

image

string

Cloud Run fully managed: only supports containers from Google Container Registry

Cloud Run for Anthos: supported

URL of the Container image. More info: https://kubernetes.io/docs/concepts/containers/images

command[]

string

args[]

string

(Optional)

Cloud Run fully managed: supported

Cloud Run for Anthos: supported

Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

env[]

EnvVar

(Optional)

Cloud Run fully managed: supported

Cloud Run for Anthos: supported

List of environment variables to set in the container.

resources

ResourceRequirements

(Optional)

Cloud Run fully managed: supported

Cloud Run for Anthos: supported

Compute Resources required by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

working_dir

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.

ports[]

ContainerPort

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network.

env_from[]

EnvFromSource

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.

volume_mounts[]

VolumeMount

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Pod volumes to mount into the container's filesystem.

liveness_probe

Probe

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

readiness_probe

Probe

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

termination_message_path

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log.

termination_message_policy

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

image_pull_policy

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

security_context

SecurityContext

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

ContainerPort

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

ContainerPort represents a network port in a single container.

Fields
name

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

If specified, used to specify which protocol to use. Allowed values are "http1" and "h2c".

container_port

int32

(Optional)

Cloud Run fully managed: supported

Cloud Run for Anthos: supported

Port number the container listens on. This must be a valid port number, 0 < x < 65536.

protocol

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Protocol for port. Must be TCP. Defaults to "TCP".

EnvFromSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

EnvFromSource represents the source of a set of ConfigMaps

Fields
prefix

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.

config_map_ref

ConfigMapEnvSource

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The ConfigMap to select from

secret_ref

SecretEnvSource

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The Secret to select from

EnvVar

EnvVar represents an environment variable present in a Container.

Fields
name

string

Name of the environment variable. Must be a C_IDENTIFIER.

value

string

(Optional)

Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

value_from

EnvVarSource

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Source for the environment variable's value. Cannot be used if value is not empty.

EnvVarSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

EnvVarSource represents a source for the value of an EnvVar.

Fields
config_map_key_ref

ConfigMapKeySelector

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Selects a key of a ConfigMap.

secret_key_ref

SecretKeySelector

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Selects a key of a secret in the pod's namespace

ExecAction

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

ExecAction describes a "run in container" action.

Fields
command

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.

HTTPGetAction

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

HTTPGetAction describes an action based on HTTP Get requests.

Fields
path

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Path to access on the HTTP server.

host

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.

scheme

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Scheme to use for connecting to the host. Defaults to HTTP.

http_headers[]

HTTPHeader

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Custom headers to set in the request. HTTP allows repeated headers.

HTTPHeader

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

HTTPHeader describes a custom header to be used in HTTP probes

Fields
name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The header field name

value

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The header field value

Handler

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Handler defines a specific action that should be taken

Fields
exec

ExecAction

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

One and only one of the following should be specified. Exec specifies the action to take.

http_get

HTTPGetAction

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

HTTPGet specifies the http request to perform.

tcp_socket

TCPSocketAction

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported

IntOrString

IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.

Fields
type

int32

The type of the value.

int_val

int32

The int value.

str_val

string

The string value.

KeyToPath

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Maps a string key to a path within a volume.

Fields
key

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The key to project.

path

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.

mode

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

LocalObjectReference

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.

Fields
name

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

Probe

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

Fields
handler

Handler

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The action taken to determine the health of a container

initial_delay_seconds

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

timeout_seconds

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

period_seconds

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

success_threshold

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.

failure_threshold

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

ResourceRequirements

ResourceRequirements describes the compute resource requirements.

Fields
limits

map<string, string>

(Optional)

Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported value for CPU is '1'.

Cloud Run for Anthos: supported

Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

requests

map<string, string>

(Optional)

Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported value for CPU is '1'.

Cloud Run for Anthos: supported

Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

SecretEnvSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

SecretEnvSource selects a Secret to populate the environment variables with.

The contents of the target Secret's Data field will represent the key-value pairs as environment variables.

Fields
local_object_reference
(deprecated)

LocalObjectReference

This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead.

optional

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret must be defined

name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The Secret to select from.

SecretKeySelector

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

SecretKeySelector selects a key of a Secret.

Fields
local_object_reference
(deprecated)

LocalObjectReference

This field should not be used directly as it is meant to be inlined directly into the message. Use the "name" field instead.

key

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The key of the secret to select from. Must be a valid secret key.

optional

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret or its key must be defined

name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The name of the secret in the pod's namespace to select from.

SecretVolumeSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names.

Fields
secret_name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Name of the secret in the container's namespace to use.

items[]

KeyToPath

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional.

default_mode

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

optional

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Specify whether the Secret or its keys must be defined.

SecurityContext

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.

Fields
run_as_user

int32

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

TCPSocketAction

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

TCPSocketAction describes an action based on opening a socket

Fields
port

IntOrString

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

host

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Optional: Host name to connect to, defaults to the pod IP.

Volume

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Volume represents a named volume in a container.

Fields
name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Volume's name.

secret

SecretVolumeSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

config_map

ConfigMapVolumeSource

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

VolumeMount

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

VolumeMount describes a mounting of a Volume within a container.

Fields
name

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

This must match the Name of a Volume.

read_only

bool

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Only true is accepted. Defaults to true.

mount_path

string

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Path within the container at which the volume should be mounted. Must not contain ':'.

sub_path

string

(Optional)

Cloud Run fully managed: not supported

Cloud Run for Anthos: supported

Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).