Skip to content

Latest commit

 

History

History
374 lines (259 loc) · 29.7 KB

File metadata and controls

374 lines (259 loc) · 29.7 KB

Kubernetes Objects

Name Type Description

Object Meta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

Name Type Description
annotations object Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
clusterName string The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.
creationTimestamp Time CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.

Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
deletionGracePeriodSeconds integer Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.
deletionTimestamp Time DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.

Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
finalizers array of string Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.
generateName string GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.

If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).

Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
generation integer A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
initializers Initializers An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.

When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.
labels object Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
name string Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names
namespace string Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.

Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
ownerReferences array of Owner Reference List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.
resourceVersion string An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.

Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
selfLink string SelfLink is a URL representing this object. Populated by the system. Read-only.
uid string UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.

Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids

Local Object Reference

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

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

Secret Reference

SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace

Name Type Description
name string Name is unique within a namespace to reference a secret resource.
namespace string Namespace defines the space within which the secret name must be unique.

Container

A single application container that you want to run within a pod.

Name Type Description
args array of string Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references ( V A R N A M E ) a r e e x p a n d e d u s i n g t h e c o n t a i n e r s e n v i r o n m e n t . I f a v a r i a b l e c a n n o t b e r e s o l v e d , t h e r e f e r e n c e i n t h e i n p u t s t r i n g w i l l b e u n c h a n g e d . T h e (VAR_NAME) syntax can be escaped with a double , i e : (VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
command array of string Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references ( V A R N A M E ) a r e e x p a n d e d u s i n g t h e c o n t a i n e r s e n v i r o n m e n t . I f a v a r i a b l e c a n n o t b e r e s o l v e d , t h e r e f e r e n c e i n t h e i n p u t s t r i n g w i l l b e u n c h a n g e d . T h e (VAR_NAME) syntax can be escaped with a double , i e : (VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
env array of Env Var List of environment variables to set in the container. Cannot be updated.
envFrom array of Env From Source 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.
image string Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
imagePullPolicy string Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
lifecycle Lifecycle Actions that the management system should take in response to container lifecycle events. Cannot be updated.
livenessProbe Probe Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
name string Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
ports array of Container Port 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. Cannot be updated.
readinessProbe Probe Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
resources Resource Requirements Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
securityContext Security Context 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/
stdin Boolean Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
stdinOnce Boolean Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
terminationMessagePath string Optional: 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. Cannot be updated.
terminationMessagePolicy string 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.
tty Boolean Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
volumeDevices array of Volume Device volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.
volumeMounts array of Volume Mount Pod volumes to mount into the container's filesystem. Cannot be updated.
workingDir string Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.

Security Context

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.

Name Type Description
allowPrivilegeEscalation Boolean AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN
capabilities Capabilities The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.
privileged Boolean Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
readOnlyRootFilesystem Boolean Whether this container has a read-only root filesystem. Default is false.
runAsNonRoot Boolean Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
runAsUser integer 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.
seLinuxOptions SE Linux Options The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.

Env Var

EnvVar represents an environment variable present in a Container.

Name Type Description
name string Name of the environment variable. Must be a C_IDENTIFIER.
value string Variable references ( V A R N A M E ) a r e e x p a n d e d u s i n g t h e p r e v i o u s d e f i n e d e n v i r o n m e n t v a r i a b l e s i n t h e c o n t a i n e r a n d a n y s e r v i c e e n v i r o n m e n t v a r i a b l e s . I f a v a r i a b l e c a n n o t b e r e s o l v e d , t h e r e f e r e n c e i n t h e i n p u t s t r i n g w i l l b e u n c h a n g e d . T h e (VAR_NAME) syntax can be escaped with a double , i e : (VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
valueFrom Env Var Source Source for the environment variable's value. Cannot be used if value is not empty.

Pod Security Context

PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.

Name Type Description
fsGroup integer A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:

1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----

If unset, the Kubelet will not modify the ownership and permissions of any volume.
runAsNonRoot Boolean Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
runAsUser integer The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
seLinuxOptions SE Linux Options The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
supplementalGroups array of integer A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.

Resource Requirements

ResourceRequirements describes the compute resource requirements.

Name Type Description
limits object Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
requests object 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. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

Volume Mount

VolumeMount describes a mounting of a Volume within a container.

Name Type Description
mountPath string Path within the container at which the volume should be mounted. Must not contain ':'.
mountPropagation string mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release.
name string This must match the Name of a Volume.
readOnly Boolean Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
subPath string Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).

Volume

Volume represents a named volume in a pod that may be accessed by any container in the pod.

Name Type Description
awsElasticBlockStore AWS Elastic Block Store Volume Source AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
azureDisk Azure Disk Volume Source AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
azureFile Azure File Volume Source AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
cephfs Ceph FS Volume Source CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
cinder Cinder Volume Source Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md
configMap Config Map Volume Source ConfigMap represents a configMap that should populate this volume
downwardAPI Downward API Volume Source DownwardAPI represents downward API about the pod that should populate this volume
emptyDir Empty Dir Volume Source EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
fc FC Volume Source FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
flexVolume Flex Volume Source FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
flocker Flocker Volume Source Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
gcePersistentDisk GCE Persistent Disk Volume Source GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
gitRepo Git Repo Volume Source GitRepo represents a git repository at a particular revision.
glusterfs Glusterfs Volume Source Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md
hostPath Host Path Volume Source HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
iscsi ISCSI Volume Source ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md
name string Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
nfs NFS Volume Source NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
persistentVolumeClaim Persistent Volume Claim Volume Source PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
photonPersistentDisk Photon Persistent Disk Volume Source PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
portworxVolume Portworx Volume Source PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
projected Projected Volume Source Items for all in one resources secrets, configmaps, and downward API
quobyte Quobyte Volume Source Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
rbd RBD Volume Source RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md
scaleIO Scale IO Volume Source ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
secret Secret Volume Source Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
storageos Storage OS Volume Source StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
vsphereVolume Vsphere Virtual Disk Volume Source VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine

Time

Name Type Description

Initializers

Name Type Description

Owner Reference

Name Type Description

Env Var

Name Type Description

Env From Source

Name Type Description

Lifecycle

Name Type Description

Probe

Name Type Description

Container Port

Name Type Description

Resource Requirements

Name Type Description

Security Context

Name Type Description

Volume Device

Name Type Description

Volume Mount

Name Type Description

Capabilities

Name Type Description

SE Linux Options

Name Type Description

Env Var Source

Name Type Description

AWS Elastic Block Store Volume Source

Name Type Description

Azure Disk Volume Source

Name Type Description

Azure File Volume Source

Name Type Description

Ceph FS Volume Source

Name Type Description

Cinder Volume Source

Name Type Description

Config Map Volume Source

Name Type Description

Downward API Volume Source

Name Type Description

Empty Dir Volume Source

Name Type Description

FC Volume Source

Name Type Description

Flex Volume Source

Name Type Description

Flocker Volume Source

Name Type Description

GCE Persistent Disk Volume Source

Name Type Description

Git Repo Volume Source

Name Type Description

Glusterfs Volume Source

Name Type Description

Host Path Volume Source

Name Type Description

ISCSI Volume Source

Name Type Description

NFS Volume Source

Name Type Description

Persistent Volume Claim Volume Source

Name Type Description

Photon Persistent Disk Volume Source

Name Type Description

Portworx Volume Source

Name Type Description

Projected Volume Source

Name Type Description

Quobyte Volume Source

Name Type Description

RBD Volume Source

Name Type Description

Scale IO Volume Source

Name Type Description

Secret Volume Source

Name Type Description

Storage OS Volume Source

Name Type Description

Vsphere Virtual Disk Volume Source

Name Type Description