diff --git a/.gitignore b/.gitignore index 98cc7be36c..e6b90d450d 100644 --- a/.gitignore +++ b/.gitignore @@ -67,13 +67,13 @@ dist/ /docs/reference/cdk8s/java.md /docs/reference/cdk8s/typescript.md /docs/reference/cdk8s/python.md +/docs/reference/cdk8s-plus-30/java.md +/docs/reference/cdk8s-plus-30/typescript.md +/docs/reference/cdk8s-plus-30/python.md /docs/reference/cdk8s-plus-29/java.md /docs/reference/cdk8s-plus-29/typescript.md /docs/reference/cdk8s-plus-29/python.md /docs/reference/cdk8s-plus-28/java.md /docs/reference/cdk8s-plus-28/typescript.md /docs/reference/cdk8s-plus-28/python.md -/docs/reference/cdk8s-plus-27/java.md -/docs/reference/cdk8s-plus-27/typescript.md -/docs/reference/cdk8s-plus-27/python.md !/.projenrc.ts diff --git a/.projen/deps.json b/.projen/deps.json index 0d87b2c830..f4fa1a066f 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -32,15 +32,15 @@ "type": "build" }, { - "name": "cdk8s-plus-27", + "name": "cdk8s-plus-28", "type": "build" }, { - "name": "cdk8s-plus-28", + "name": "cdk8s-plus-29", "type": "build" }, { - "name": "cdk8s-plus-29", + "name": "cdk8s-plus-30", "type": "build" }, { diff --git a/.projen/tasks.json b/.projen/tasks.json index c88c9ad0da..9e0233978b 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -137,7 +137,7 @@ "name": "rotate-cdk8s-plus", "steps": [ { - "exec": "ts-node src/rotate-cdk8s-plus.ts 29" + "exec": "ts-node src/rotate-cdk8s-plus.ts 30" } ] }, @@ -206,13 +206,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev --filter=@types/jest,cdk8s,cdk8s-cli,cdk8s-plus-27,cdk8s-plus-28,cdk8s-plus-29,eslint-import-resolver-typescript,eslint-plugin-import,jest,lerna,semver,ts-jest,ts-node" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev --filter=@types/jest,cdk8s,cdk8s-cli,cdk8s-plus-28,cdk8s-plus-29,cdk8s-plus-30,eslint-import-resolver-typescript,eslint-plugin-import,jest,lerna,semver,ts-jest,ts-node" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser cdk8s cdk8s-cli cdk8s-plus-27 cdk8s-plus-28 cdk8s-plus-29 constructs eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit lerna semver ts-jest ts-node" + "exec": "yarn upgrade @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser cdk8s cdk8s-cli cdk8s-plus-28 cdk8s-plus-29 cdk8s-plus-30 constructs eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit lerna semver ts-jest ts-node" }, { "exec": "npx projen" diff --git a/docs/basics/api-object.md b/docs/basics/api-object.md index f035074ab3..15a88d9f8b 100644 --- a/docs/basics/api-object.md +++ b/docs/basics/api-object.md @@ -20,7 +20,7 @@ For example, the following code: ```ts import { App, Chart } from 'cdk8s'; -import * as kplus from 'cdk8s-plus-29'; +import * as kplus from 'cdk8s-plus-30'; const app = new App(); const chart = new MyChart(app, 'my-chart'); diff --git a/docs/basics/escape-hatches.md b/docs/basics/escape-hatches.md index ab6ea77c3f..6d38535af8 100644 --- a/docs/basics/escape-hatches.md +++ b/docs/basics/escape-hatches.md @@ -51,7 +51,7 @@ To do that, you will need to "peak" into the construct tree and find the underly API object, so you can apply the patch to it: ```ts -import { Pod } from 'cdk8s-plus-29'; +import { Pod } from 'cdk8s-plus-30'; import { ApiObject } from 'cdk8s'; const pod = new Pod(...); diff --git a/docs/plus/.pages b/docs/plus/.pages index f2c89185a9..7ba3e21a5e 100644 --- a/docs/plus/.pages +++ b/docs/plus/.pages @@ -1,5 +1,5 @@ nav: - index.md - - cdk8s-plus-27: cdk8s-plus-27 - cdk8s-plus-28: cdk8s-plus-28 - cdk8s-plus-29: cdk8s-plus-29 + - cdk8s-plus-30: cdk8s-plus-30 diff --git a/docs/plus/index.md b/docs/plus/index.md index 1c49576200..6a80fdb692 100644 --- a/docs/plus/index.md +++ b/docs/plus/index.md @@ -59,7 +59,7 @@ manifests. ## At a glance ```typescript -import * as kplus from 'cdk8s-plus-29'; +import * as kplus from 'cdk8s-plus-30'; import * as cdk8s from 'cdk8s'; import * as path from 'path'; @@ -177,10 +177,10 @@ app.synth(); === "TypeScript" - `❯ npm install cdk8s-plus-29 cdk8s constructs` + `❯ npm install cdk8s-plus-30 cdk8s constructs` ```typescript - import * as kplus from 'cdk8s-plus-29'; + import * as kplus from 'cdk8s-plus-30'; import * as cdk8s from 'cdk8s'; const app = new cdk8s.App(); @@ -198,10 +198,10 @@ app.synth(); === "JavaScript" - `❯ npm install cdk8s-plus-29 cdk8s constructs` + `❯ npm install cdk8s-plus-30 cdk8s constructs` ```typescript - const kplus = require('cdk8s-plus-29'); + const kplus = require('cdk8s-plus-30'); const cdk8s = require('cdk8s'); const app = new cdk8s.App(); @@ -219,7 +219,7 @@ app.synth(); === "Python" - `❯ pip install cdk8s-plus-29 cdk8s` + `❯ pip install cdk8s-plus-30 cdk8s` ```python import cdk8s_plus_27 as kplus @@ -246,7 +246,7 @@ app.synth(); org.cdk8s - cdk8s-plus-29 + cdk8s-plus-30 2.0.0 ``` @@ -259,8 +259,8 @@ app.synth(); import org.cdk8s.App; import org.cdk8s.Chart; import org.cdk8s.ChartProps; - import org.cdk8s.plus29.Deployment; - import org.cdk8s.plus29.ContainerProps; + import org.cdk8s.plus30.Deployment; + import org.cdk8s.plus30.ContainerProps; import java.util.Arrays; @@ -297,7 +297,7 @@ app.synth(); "github.com/aws/constructs-go/constructs/v10" "github.com/aws/jsii-runtime-go" "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" - "github.com/cdk8s-team/cdk8s-plus-go/cdk8splus29" + "github.com/cdk8s-team/cdk8s-plus-go/cdk8splus30" ) ``` @@ -305,9 +305,9 @@ app.synth(); app := cdk8s.NewApp(nil) chart := cdk8s.NewChart(app, jsii.String("ubuntu"), nil) - cdk8splus29.NewDeployment(chart, jsii.String("Deployment"), &cdk8splus29.DeploymentProps{ + cdk8splus30.NewDeployment(chart, jsii.String("Deployment"), &cdk8splus30.DeploymentProps{ Replicas: jsii.Number(3), - Containers: &[]*cdk8splus29.ContainerProps{{ + Containers: &[]*cdk8splus30.ContainerProps{{ Image: jsii.String("ubuntu"), }}, }) @@ -328,7 +328,7 @@ which are available from within **cdk8s+**, so you don't need to install an addi or [import](https://cdk8s.io/docs/latest/cli/import/) any resources. For example: ```ts -import * as kplus from 'cdk8s-plus-29'; +import * as kplus from 'cdk8s-plus-30'; import * as cdk8s from 'cdk8s'; const app = new cdk8s.App(); diff --git a/docs/reference/.pages b/docs/reference/.pages index 879c5ae9bf..bccc76a0da 100644 --- a/docs/reference/.pages +++ b/docs/reference/.pages @@ -1,6 +1,6 @@ nav: - index.md - cdk8s: cdk8s - - cdk8s-plus-27: cdk8s-plus-27 - cdk8s-plus-28: cdk8s-plus-28 - cdk8s-plus-29: cdk8s-plus-29 + - cdk8s-plus-30: cdk8s-plus-30 diff --git a/docs/reference/cdk8s-plus-27/java.md b/docs/reference/cdk8s-plus-27/java.md new file mode 100644 index 0000000000..1808da0db9 --- /dev/null +++ b/docs/reference/cdk8s-plus-27/java.md @@ -0,0 +1,23234 @@ +# cdk8s-plus-27 (Java) + +## Constructs + +### AbstractPod + +- *Implements:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector), [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer), [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +#### Initializers + +```java +import org.cdk8s.plus27.AbstractPod; + +AbstractPod.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +#### Methods + +##### `addContainer` + +```java +public addContainer(ContainerProps cont) +``` + +###### `cont`Required + +- *Type:* [`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps) + +--- + +##### `addHostAlias` + +```java +public addHostAlias(HostAlias hostAlias) +``` + +###### `hostAlias`Required + +- *Type:* [`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias) + +--- + +##### `addInitContainer` + +```java +public addInitContainer(ContainerProps cont) +``` + +###### `cont`Required + +- *Type:* [`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps) + +--- + +##### `addVolume` + +```java +public addVolume(Volume vol) +``` + +###### `vol`Required + +- *Type:* [`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume) + +--- + +##### `attachContainer` + +```java +public attachContainer(Container cont) +``` + +###### `cont`Required + +- *Type:* [`org.cdk8s.plus27.Container`](#org.cdk8s.plus27.Container) + +--- + +##### `toNetworkPolicyPeerConfig` + +```java +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```java +public toPodSelector() +``` + +##### `toPodSelectorConfig` + +```java +public toPodSelectorConfig() +``` + +##### `toSubjectConfiguration` + +```java +public toSubjectConfiguration() +``` + + +#### Properties + +##### `automountServiceAccountToken`Required + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `containers`Required + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Container`](#org.cdk8s.plus27.Container)> + +--- + +##### `dns`Required + +```java +public PodDns getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDns`](#org.cdk8s.plus27.PodDns) + +--- + +##### `hostAliases`Required + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +--- + +##### `initContainers`Required + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Container`](#org.cdk8s.plus27.Container)> + +--- + +##### `podMetadata`Required + +```java +public ApiObjectMetadataDefinition getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadataDefinition`](#org.cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `securityContext`Required + +```java +public PodSecurityContext getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContext`](#org.cdk8s.plus27.PodSecurityContext) + +--- + +##### `volumes`Required + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +--- + + +### AwsElasticBlockStorePersistentVolume + +Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +#### Initializers + +```java +import org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume; + +AwsElasticBlockStorePersistentVolume.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .volumeId(java.lang.String) +// .fsType(java.lang.String) +// .partition(java.lang.Number) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `volumeId`Required + +- *Type:* `java.lang.String` + +Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + +More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `fsType`Optional + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +- *Type:* `java.lang.Number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + + + +#### Properties + +##### `fsType`Required + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` + +File system type of this volume. + +--- + +##### `readOnly`Required + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not it is mounted as a read-only volume. + +--- + +##### `volumeId`Required + +```java +public java.lang.String getVolumeId(); +``` + +- *Type:* `java.lang.String` + +Volume id of this volume. + +--- + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` + +Partition of this volume. + +--- + + +### AzureDiskPersistentVolume + +AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + +#### Initializers + +```java +import org.cdk8s.plus27.AzureDiskPersistentVolume; + +AzureDiskPersistentVolume.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .diskName(java.lang.String) + .diskUri(java.lang.String) +// .cachingMode(AzureDiskPersistentVolumeCachingMode) +// .fsType(java.lang.String) +// .kind(AzureDiskPersistentVolumeKind) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `diskName`Required + +- *Type:* `java.lang.String` + +The Name of the data disk in the blob storage. + +--- + +##### `diskUri`Required + +- *Type:* `java.lang.String` + +The URI the data disk in the blob storage. + +--- + +##### `cachingMode`Optional + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode`](#org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fsType`Optional + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeKind`](#org.cdk8s.plus27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `readOnly`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + + + +#### Properties + +##### `azureKind`Required + +```java +public AzureDiskPersistentVolumeKind getAzureKind(); +``` + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeKind`](#org.cdk8s.plus27.AzureDiskPersistentVolumeKind) + +Azure kind of this volume. + +--- + +##### `cachingMode`Required + +```java +public AzureDiskPersistentVolumeCachingMode getCachingMode(); +``` + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode`](#org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode) + +Caching mode of this volume. + +--- + +##### `diskName`Required + +```java +public java.lang.String getDiskName(); +``` + +- *Type:* `java.lang.String` + +Disk name of this volume. + +--- + +##### `diskUri`Required + +```java +public java.lang.String getDiskUri(); +``` + +- *Type:* `java.lang.String` + +Disk URI of this volume. + +--- + +##### `fsType`Required + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` + +File system type of this volume. + +--- + +##### `readOnly`Required + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not it is mounted as a read-only volume. + +--- + + +### BasicAuthSecret + +Create a secret for basic authentication. + +> https://kubernetes.io/docs/concepts/configuration/secret/#basic-authentication-secret + +#### Initializers + +```java +import org.cdk8s.plus27.BasicAuthSecret; + +BasicAuthSecret.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .password(java.lang.String) + .username(java.lang.String) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `password`Required + +- *Type:* `java.lang.String` + +The password or token for authentication. + +--- + +##### `username`Required + +- *Type:* `java.lang.String` + +The user name for authentication. + +--- + + + + + +### ClusterRole + +- *Implements:* [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole), [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole) + +ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. + +#### Initializers + +```java +import org.cdk8s.plus27.ClusterRole; + +ClusterRole.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .aggregationLabels(java.util.Map) +// .rules(java.util.List) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `aggregationLabels`Optional + +- *Type:* java.util.Map + +Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules. + +--- + +##### `rules`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ClusterRolePolicyRule`](#org.cdk8s.plus27.ClusterRolePolicyRule)> +- *Default:* [] + +A list of rules the role should allow. + +--- + +#### Methods + +##### `aggregate` + +```java +public aggregate(java.lang.String key, java.lang.String value) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +--- + +##### `allow` + +```java +public allow(java.util.List verbs, IApiEndpoint endpoints) +``` + +###### `verbs`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The endpoints(s) to apply to. + +--- + +##### `allowCreate` + +```java +public allowCreate(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowDelete` + +```java +public allowDelete(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowDeleteCollection` + +```java +public allowDeleteCollection(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowGet` + +```java +public allowGet(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowList` + +```java +public allowList(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowPatch` + +```java +public allowPatch(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowRead` + +```java +public allowRead(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowReadWrite` + +```java +public allowReadWrite(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowUpdate` + +```java +public allowUpdate(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowWatch` + +```java +public allowWatch(IApiEndpoint endpoints) +``` + +###### `endpoints`Required + +- *Type:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `bind` + +```java +public bind(ISubject subjects) +``` + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +a list of subjects to bind to. + +--- + +##### `bindInNamespace` + +```java +public bindInNamespace(java.lang.String namespace, ISubject subjects) +``` + +###### `namespace`Required + +- *Type:* `java.lang.String` + +the namespace to limit permissions to. + +--- + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +a list of subjects to bind to. + +--- + +##### `combine` + +```java +public combine(ClusterRole rol) +``` + +###### `rol`Required + +- *Type:* [`org.cdk8s.plus27.ClusterRole`](#org.cdk8s.plus27.ClusterRole) + +--- + +#### Static Functions + +##### `fromClusterRoleName` + +```java +import org.cdk8s.plus27.ClusterRole; + +ClusterRole.fromClusterRoleName(Construct scope, java.lang.String id, java.lang.String name) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `rules`Required + +```java +public java.util.List getRules(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ClusterRolePolicyRule`](#org.cdk8s.plus27.ClusterRolePolicyRule)> + +Rules associaated with this Role. + +Returns a copy, use `allow` to add rules. + +--- + + +### ClusterRoleBinding + +A ClusterRoleBinding grants permissions cluster-wide to a user or set of users. + +#### Initializers + +```java +import org.cdk8s.plus27.ClusterRoleBinding; + +ClusterRoleBinding.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) + .role(IClusterRole) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +- *Type:* [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole) + +The role to bind to. + +--- + +#### Methods + +##### `addSubjects` + +```java +public addSubjects(ISubject subjects) +``` + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +The subjects to add. + +--- + + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `role`Required + +```java +public IClusterRole getRole(); +``` + +- *Type:* [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole) + +--- + +##### `subjects`Required + +```java +public java.util.List getSubjects(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject)> + +--- + + +### ConfigMap + +- *Implements:* [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap) + +ConfigMap holds configuration data for pods to consume. + +#### Initializers + +```java +import org.cdk8s.plus27.ConfigMap; + +ConfigMap.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .binaryData(java.util.Map) +// .data(java.util.Map) +// .immutable(java.lang.Boolean) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `binaryData`Optional + +- *Type:* java.util.Map + +BinaryData contains the binary data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. +BinaryData can contain byte sequences that are not in the UTF-8 range. The +keys stored in BinaryData must not overlap with the ones in the Data field, +this is enforced during validation process. + +You can also add binary data using `configMap.addBinaryData()`. + +--- + +##### `data`Optional + +- *Type:* java.util.Map + +Data contains the configuration data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. Values +with non-UTF-8 byte sequences must use the BinaryData field. The keys +stored in Data must not overlap with the keys in the BinaryData field, this +is enforced during validation process. + +You can also add data using `configMap.addData()`. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +#### Methods + +##### `addBinaryData` + +```java +public addBinaryData(java.lang.String key, java.lang.String value) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +The key. + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +The value. + +--- + +##### `addData` + +```java +public addData(java.lang.String key, java.lang.String value) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +The key. + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +The value. + +--- + +##### `addDirectory` + +```java +public addDirectory(java.lang.String localDir) +public addDirectory(java.lang.String localDir, AddDirectoryOptions options) +``` + +###### `localDir`Required + +- *Type:* `java.lang.String` + +A path to a local directory. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.AddDirectoryOptions`](#org.cdk8s.plus27.AddDirectoryOptions) + +Options. + +--- + +##### `addFile` + +```java +public addFile(java.lang.String localFile) +public addFile(java.lang.String localFile, java.lang.String key) +``` + +###### `localFile`Required + +- *Type:* `java.lang.String` + +The path to the local file. + +--- + +###### `key`Optional + +- *Type:* `java.lang.String` + +The ConfigMap key (default to the file name). + +--- + +#### Static Functions + +##### `fromConfigMapName` + +```java +import org.cdk8s.plus27.ConfigMap; + +ConfigMap.fromConfigMapName(Construct scope, java.lang.String id, java.lang.String name) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `binaryData`Required + +```java +public java.util.Map getBinaryData(); +``` + +- *Type:* java.util.Map + +The binary data associated with this config map. + +Returns a copy. To add data records, use `addBinaryData()` or `addData()`. + +--- + +##### `data`Required + +```java +public java.util.Map getData(); +``` + +- *Type:* java.util.Map + +The data associated with this config map. + +Returns an copy. To add data records, use `addData()` or `addBinaryData()`. + +--- + +##### `immutable`Required + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not this config map is immutable. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### CronJob + +A CronJob is responsible for creating a Job and scheduling it based on provided cron schedule. + +This helps running Jobs in a recurring manner. + +#### Initializers + +```java +import org.cdk8s.plus27.CronJob; + +CronJob.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .activeDeadline(Duration) +// .backoffLimit(java.lang.Number) +// .ttlAfterFinished(Duration) + .schedule(Cron) +// .concurrencyPolicy(ConcurrencyPolicy) +// .failedJobsRetained(java.lang.Number) +// .startingDeadline(Duration) +// .successfulJobsRetained(java.lang.Number) +// .suspend(java.lang.Boolean) +// .timeZone(java.lang.String) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `activeDeadline`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoffLimit`Optional + +- *Type:* `java.lang.Number` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttlAfterFinished`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +##### `schedule`Required + +- *Type:* [`org.cdk8s.Cron`](#org.cdk8s.Cron) + +Specifies the time in which the job would run again. + +This is defined as a cron expression in the CronJob resource. + +--- + +##### `concurrencyPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.ConcurrencyPolicy`](#org.cdk8s.plus27.ConcurrencyPolicy) +- *Default:* ConcurrencyPolicy.Forbid + +Specifies the concurrency policy for the job. + +--- + +##### `failedJobsRetained`Optional + +- *Type:* `java.lang.Number` +- *Default:* 1 + +Specifies the number of failed jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `startingDeadline`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(10) + +Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. + +This deadline specifies +how much time can pass after a schedule point, for which kubernetes can still start the job. +For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after +the scheduled time. + +Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 +seconds is not allowed, as it may cause your job to never be scheduled. + +In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). +This property also controls what time interval should kubernetes consider when counting for missed schedules. + +For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00, +and its `startingDeadline` field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00, +the job will not start as the number of missed jobs which missed their schedule is greater than 100. +However, if `startingDeadline` is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus +start a new execution at 10:22:00. + +--- + +##### `successfulJobsRetained`Optional + +- *Type:* `java.lang.Number` +- *Default:* 3 + +Specifies the number of successful jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `suspend`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specifies if the cron job should be suspended. + +Only applies to future executions, current ones are remained untouched. + +--- + +##### `timeZone`Optional + +- *Type:* `java.lang.String` +- *Default:* Timezone of kube-controller-manager process. + +Specifies the timezone for the job. + +This helps aligining the schedule to follow the specified timezone. + +> {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} for list of valid timezone values. + +--- + + + +#### Properties + +##### `concurrencyPolicy`Required + +```java +public java.lang.String getConcurrencyPolicy(); +``` + +- *Type:* `java.lang.String` + +The policy used by this cron job to determine the concurrency mode in which to schedule jobs. + +--- + +##### `failedJobsRetained`Required + +```java +public java.lang.Number getFailedJobsRetained(); +``` + +- *Type:* `java.lang.Number` + +The number of failed jobs retained by this cron job. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +Represents the resource type. + +--- + +##### `schedule`Required + +```java +public Cron getSchedule(); +``` + +- *Type:* [`org.cdk8s.Cron`](#org.cdk8s.Cron) + +The schedule this cron job is scheduled to run in. + +--- + +##### `startingDeadline`Required + +```java +public Duration getStartingDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +The time by which the running cron job needs to schedule the next job execution. + +The job is considered as failed if it misses this deadline. + +--- + +##### `successfulJobsRetained`Required + +```java +public java.lang.Number getSuccessfulJobsRetained(); +``` + +- *Type:* `java.lang.Number` + +The number of successful jobs retained by this cron job. + +--- + +##### `suspend`Required + +```java +public java.lang.Boolean getSuspend(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not the cron job is currently suspended or not. + +--- + +##### `timeZone`Optional + +```java +public java.lang.String getTimeZone(); +``` + +- *Type:* `java.lang.String` + +The timezone which this cron job would follow to schedule jobs. + +--- + + +### DaemonSet + +A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. + +As nodes are added to the cluster, Pods are added to them. +As nodes are removed from the cluster, those Pods are garbage collected. +Deleting a DaemonSet will clean up the Pods it created. + +Some typical uses of a DaemonSet are: + +* running a cluster storage daemon on every node +* running a logs collection daemon on every node +* running a node monitoring daemon on every node + +In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon. +A more complex setup might use multiple DaemonSets for a single type of daemon, +but with different flags and/or different memory and cpu requests for different hardware types. + +#### Initializers + +```java +import org.cdk8s.plus27.DaemonSet; + +DaemonSet.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .minReadySeconds(java.lang.Number) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReadySeconds`Optional + +- *Type:* `java.lang.Number` +- *Default:* 0 + +Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + + + +#### Properties + +##### `minReadySeconds`Required + +```java +public java.lang.Number getMinReadySeconds(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Deployment + +- *Implements:* [`org.cdk8s.plus27.IScalable`](#org.cdk8s.plus27.IScalable) + +A Deployment provides declarative updates for Pods and ReplicaSets. + +You describe a desired state in a Deployment, and the Deployment Controller changes the actual +state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove +existing Deployments and adopt all their resources with new Deployments. + +> Note: Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below. + +Use Case + +The following are typical use cases for Deployments: + +* Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. + Check the status of the rollout to see if it succeeds or not. +* Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. + A new ReplicaSet is created and the Deployment manages moving the Pods from the old ReplicaSet to the new one at a controlled rate. + Each new ReplicaSet updates the revision of the Deployment. +* Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. + Each rollback updates the revision of the Deployment. +* Scale up the Deployment to facilitate more load. +* Pause the Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout. +* Use the status of the Deployment as an indicator that a rollout has stuck. +* Clean up older ReplicaSets that you don't need anymore. + +#### Initializers + +```java +import org.cdk8s.plus27.Deployment; + +Deployment.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .minReady(Duration) +// .progressDeadline(Duration) +// .replicas(java.lang.Number) +// .strategy(DeploymentStrategy) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReady`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `progressDeadline`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(600) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +The deployment controller will continue +to process failed deployments and a condition with a ProgressDeadlineExceeded +reason will be surfaced in the deployment status. + +Note that progress will not be estimated during the time a deployment is paused. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds + +--- + +##### `replicas`Optional + +- *Type:* `java.lang.Number` +- *Default:* 2 + +Number of desired pods. + +--- + +##### `strategy`Optional + +- *Type:* [`org.cdk8s.plus27.DeploymentStrategy`](#org.cdk8s.plus27.DeploymentStrategy) +- *Default:* RollingUpdate with maxSurge and maxUnavailable set to 25%. + +Specifies the strategy used to replace old Pods by new ones. + +--- + +#### Methods + +##### `exposeViaIngress` + +```java +public exposeViaIngress(java.lang.String path) +public exposeViaIngress(java.lang.String path, ExposeDeploymentViaIngressOptions options) +``` + +###### `path`Required + +- *Type:* `java.lang.String` + +The ingress path to register under. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.ExposeDeploymentViaIngressOptions`](#org.cdk8s.plus27.ExposeDeploymentViaIngressOptions) + +Additional options. + +--- + +##### `exposeViaService` + +```java +public exposeViaService() +public exposeViaService(DeploymentExposeViaServiceOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.DeploymentExposeViaServiceOptions`](#org.cdk8s.plus27.DeploymentExposeViaServiceOptions) + +Options to determine details of the service and port exposed. + +--- + +##### `markHasAutoscaler` + +```java +public markHasAutoscaler() +``` + +##### `toScalingTarget` + +```java +public toScalingTarget() +``` + + +#### Properties + +##### `minReady`Required + +```java +public Duration getMinReady(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +##### `progressDeadline`Required + +```java +public Duration getProgressDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `strategy`Required + +```java +public DeploymentStrategy getStrategy(); +``` + +- *Type:* [`org.cdk8s.plus27.DeploymentStrategy`](#org.cdk8s.plus27.DeploymentStrategy) + +--- + +##### `replicas`Optional + +```java +public java.lang.Number getReplicas(); +``` + +- *Type:* `java.lang.Number` + +Number of desired pods. + +--- + +##### `hasAutoscaler`Required + +```java +public java.lang.Boolean getHasAutoscaler(); +``` + +- *Type:* `java.lang.Boolean` + +If this is a target of an autoscaler. + +--- + + +### DockerConfigSecret + +Create a secret for storing credentials for accessing a container image registry. + +> https://kubernetes.io/docs/concepts/configuration/secret/#docker-config-secrets + +#### Initializers + +```java +import org.cdk8s.plus27.DockerConfigSecret; + +DockerConfigSecret.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .data(java.util.Map) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `data`Required + +- *Type:* java.util.Map + +JSON content to provide for the `~/.docker/config.json` file. This will be stringified and inserted as stringData. + +> https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file + +--- + + + + + +### GCEPersistentDiskPersistentVolume + +GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + +Provisioned by an admin. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +#### Initializers + +```java +import org.cdk8s.plus27.GCEPersistentDiskPersistentVolume; + +GCEPersistentDiskPersistentVolume.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .pdName(java.lang.String) +// .fsType(java.lang.String) +// .partition(java.lang.Number) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `pdName`Required + +- *Type:* `java.lang.String` + +Unique name of the PD resource in GCE. + +Used to identify the disk in GCE. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +--- + +##### `fsType`Optional + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +- *Type:* `java.lang.Number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + + + +#### Properties + +##### `fsType`Required + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` + +File system type of this volume. + +--- + +##### `pdName`Required + +```java +public java.lang.String getPdName(); +``` + +- *Type:* `java.lang.String` + +PD resource in GCE of this volume. + +--- + +##### `readOnly`Required + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not it is mounted as a read-only volume. + +--- + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` + +Partition of this volume. + +--- + + +### Group + +- *Implements:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +Represents a group. + +#### Methods + +##### `toSubjectConfiguration` + +```java +public toSubjectConfiguration() +``` + +#### Static Functions + +##### `fromName` + +```java +import org.cdk8s.plus27.Group; + +Group.fromName(Construct scope, java.lang.String id, java.lang.String name) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +--- + +##### `apiGroup`Optional + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +--- + + +### HorizontalPodAutoscaler + +A HorizontalPodAutoscaler scales a workload up or down in response to a metric change. + +This allows your services to scale up when demand is high and scale down +when they are no longer needed. + +Typical use cases for HorizontalPodAutoscaler: + +* When Memory usage is above 70%, scale up the number of replicas to meet the demand. +* When CPU usage is below 30%, scale down the number of replicas to save resources. +* When a service is experiencing a spike in traffic, scale up the number of replicas + to meet the demand. Then, when the traffic subsides, scale down the number of + replicas to save resources. + +The autoscaler uses the following algorithm to determine the number of replicas to scale: + +`desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]` + +HorizontalPodAutoscaler's can be used to with any `Scalable` workload: + +* Deployment +* StatefulSet + +**Targets that already have a replica count defined:** + +Remove any replica counts from the target resource before associating with a +HorizontalPodAutoscaler. If this isn't done, then any time a change to that object is applied, +Kubernetes will scale the current number of Pods to the value of the target.replicas key. This +may not be desired and could lead to unexpected behavior. + +> https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#implicit-maintenance-mode-deactivation + +#### Initializers + +```java +import org.cdk8s.plus27.HorizontalPodAutoscaler; + +HorizontalPodAutoscaler.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) + .maxReplicas(java.lang.Number) + .target(IScalable) +// .metrics(java.util.List) +// .minReplicas(java.lang.Number) +// .scaleDown(ScalingRules) +// .scaleUp(ScalingRules) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `maxReplicas`Required + +- *Type:* `java.lang.Number` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `target`Required + +- *Type:* [`org.cdk8s.plus27.IScalable`](#org.cdk8s.plus27.IScalable) + +The workload to scale up or down. + +Scalable workload types: + +* Deployment +* StatefulSet + +--- + +##### `metrics`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Metric`](#org.cdk8s.plus27.Metric)> +- *Default:* If metrics are not provided, then the target resource +constraints (e.g. cpu limit) will be used as scaling metrics. + +The metric conditions that trigger a scale up or scale down. + +--- + +##### `minReplicas`Optional + +- *Type:* `java.lang.Number` +- *Default:* 1 + +The minimum number of replicas that can be scaled down to. + +Can be set to 0 if the alpha feature gate `HPAScaleToZero` is enabled and +at least one Object or External metric is configured. + +--- + +##### `scaleDown`Optional + +- *Type:* [`org.cdk8s.plus27.ScalingRules`](#org.cdk8s.plus27.ScalingRules) +- *Default:* Scale down to minReplica count with a 5 minute stabilization window. + +The scaling behavior when scaling down. + +--- + +##### `scaleUp`Optional + +- *Type:* [`org.cdk8s.plus27.ScalingRules`](#org.cdk8s.plus27.ScalingRules) +- *Default:* Is the higher of: +* Increase no more than 4 pods per 60 seconds +* Double the number of pods per 60 seconds + +The scaling behavior when scaling up. + +--- + + + +#### Properties + +##### `maxReplicas`Required + +```java +public java.lang.Number getMaxReplicas(); +``` + +- *Type:* `java.lang.Number` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `minReplicas`Required + +```java +public java.lang.Number getMinReplicas(); +``` + +- *Type:* `java.lang.Number` + +The minimum number of replicas that can be scaled down to. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `scaleDown`Required + +```java +public ScalingRules getScaleDown(); +``` + +- *Type:* [`org.cdk8s.plus27.ScalingRules`](#org.cdk8s.plus27.ScalingRules) + +The scaling behavior when scaling down. + +--- + +##### `scaleUp`Required + +```java +public ScalingRules getScaleUp(); +``` + +- *Type:* [`org.cdk8s.plus27.ScalingRules`](#org.cdk8s.plus27.ScalingRules) + +The scaling behavior when scaling up. + +--- + +##### `target`Required + +```java +public IScalable getTarget(); +``` + +- *Type:* [`org.cdk8s.plus27.IScalable`](#org.cdk8s.plus27.IScalable) + +The workload to scale up or down. + +--- + +##### `metrics`Optional + +```java +public java.util.List getMetrics(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Metric`](#org.cdk8s.plus27.Metric)> + +The metric conditions that trigger a scale up or scale down. + +--- + + +### Ingress + +Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. + +An Ingress can be configured to give services +externally-reachable urls, load balance traffic, terminate SSL, offer name +based virtual hosting etc. + +#### Initializers + +```java +import org.cdk8s.plus27.Ingress; + +Ingress.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .defaultBackend(IngressBackend) +// .rules(java.util.List) +// .tls(java.util.List) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `defaultBackend`Optional + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +The default backend services requests that do not match any rule. + +Using this option or the `addDefaultBackend()` method is equivalent to +adding a rule with both `path` and `host` undefined. + +--- + +##### `rules`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.IngressRule`](#org.cdk8s.plus27.IngressRule)> + +Routing rules for this ingress. + +Each rule must define an `IngressBackend` that will receive the requests +that match this rule. If both `host` and `path` are not specifiec, this +backend will be used as the default backend of the ingress. + +You can also add rules later using `addRule()`, `addHostRule()`, +`addDefaultBackend()` and `addHostDefaultBackend()`. + +--- + +##### `tls`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.IngressTls`](#org.cdk8s.plus27.IngressTls)> + +TLS settings for this ingress. + +Using this option tells the ingress controller to expose a TLS endpoint. +Currently the Ingress only supports a single TLS port, 443. If multiple +members of this list specify different hosts, they will be multiplexed on +the same port according to the hostname specified through the SNI TLS +extension, if the ingress controller fulfilling the ingress supports SNI. + +--- + +#### Methods + +##### `addDefaultBackend` + +```java +public addDefaultBackend(IngressBackend backend) +``` + +###### `backend`Required + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +The backend to use for requests that do not match any rule. + +--- + +##### `addHostDefaultBackend` + +```java +public addHostDefaultBackend(java.lang.String host, IngressBackend backend) +``` + +###### `host`Required + +- *Type:* `java.lang.String` + +The host name to match. + +--- + +###### `backend`Required + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +The backend to route to. + +--- + +##### `addHostRule` + +```java +public addHostRule(java.lang.String host, java.lang.String path, IngressBackend backend) +public addHostRule(java.lang.String host, java.lang.String path, IngressBackend backend, HttpIngressPathType pathType) +``` + +###### `host`Required + +- *Type:* `java.lang.String` + +The host name. + +--- + +###### `path`Required + +- *Type:* `java.lang.String` + +The HTTP path. + +--- + +###### `backend`Required + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +The backend to route requests to. + +--- + +###### `pathType`Optional + +- *Type:* [`org.cdk8s.plus27.HttpIngressPathType`](#org.cdk8s.plus27.HttpIngressPathType) + +How the path is matched against request paths. + +--- + +##### `addRule` + +```java +public addRule(java.lang.String path, IngressBackend backend) +public addRule(java.lang.String path, IngressBackend backend, HttpIngressPathType pathType) +``` + +###### `path`Required + +- *Type:* `java.lang.String` + +The HTTP path. + +--- + +###### `backend`Required + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +The backend to route requests to. + +--- + +###### `pathType`Optional + +- *Type:* [`org.cdk8s.plus27.HttpIngressPathType`](#org.cdk8s.plus27.HttpIngressPathType) + +How the path is matched against request paths. + +--- + +##### `addRules` + +```java +public addRules(IngressRule rules) +``` + +###### `rules`Required + +- *Type:* [`org.cdk8s.plus27.IngressRule`](#org.cdk8s.plus27.IngressRule) + +The rules to add. + +--- + +##### `addTls` + +```java +public addTls(java.util.List tls) +``` + +###### `tls`Required + +- *Type:* java.util.List<[`org.cdk8s.plus27.IngressTls`](#org.cdk8s.plus27.IngressTls)> + +--- + + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Job + +A Job creates one or more Pods and ensures that a specified number of them successfully terminate. + +As pods successfully complete, +the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. +Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. +The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). +You can also use a Job to run multiple Pods in parallel. + +#### Initializers + +```java +import org.cdk8s.plus27.Job; + +Job.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .activeDeadline(Duration) +// .backoffLimit(java.lang.Number) +// .ttlAfterFinished(Duration) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `activeDeadline`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoffLimit`Optional + +- *Type:* `java.lang.Number` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttlAfterFinished`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + + + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `activeDeadline`Optional + +```java +public Duration getActiveDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +Duration before job is terminated. + +If undefined, there is no deadline. + +--- + +##### `backoffLimit`Optional + +```java +public java.lang.Number getBackoffLimit(); +``` + +- *Type:* `java.lang.Number` + +Number of retries before marking failed. + +--- + +##### `ttlAfterFinished`Optional + +```java +public Duration getTtlAfterFinished(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +TTL before the job is deleted after it is finished. + +--- + + +### Namespace + +- *Implements:* [`org.cdk8s.plus27.INamespaceSelector`](#org.cdk8s.plus27.INamespaceSelector), [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +In Kubernetes, namespaces provides a mechanism for isolating groups of resources within a single cluster. + +Names of resources need to be unique within a namespace, but not across namespaces. +Namespace-based scoping is applicable only for namespaced objects (e.g. Deployments, Services, etc) and +not for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc). + +#### Initializers + +```java +import org.cdk8s.plus27.Namespace; + +Namespace.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +#### Methods + +##### `toNamespaceSelectorConfig` + +```java +public toNamespaceSelectorConfig() +``` + +##### `toNetworkPolicyPeerConfig` + +```java +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```java +public toPodSelector() +``` + + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +#### Constants + +##### `NAME_LABEL` + +- *Type:* `java.lang.String` + +> https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling + +--- + +### Namespaces + +- *Implements:* [`org.cdk8s.plus27.INamespaceSelector`](#org.cdk8s.plus27.INamespaceSelector), [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +Represents a group of namespaces. + +#### Initializers + +```java +import org.cdk8s.plus27.Namespaces; + +new Namespaces(Construct scope, java.lang.String id); +new Namespaces(Construct scope, java.lang.String id, java.util.List expressions); +new Namespaces(Construct scope, java.lang.String id, java.util.List expressions, java.util.List names); +new Namespaces(Construct scope, java.lang.String id, java.util.List expressions, java.util.List names, java.util.Map labels); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `expressions`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.LabelExpression`](#org.cdk8s.plus27.LabelExpression)> + +--- + +##### `names`Optional + +- *Type:* java.util.List<`java.lang.String`> + +--- + +##### `labels`Optional + +- *Type:* java.util.Map + +--- + +#### Methods + +##### `toNamespaceSelectorConfig` + +```java +public toNamespaceSelectorConfig() +``` + +##### `toNetworkPolicyPeerConfig` + +```java +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```java +public toPodSelector() +``` + +#### Static Functions + +##### `all` + +```java +import org.cdk8s.plus27.Namespaces; + +Namespaces.all(Construct scope, java.lang.String id) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `select` + +```java +import org.cdk8s.plus27.Namespaces; + +Namespaces.select(Construct scope, java.lang.String id, NamespacesSelectOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.NamespacesSelectOptions`](#org.cdk8s.plus27.NamespacesSelectOptions) + +--- + + + +### NetworkPolicy + +Control traffic flow at the IP address or port level (OSI layer 3 or 4), network policies are an application-centric construct which allow you to specify how a pod is allowed to communicate with various network peers. + +* Outgoing traffic is allowed if there are no network policies selecting + the pod (and cluster policy otherwise allows the traffic), + OR if the traffic matches at least one egress rule across all of the + network policies that select the pod. +* Incoming traffic is allowed to a pod if there are no network policies + selecting the pod (and cluster policy otherwise allows the traffic), + OR if the traffic source is the pod's local node, + OR if the traffic matches at least one ingress rule across all of + the network policies that select the pod. + +Network policies do not conflict; they are additive. +If any policy or policies apply to a given pod for a given +direction, the connections allowed in that direction from +that pod is the union of what the applicable policies allow. +Thus, order of evaluation does not affect the policy result. + +For a connection from a source pod to a destination pod to be allowed, +both the egress policy on the source pod and the ingress policy on the +destination pod need to allow the connection. +If either side does not allow the connection, it will not happen. + +> https://kubernetes.io/docs/concepts/services-networking/network-policies/#networkpolicy-resource + +#### Initializers + +```java +import org.cdk8s.plus27.NetworkPolicy; + +NetworkPolicy.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .egress(NetworkPolicyTraffic) +// .ingress(NetworkPolicyTraffic) +// .selector(IPodSelector) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `egress`Optional + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyTraffic`](#org.cdk8s.plus27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change egress behavior of the pods it selects. + +Egress traffic configuration. + +--- + +##### `ingress`Optional + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyTraffic`](#org.cdk8s.plus27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change ingress behavior of the pods it selects. + +Ingress traffic configuration. + +--- + +##### `selector`Optional + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) +- *Default:* will select all pods in the namespace of the policy. + +Which pods does this policy object applies to. + +This can either be a single pod / workload, or a grouping of pods selected +via the `Pods.select` function. Rules is applied to any pods selected by this property. +Multiple network policies can select the same set of pods. +In this case, the rules for each are combined additively. + +Note that + +--- + +#### Methods + +##### `addEgressRule` + +```java +public addEgressRule(INetworkPolicyPeer peer) +public addEgressRule(INetworkPolicyPeer peer, java.util.List ports) +``` + +###### `peer`Required + +- *Type:* [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +--- + +###### `ports`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyPort`](#org.cdk8s.plus27.NetworkPolicyPort)> + +--- + +##### `addIngressRule` + +```java +public addIngressRule(INetworkPolicyPeer peer) +public addIngressRule(INetworkPolicyPeer peer, java.util.List ports) +``` + +###### `peer`Required + +- *Type:* [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +--- + +###### `ports`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyPort`](#org.cdk8s.plus27.NetworkPolicyPort)> + +--- + + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### NetworkPolicyIpBlock + +- *Implements:* [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +Describes a particular CIDR (Ex. + +"192.168.1.1/24","2001:db9::/64") that is +allowed to the pods matched by a network policy selector. +The except entry describes CIDRs that should not be included within this rule. + +#### Methods + +##### `toNetworkPolicyPeerConfig` + +```java +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```java +public toPodSelector() +``` + +#### Static Functions + +##### `anyIpv4` + +```java +import org.cdk8s.plus27.NetworkPolicyIpBlock; + +NetworkPolicyIpBlock.anyIpv4(Construct scope, java.lang.String id) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `anyIpv6` + +```java +import org.cdk8s.plus27.NetworkPolicyIpBlock; + +NetworkPolicyIpBlock.anyIpv6(Construct scope, java.lang.String id) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `ipv4` + +```java +import org.cdk8s.plus27.NetworkPolicyIpBlock; + +NetworkPolicyIpBlock.ipv4(Construct scope, java.lang.String id, java.lang.String cidrIp) +NetworkPolicyIpBlock.ipv4(Construct scope, java.lang.String id, java.lang.String cidrIp, java.util.List except) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `cidrIp`Required + +- *Type:* `java.lang.String` + +--- + +###### `except`Optional + +- *Type:* java.util.List<`java.lang.String`> + +--- + +##### `ipv6` + +```java +import org.cdk8s.plus27.NetworkPolicyIpBlock; + +NetworkPolicyIpBlock.ipv6(Construct scope, java.lang.String id, java.lang.String cidrIp) +NetworkPolicyIpBlock.ipv6(Construct scope, java.lang.String id, java.lang.String cidrIp, java.util.List except) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `cidrIp`Required + +- *Type:* `java.lang.String` + +--- + +###### `except`Optional + +- *Type:* java.util.List<`java.lang.String`> + +--- + +#### Properties + +##### `cidr`Required + +```java +public java.lang.String getCidr(); +``` + +- *Type:* `java.lang.String` + +A string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". + +--- + +##### `except`Optional + +```java +public java.util.List getExcept(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +A slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". Except values will be rejected if they are outside the CIDR range. + +--- + + +### PersistentVolume + +- *Implements:* [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume), [`org.cdk8s.plus27.IStorage`](#org.cdk8s.plus27.IStorage) + +A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. + +It is a resource in the cluster just like a node is a cluster resource. +PVs are volume plugins like Volumes, but have a lifecycle independent of any +individual Pod that uses the PV. This API object captures the details of the +implementation of the storage, be that NFS, iSCSI, or a +cloud-provider-specific storage system. + +#### Initializers + +```java +import org.cdk8s.plus27.PersistentVolume; + +PersistentVolume.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +#### Methods + +##### `asVolume` + +```java +public asVolume() +``` + +##### `bind` + +```java +public bind(IPersistentVolumeClaim claim) +``` + +###### `claim`Required + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) + +The PVC to bind to. + +--- + +##### `reserve` + +```java +public reserve() +``` + +#### Static Functions + +##### `fromPersistentVolumeName` + +```java +import org.cdk8s.plus27.PersistentVolume; + +PersistentVolume.fromPersistentVolumeName(Construct scope, java.lang.String id, java.lang.String volumeName) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `volumeName`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `mode`Required + +```java +public PersistentVolumeMode getMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) + +Volume mode of this volume. + +--- + +##### `reclaimPolicy`Required + +```java +public PersistentVolumeReclaimPolicy getReclaimPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) + +Reclaim policy of this volume. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> + +Access modes requirement of this claim. + +--- + +##### `claim`Optional + +```java +public IPersistentVolumeClaim getClaim(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) + +PVC this volume is bound to. + +Undefined means this volume is not yet +claimed by any PVC. + +--- + +##### `mountOptions`Optional + +```java +public java.util.List getMountOptions(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Mount options of this volume. + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) + +Storage size of this volume. + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` + +Storage class this volume belongs to. + +--- + + +### PersistentVolumeClaim + +- *Implements:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) + +A PersistentVolumeClaim (PVC) is a request for storage by a user. + +It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. +Pods can request specific levels of resources (CPU and Memory). +Claims can request specific size and access modes + +#### Initializers + +```java +import org.cdk8s.plus27.PersistentVolumeClaim; + +PersistentVolumeClaim.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volume(IPersistentVolume) +// .volumeMode(PersistentVolumeMode) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes requirement. + +Contains the access modes the volume should support. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + +--- + +##### `storage`Optional + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No storage requirement. + +Minimum storage size the volume should have. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +- *Type:* `java.lang.String` +- *Default:* Not set. + +Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. + +* If the admission plugin is turned on, the storage class marked as default will be used. +* If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + +--- + +##### `volume`Optional + +- *Type:* [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume) +- *Default:* No specific volume binding. + +The PersistentVolume backing this claim. + +The control plane still checks that storage class, access modes, +and requested storage size on the volume are valid. + +Note that in order to guarantee a proper binding, the volume should +also define a `claimRef` referring to this claim. Otherwise, the volume may be +claimed be other pvc's before it gets a chance to bind to this one. + +If the volume is managed (i.e not imported), you can use `pv.claim()` to easily +create a bi-directional bounded claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding. + +--- + +##### `volumeMode`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +#### Methods + +##### `bind` + +```java +public bind(IPersistentVolume vol) +``` + +###### `vol`Required + +- *Type:* [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume) + +The PV to bind to. + +--- + +#### Static Functions + +##### `fromClaimName` + +```java +import org.cdk8s.plus27.PersistentVolumeClaim; + +PersistentVolumeClaim.fromClaimName(Construct scope, java.lang.String id, java.lang.String claimName) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `claimName`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `volumeMode`Required + +```java +public PersistentVolumeMode getVolumeMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) + +Volume mode requirement of this claim. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> + +Access modes requirement of this claim. + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) + +Storage requirement of this claim. + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` + +Storage class requirment of this claim. + +--- + +##### `volume`Optional + +```java +public IPersistentVolume getVolume(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume) + +PV this claim is bound to. + +Undefined means the claim is not bound +to any specific volume. + +--- + + +### Pod + +Pod is a collection of containers that can run on a host. + +This resource is +created by clients and scheduled onto hosts. + +#### Initializers + +```java +import org.cdk8s.plus27.Pod; + +Pod.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + + + +#### Properties + +##### `connections`Required + +```java +public PodConnections getConnections(); +``` + +- *Type:* [`org.cdk8s.plus27.PodConnections`](#org.cdk8s.plus27.PodConnections) + +--- + +##### `podMetadata`Required + +```java +public ApiObjectMetadataDefinition getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadataDefinition`](#org.cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `scheduling`Required + +```java +public PodScheduling getScheduling(); +``` + +- *Type:* [`org.cdk8s.plus27.PodScheduling`](#org.cdk8s.plus27.PodScheduling) + +--- + +#### Constants + +##### `ADDRESS_LABEL` + +- *Type:* `java.lang.String` + +This label is autoamtically added by cdk8s to any pod. + +It provides +a unique and stable identifier for the pod. + +--- + +### Pods + +- *Implements:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) + +Represents a group of pods. + +#### Initializers + +```java +import org.cdk8s.plus27.Pods; + +new Pods(Construct scope, java.lang.String id); +new Pods(Construct scope, java.lang.String id, java.util.List expressions); +new Pods(Construct scope, java.lang.String id, java.util.List expressions, java.util.Map labels); +new Pods(Construct scope, java.lang.String id, java.util.List expressions, java.util.Map labels, INamespaceSelector namespaces); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `expressions`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.LabelExpression`](#org.cdk8s.plus27.LabelExpression)> + +--- + +##### `labels`Optional + +- *Type:* java.util.Map + +--- + +##### `namespaces`Optional + +- *Type:* [`org.cdk8s.plus27.INamespaceSelector`](#org.cdk8s.plus27.INamespaceSelector) + +--- + +#### Methods + +##### `toNetworkPolicyPeerConfig` + +```java +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```java +public toPodSelector() +``` + +##### `toPodSelectorConfig` + +```java +public toPodSelectorConfig() +``` + +#### Static Functions + +##### `all` + +```java +import org.cdk8s.plus27.Pods; + +Pods.all(Construct scope, java.lang.String id) +Pods.all(Construct scope, java.lang.String id, PodsAllOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PodsAllOptions`](#org.cdk8s.plus27.PodsAllOptions) + +--- + +##### `select` + +```java +import org.cdk8s.plus27.Pods; + +Pods.select(Construct scope, java.lang.String id, PodsSelectOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.PodsSelectOptions`](#org.cdk8s.plus27.PodsSelectOptions) + +--- + + + +### Resource + +- *Implements:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource), [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource), [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +Base class for all Kubernetes objects in stdk8s. + +Represents a single +resource. + +#### Initializers + +```java +import org.cdk8s.plus27.Resource; + +new Resource(Construct scope, java.lang.String id); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +#### Methods + +##### `asApiResource` + +```java +public asApiResource() +``` + +##### `asNonApiResource` + +```java +public asNonApiResource() +``` + + +#### Properties + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. "authorization.k8s.io"). + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `metadata`Required + +```java +public ApiObjectMetadataDefinition getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadataDefinition`](#org.cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of this API object. + +--- + +##### `permissions`Required + +```java +public ResourcePermissions getPermissions(); +``` + +- *Type:* [`org.cdk8s.plus27.ResourcePermissions`](#org.cdk8s.plus27.ResourcePermissions) + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + + +### Role + +- *Implements:* [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole) + +Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. + +#### Initializers + +```java +import org.cdk8s.plus27.Role; + +Role.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .rules(java.util.List) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `rules`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.RolePolicyRule`](#org.cdk8s.plus27.RolePolicyRule)> +- *Default:* [] + +A list of rules the role should allow. + +--- + +#### Methods + +##### `allow` + +```java +public allow(java.util.List verbs, IApiResource resources) +``` + +###### `verbs`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowCreate` + +```java +public allowCreate(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowDelete` + +```java +public allowDelete(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowDeleteCollection` + +```java +public allowDeleteCollection(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowGet` + +```java +public allowGet(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowList` + +```java +public allowList(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowPatch` + +```java +public allowPatch(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowRead` + +```java +public allowRead(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowReadWrite` + +```java +public allowReadWrite(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowUpdate` + +```java +public allowUpdate(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowWatch` + +```java +public allowWatch(IApiResource resources) +``` + +###### `resources`Required + +- *Type:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `bind` + +```java +public bind(ISubject subjects) +``` + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +a list of subjects to bind to. + +--- + +#### Static Functions + +##### `fromRoleName` + +```java +import org.cdk8s.plus27.Role; + +Role.fromRoleName(Construct scope, java.lang.String id, java.lang.String name) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `rules`Required + +```java +public java.util.List getRules(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.RolePolicyRule`](#org.cdk8s.plus27.RolePolicyRule)> + +Rules associaated with this Role. + +Returns a copy, use `allow` to add rules. + +--- + + +### RoleBinding + +A RoleBinding grants permissions within a specific namespace to a user or set of users. + +#### Initializers + +```java +import org.cdk8s.plus27.RoleBinding; + +RoleBinding.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) + .role(IRole) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +- *Type:* [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole) + +The role to bind to. + +A RoleBinding can reference a Role or a ClusterRole. + +--- + +#### Methods + +##### `addSubjects` + +```java +public addSubjects(ISubject subjects) +``` + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +The subjects to add. + +--- + + +#### Properties + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `role`Required + +```java +public IRole getRole(); +``` + +- *Type:* [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole) + +--- + +##### `subjects`Required + +```java +public java.util.List getSubjects(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject)> + +--- + + +### Secret + +- *Implements:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys. + +Storing confidential information in a +Secret is safer and more flexible than putting it verbatim in a Pod +definition or in a container image. + +> https://kubernetes.io/docs/concepts/configuration/secret + +#### Initializers + +```java +import org.cdk8s.plus27.Secret; + +Secret.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) +// .stringData(java.util.Map) +// .type(java.lang.String) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `stringData`Optional + +- *Type:* java.util.Map + +stringData allows specifying non-binary secret data in string form. + +It is +provided as a write-only convenience method. All keys and values are merged +into the data field on write, overwriting any existing values. It is never +output when reading from the API. + +--- + +##### `type`Optional + +- *Type:* `java.lang.String` +- *Default:* undefined - Don't set a type. + +Optional type associated with the secret. + +Used to facilitate programmatic +handling of secret data by various controllers. + +--- + +#### Methods + +##### `addStringData` + +```java +public addStringData(java.lang.String key, java.lang.String value) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +Key. + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +Value. + +--- + +##### `envValue` + +```java +public envValue(java.lang.String key) +public envValue(java.lang.String key, EnvValueFromSecretOptions options) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromSecretOptions`](#org.cdk8s.plus27.EnvValueFromSecretOptions) + +--- + +##### `getStringData` + +```java +public getStringData(java.lang.String key) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +Key. + +--- + +#### Static Functions + +##### `fromSecretName` + +```java +import org.cdk8s.plus27.Secret; + +Secret.fromSecretName(Construct scope, java.lang.String id, java.lang.String name) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `immutable`Required + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not the secret is immutable. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Service + +An abstract way to expose an application running on a set of Pods as a network service. + +With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. +Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them. + +For example, consider a stateless image-processing backend which is running with 3 replicas. Those replicas are fungible—frontends do not care which backend they use. +While the actual Pods that compose the backend set may change, the frontend clients should not need to be aware of that, +nor should they need to keep track of the set of backends themselves. +The Service abstraction enables this decoupling. + +If you're able to use Kubernetes APIs for service discovery in your application, you can query the API server for Endpoints, +that get updated whenever the set of Pods in a Service changes. For non-native applications, Kubernetes offers ways to place a network port +or load balancer in between your application and the backend Pods. + +#### Initializers + +```java +import org.cdk8s.plus27.Service; + +Service.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .clusterIP(java.lang.String) +// .externalIPs(java.util.List) +// .externalName(java.lang.String) +// .loadBalancerSourceRanges(java.util.List) +// .ports(java.util.List) +// .selector(IPodSelector) +// .type(ServiceType) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `clusterIP`Optional + +- *Type:* `java.lang.String` +- *Default:* Automatically assigned. + +The IP address of the service and is usually assigned randomly by the master. + +If an address is specified manually and is not in use by others, it +will be allocated to the service; otherwise, creation of the service will +fail. This field can not be changed through updates. Valid values are +"None", empty string (""), or a valid IP address. "None" can be specified +for headless services when proxying is not required. Only applies to types +ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. + +> https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + +--- + +##### `externalIPs`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No external IPs. + +A list of IP addresses for which nodes in the cluster will also accept traffic for this service. + +These IPs are not managed by Kubernetes. The user +is responsible for ensuring that traffic arrives at a node with this IP. A +common example is external load-balancers that are not part of the +Kubernetes system. + +--- + +##### `externalName`Optional + +- *Type:* `java.lang.String` +- *Default:* No external name. + +The externalName to be used when ServiceType.EXTERNAL_NAME is set. + +--- + +##### `loadBalancerSourceRanges`Optional + +- *Type:* java.util.List<`java.lang.String`> + +A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + +--- + +##### `ports`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ServicePort`](#org.cdk8s.plus27.ServicePort)> +- *Default:* either the selector ports, or none. + +The ports this service binds to. + +If the selector of the service is a managed pod / workload, +its ports will are automatically extracted and used as the default value. +Otherwise, no ports are bound. + +--- + +##### `selector`Optional + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) +- *Default:* unset, the service is assumed to have an external process managing +its endpoints, which Kubernetes will not modify. + +Which pods should the service select and route to. + +You can pass one of the following: + +* An instance of `Pod` or any workload resource (e.g `Deployment`, `StatefulSet`, ...) +* Pods selected by the `Pods.select` function. Note that in this case only labels can be specified. + +--- + +##### `type`Optional + +- *Type:* [`org.cdk8s.plus27.ServiceType`](#org.cdk8s.plus27.ServiceType) +- *Default:* ServiceType.ClusterIP + +Determines how the Service is exposed. + +More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + +--- + +#### Methods + +##### `bind` + +```java +public bind(java.lang.Number port) +public bind(java.lang.Number port, ServiceBindOptions options) +``` + +###### `port`Required + +- *Type:* `java.lang.Number` + +The port definition. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.ServiceBindOptions`](#org.cdk8s.plus27.ServiceBindOptions) + +--- + +##### `exposeViaIngress` + +```java +public exposeViaIngress(java.lang.String path) +public exposeViaIngress(java.lang.String path, ExposeServiceViaIngressOptions options) +``` + +###### `path`Required + +- *Type:* `java.lang.String` + +The path to expose the service under. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.ExposeServiceViaIngressOptions`](#org.cdk8s.plus27.ExposeServiceViaIngressOptions) + +Additional options. + +--- + +##### `select` + +```java +public select(IPodSelector selector) +``` + +###### `selector`Required + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) + +--- + +##### `selectLabel` + +```java +public selectLabel(java.lang.String key, java.lang.String value) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +--- + + +#### Properties + +##### `port`Required + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` + +Return the first port of the service. + +--- + +##### `ports`Required + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ServicePort`](#org.cdk8s.plus27.ServicePort)> + +Ports for this service. + +Use `bind()` to bind additional service ports. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `type`Required + +```java +public ServiceType getType(); +``` + +- *Type:* [`org.cdk8s.plus27.ServiceType`](#org.cdk8s.plus27.ServiceType) + +Determines how the Service is exposed. + +--- + +##### `clusterIP`Optional + +```java +public java.lang.String getClusterIP(); +``` + +- *Type:* `java.lang.String` + +The IP address of the service and is usually assigned randomly by the master. + +--- + +##### `externalName`Optional + +```java +public java.lang.String getExternalName(); +``` + +- *Type:* `java.lang.String` + +The externalName to be used for EXTERNAL_NAME types. + +--- + + +### ServiceAccount + +- *Implements:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount), [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account + +#### Initializers + +```java +import org.cdk8s.plus27.ServiceAccount; + +ServiceAccount.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountToken(java.lang.Boolean) +// .secrets(java.util.List) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether pods running as this service account should have an API token automatically mounted. + +Can be overridden at the pod level. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `secrets`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret)> + +List of secrets allowed to be used by pods running using this ServiceAccount. + +> https://kubernetes.io/docs/concepts/configuration/secret + +--- + +#### Methods + +##### `addSecret` + +```java +public addSecret(ISecret secr) +``` + +###### `secr`Required + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +The secret. + +--- + +##### `toSubjectConfiguration` + +```java +public toSubjectConfiguration() +``` + +#### Static Functions + +##### `fromServiceAccountName` + +```java +import org.cdk8s.plus27.ServiceAccount; + +ServiceAccount.fromServiceAccountName(Construct scope, java.lang.String id, java.lang.String name) +ServiceAccount.fromServiceAccountName(Construct scope, java.lang.String id, java.lang.String name, FromServiceAccountNameOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +The name of the service account resource. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.FromServiceAccountNameOptions`](#org.cdk8s.plus27.FromServiceAccountNameOptions) + +additional options. + +--- + +#### Properties + +##### `automountToken`Required + +```java +public java.lang.Boolean getAutomountToken(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not a token is automatically mounted for this service account. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `secrets`Required + +```java +public java.util.List getSecrets(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret)> + +List of secrets allowed to be used by pods running using this service account. + +Returns a copy. To add a secret, use `addSecret()`. + +--- + + +### ServiceAccountTokenSecret + +Create a secret for a service account token. + +> https://kubernetes.io/docs/concepts/configuration/secret/#service-account-token-secrets + +#### Initializers + +```java +import org.cdk8s.plus27.ServiceAccountTokenSecret; + +ServiceAccountTokenSecret.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .serviceAccount(IServiceAccount) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `serviceAccount`Required + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) + +The service account to store a secret for. + +--- + + + + + +### SshAuthSecret + +Create a secret for ssh authentication. + +> https://kubernetes.io/docs/concepts/configuration/secret/#ssh-authentication-secrets + +#### Initializers + +```java +import org.cdk8s.plus27.SshAuthSecret; + +SshAuthSecret.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .sshPrivateKey(java.lang.String) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `sshPrivateKey`Required + +- *Type:* `java.lang.String` + +The SSH private key to use. + +--- + + + + + +### StatefulSet + +- *Implements:* [`org.cdk8s.plus27.IScalable`](#org.cdk8s.plus27.IScalable) + +StatefulSet is the workload API object used to manage stateful applications. + +Manages the deployment and scaling of a set of Pods, and provides guarantees +about the ordering and uniqueness of these Pods. + +Like a Deployment, a StatefulSet manages Pods that are based on an identical +container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity +for each of their Pods. These pods are created from the same spec, but are not +interchangeable: each has a persistent identifier that it maintains across any +rescheduling. + +If you want to use storage volumes to provide persistence for your workload, you +can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet +are susceptible to failure, the persistent Pod identifiers make it easier to match existing +volumes to the new Pods that replace any that have failed. + +## Using StatefulSets + +StatefulSets are valuable for applications that require one or more of the following. + +* Stable, unique network identifiers. +* Stable, persistent storage. +* Ordered, graceful deployment and scaling. +* Ordered, automated rolling updates. + +#### Initializers + +```java +import org.cdk8s.plus27.StatefulSet; + +StatefulSet.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .minReady(Duration) +// .podManagementPolicy(PodManagementPolicy) +// .replicas(java.lang.Number) +// .service(Service) +// .strategy(StatefulSetUpdateStrategy) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReady`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `podManagementPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.PodManagementPolicy`](#org.cdk8s.plus27.PodManagementPolicy) +- *Default:* PodManagementPolicy.ORDERED_READY + +Pod management policy to use for this statefulset. + +--- + +##### `replicas`Optional + +- *Type:* `java.lang.Number` +- *Default:* 1 + +Number of desired pods. + +--- + +##### `service`Optional + +- *Type:* [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service) +- *Default:* A new headless service will be created. + +Service to associate with the statefulset. + +--- + +##### `strategy`Optional + +- *Type:* [`org.cdk8s.plus27.StatefulSetUpdateStrategy`](#org.cdk8s.plus27.StatefulSetUpdateStrategy) +- *Default:* RollingUpdate with partition set to 0 + +Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. + +--- + +#### Methods + +##### `markHasAutoscaler` + +```java +public markHasAutoscaler() +``` + +##### `toScalingTarget` + +```java +public toScalingTarget() +``` + + +#### Properties + +##### `minReady`Required + +```java +public Duration getMinReady(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +##### `podManagementPolicy`Required + +```java +public PodManagementPolicy getPodManagementPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PodManagementPolicy`](#org.cdk8s.plus27.PodManagementPolicy) + +Management policy to use for the set. + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `service`Required + +```java +public Service getService(); +``` + +- *Type:* [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service) + +--- + +##### `strategy`Required + +```java +public StatefulSetUpdateStrategy getStrategy(); +``` + +- *Type:* [`org.cdk8s.plus27.StatefulSetUpdateStrategy`](#org.cdk8s.plus27.StatefulSetUpdateStrategy) + +The update startegy of this stateful set. + +--- + +##### `replicas`Optional + +```java +public java.lang.Number getReplicas(); +``` + +- *Type:* `java.lang.Number` + +Number of desired pods. + +--- + +##### `hasAutoscaler`Required + +```java +public java.lang.Boolean getHasAutoscaler(); +``` + +- *Type:* `java.lang.Boolean` + +If this is a target of an autoscaler. + +--- + + +### TlsSecret + +Create a secret for storing a TLS certificate and its associated key. + +> https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets + +#### Initializers + +```java +import org.cdk8s.plus27.TlsSecret; + +TlsSecret.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .tlsCert(java.lang.String) + .tlsKey(java.lang.String) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `tlsCert`Required + +- *Type:* `java.lang.String` + +The TLS cert. + +--- + +##### `tlsKey`Required + +- *Type:* `java.lang.String` + +The TLS key. + +--- + + + + + +### User + +- *Implements:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +Represents a user. + +#### Methods + +##### `toSubjectConfiguration` + +```java +public toSubjectConfiguration() +``` + +#### Static Functions + +##### `fromName` + +```java +import org.cdk8s.plus27.User; + +User.fromName(Construct scope, java.lang.String id, java.lang.String name) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +--- + +##### `apiGroup`Optional + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +--- + + +### Volume + +- *Implements:* [`org.cdk8s.plus27.IStorage`](#org.cdk8s.plus27.IStorage) + +Volume represents a named volume in a pod that may be accessed by any container in the pod. + +Docker also has a concept of volumes, though it is somewhat looser and less +managed. In Docker, a volume is simply a directory on disk or in another +Container. Lifetimes are not managed and until very recently there were only +local-disk-backed volumes. Docker now provides volume drivers, but the +functionality is very limited for now (e.g. as of Docker 1.7 only one volume +driver is allowed per Container and there is no way to pass parameters to +volumes). + +A Kubernetes volume, on the other hand, has an explicit lifetime - the same +as the Pod that encloses it. Consequently, a volume outlives any Containers +that run within the Pod, and data is preserved across Container restarts. Of +course, when a Pod ceases to exist, the volume will cease to exist, too. +Perhaps more importantly than this, Kubernetes supports many types of +volumes, and a Pod can use any number of them simultaneously. + +At its core, a volume is just a directory, possibly with some data in it, +which is accessible to the Containers in a Pod. How that directory comes to +be, the medium that backs it, and the contents of it are determined by the +particular volume type used. + +To use a volume, a Pod specifies what volumes to provide for the Pod (the +.spec.volumes field) and where to mount those into Containers (the +.spec.containers[*].volumeMounts field). + +A process in a container sees a filesystem view composed from their Docker +image and volumes. The Docker image is at the root of the filesystem +hierarchy, and any volumes are mounted at the specified paths within the +image. Volumes can not mount onto other volumes + +#### Methods + +##### `asVolume` + +```java +public asVolume() +``` + +#### Static Functions + +##### `fromAwsElasticBlockStore` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromAwsElasticBlockStore(Construct scope, java.lang.String id, java.lang.String volumeId) +Volume.fromAwsElasticBlockStore(Construct scope, java.lang.String id, java.lang.String volumeId, AwsElasticBlockStoreVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `volumeId`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.AwsElasticBlockStoreVolumeOptions`](#org.cdk8s.plus27.AwsElasticBlockStoreVolumeOptions) + +--- + +##### `fromAzureDisk` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromAzureDisk(Construct scope, java.lang.String id, java.lang.String diskName, java.lang.String diskUri) +Volume.fromAzureDisk(Construct scope, java.lang.String id, java.lang.String diskName, java.lang.String diskUri, AzureDiskVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `diskName`Required + +- *Type:* `java.lang.String` + +--- + +###### `diskUri`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.AzureDiskVolumeOptions`](#org.cdk8s.plus27.AzureDiskVolumeOptions) + +--- + +##### `fromConfigMap` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromConfigMap(Construct scope, java.lang.String id, IConfigMap configMap) +Volume.fromConfigMap(Construct scope, java.lang.String id, IConfigMap configMap, ConfigMapVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `configMap`Required + +- *Type:* [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap) + +The config map to use to populate the volume. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.ConfigMapVolumeOptions`](#org.cdk8s.plus27.ConfigMapVolumeOptions) + +Options. + +--- + +##### `fromCsi` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromCsi(Construct scope, java.lang.String id, java.lang.String driver) +Volume.fromCsi(Construct scope, java.lang.String id, java.lang.String driver, CsiVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `driver`Required + +- *Type:* `java.lang.String` + +The name of the CSI driver to use to populate the volume. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.CsiVolumeOptions`](#org.cdk8s.plus27.CsiVolumeOptions) + +Options for the CSI volume, including driver-specific ones. + +--- + +##### `fromEmptyDir` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromEmptyDir(Construct scope, java.lang.String id, java.lang.String name) +Volume.fromEmptyDir(Construct scope, java.lang.String id, java.lang.String name, EmptyDirVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EmptyDirVolumeOptions`](#org.cdk8s.plus27.EmptyDirVolumeOptions) + +Additional options. + +--- + +##### `fromGcePersistentDisk` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromGcePersistentDisk(Construct scope, java.lang.String id, java.lang.String pdName) +Volume.fromGcePersistentDisk(Construct scope, java.lang.String id, java.lang.String pdName, GCEPersistentDiskVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `pdName`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.GCEPersistentDiskVolumeOptions`](#org.cdk8s.plus27.GCEPersistentDiskVolumeOptions) + +--- + +##### `fromHostPath` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromHostPath(Construct scope, java.lang.String id, java.lang.String name, HostPathVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.HostPathVolumeOptions`](#org.cdk8s.plus27.HostPathVolumeOptions) + +--- + +##### `fromNfs` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromNfs(Construct scope, java.lang.String id, java.lang.String name, NfsVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.NfsVolumeOptions`](#org.cdk8s.plus27.NfsVolumeOptions) + +--- + +##### `fromPersistentVolumeClaim` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromPersistentVolumeClaim(Construct scope, java.lang.String id, IPersistentVolumeClaim claim) +Volume.fromPersistentVolumeClaim(Construct scope, java.lang.String id, IPersistentVolumeClaim claim, PersistentVolumeClaimVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `claim`Required + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeClaimVolumeOptions`](#org.cdk8s.plus27.PersistentVolumeClaimVolumeOptions) + +--- + +##### `fromSecret` + +```java +import org.cdk8s.plus27.Volume; + +Volume.fromSecret(Construct scope, java.lang.String id, ISecret secr) +Volume.fromSecret(Construct scope, java.lang.String id, ISecret secr, SecretVolumeOptions options) +``` + +###### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `java.lang.String` + +--- + +###### `secr`Required + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +The secret to use to populate the volume. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.SecretVolumeOptions`](#org.cdk8s.plus27.SecretVolumeOptions) + +Options. + +--- + +#### Properties + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +--- + + +### Workload + +A workload is an application running on Kubernetes. + +Whether your workload is a single +component or several that work together, on Kubernetes you run it inside a set of pods. +In Kubernetes, a Pod represents a set of running containers on your cluster. + +#### Initializers + +```java +import org.cdk8s.plus27.Workload; + +Workload.Builder.create(Construct scope, java.lang.String id) +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) + .build(); +``` + +##### `scope`Required + +- *Type:* [`software.constructs.Construct`](#software.constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `java.lang.String` + +--- + +##### `metadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +#### Methods + +##### `select` + +```java +public select(LabelSelector selectors) +``` + +###### `selectors`Required + +- *Type:* [`org.cdk8s.plus27.LabelSelector`](#org.cdk8s.plus27.LabelSelector) + +--- + + +#### Properties + +##### `connections`Required + +```java +public PodConnections getConnections(); +``` + +- *Type:* [`org.cdk8s.plus27.PodConnections`](#org.cdk8s.plus27.PodConnections) + +--- + +##### `matchExpressions`Required + +```java +public java.util.List getMatchExpressions(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.LabelSelectorRequirement`](#org.cdk8s.plus27.LabelSelectorRequirement)> + +The expression matchers this workload will use in order to select pods. + +Returns a a copy. Use `select()` to add expression matchers. + +--- + +##### `matchLabels`Required + +```java +public java.util.Map getMatchLabels(); +``` + +- *Type:* java.util.Map + +The label matchers this workload will use in order to select pods. + +Returns a a copy. Use `select()` to add label matchers. + +--- + +##### `podMetadata`Required + +```java +public ApiObjectMetadataDefinition getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadataDefinition`](#org.cdk8s.ApiObjectMetadataDefinition) + +The metadata of pods in this workload. + +--- + +##### `scheduling`Required + +```java +public WorkloadScheduling getScheduling(); +``` + +- *Type:* [`org.cdk8s.plus27.WorkloadScheduling`](#org.cdk8s.plus27.WorkloadScheduling) + +--- + + +## Structs + +### AbstractPodProps + +Properties for `AbstractPod`. + +#### Initializer + +```java +import org.cdk8s.plus27.AbstractPodProps; + +AbstractPodProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +### AddDeploymentOptions + +Options to add a deployment to a service. + +#### Initializer + +```java +import org.cdk8s.plus27.AddDeploymentOptions; + +AddDeploymentOptions.builder() +// .name(java.lang.String) +// .nodePort(java.lang.Number) +// .protocol(Protocol) +// .targetPort(java.lang.Number) +// .port(java.lang.Number) + .build(); +``` + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `nodePort`Optional + +```java +public java.lang.Number getNodePort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```java +public Protocol getProtocol(); +``` + +- *Type:* [`org.cdk8s.plus27.Protocol`](#org.cdk8s.plus27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `targetPort`Optional + +```java +public java.lang.Number getTargetPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* Copied from the first container of the deployment. + +The port number the service will bind to. + +--- + +### AddDirectoryOptions + +Options for `configmap.addDirectory()`. + +#### Initializer + +```java +import org.cdk8s.plus27.AddDirectoryOptions; + +AddDirectoryOptions.builder() +// .exclude(java.util.List) +// .keyPrefix(java.lang.String) + .build(); +``` + +##### `exclude`Optional + +```java +public java.util.List getExclude(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* include all files + +Glob patterns to exclude when adding files. + +--- + +##### `keyPrefix`Optional + +```java +public java.lang.String getKeyPrefix(); +``` + +- *Type:* `java.lang.String` +- *Default:* "" + +A prefix to add to all keys in the config map. + +--- + +### ApiResourceOptions + +Options for `ApiResource`. + +#### Initializer + +```java +import org.cdk8s.plus27.ApiResourceOptions; + +ApiResourceOptions.builder() + .apiGroup(java.lang.String) + .resourceType(java.lang.String) + .build(); +``` + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +### AwsElasticBlockStorePersistentVolumeProps + +Properties for `AwsElasticBlockStorePersistentVolume`. + +#### Initializer + +```java +import org.cdk8s.plus27.AwsElasticBlockStorePersistentVolumeProps; + +AwsElasticBlockStorePersistentVolumeProps.builder() +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .volumeId(java.lang.String) +// .fsType(java.lang.String) +// .partition(java.lang.Number) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```java +public IPersistentVolumeClaim getClaim(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```java +public java.util.List getMountOptions(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```java +public PersistentVolumeReclaimPolicy getReclaimPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```java +public PersistentVolumeMode getVolumeMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `volumeId`Required + +```java +public java.lang.String getVolumeId(); +``` + +- *Type:* `java.lang.String` + +Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + +More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### AwsElasticBlockStoreVolumeOptions + +Options of `Volume.fromAwsElasticBlockStore`. + +#### Initializer + +```java +import org.cdk8s.plus27.AwsElasticBlockStoreVolumeOptions; + +AwsElasticBlockStoreVolumeOptions.builder() +// .fsType(java.lang.String) +// .name(java.lang.String) +// .partition(java.lang.Number) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto-generated + +The volume name. + +--- + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### AzureDiskPersistentVolumeProps + +Properties for `AzureDiskPersistentVolume`. + +#### Initializer + +```java +import org.cdk8s.plus27.AzureDiskPersistentVolumeProps; + +AzureDiskPersistentVolumeProps.builder() +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .diskName(java.lang.String) + .diskUri(java.lang.String) +// .cachingMode(AzureDiskPersistentVolumeCachingMode) +// .fsType(java.lang.String) +// .kind(AzureDiskPersistentVolumeKind) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```java +public IPersistentVolumeClaim getClaim(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```java +public java.util.List getMountOptions(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```java +public PersistentVolumeReclaimPolicy getReclaimPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```java +public PersistentVolumeMode getVolumeMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `diskName`Required + +```java +public java.lang.String getDiskName(); +``` + +- *Type:* `java.lang.String` + +The Name of the data disk in the blob storage. + +--- + +##### `diskUri`Required + +```java +public java.lang.String getDiskUri(); +``` + +- *Type:* `java.lang.String` + +The URI the data disk in the blob storage. + +--- + +##### `cachingMode`Optional + +```java +public AzureDiskPersistentVolumeCachingMode getCachingMode(); +``` + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode`](#org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +```java +public AzureDiskPersistentVolumeKind getKind(); +``` + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeKind`](#org.cdk8s.plus27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +### AzureDiskVolumeOptions + +Options of `Volume.fromAzureDisk`. + +#### Initializer + +```java +import org.cdk8s.plus27.AzureDiskVolumeOptions; + +AzureDiskVolumeOptions.builder() +// .cachingMode(AzureDiskPersistentVolumeCachingMode) +// .fsType(java.lang.String) +// .kind(AzureDiskPersistentVolumeKind) +// .name(java.lang.String) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `cachingMode`Optional + +```java +public AzureDiskPersistentVolumeCachingMode getCachingMode(); +``` + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode`](#org.cdk8s.plus27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +```java +public AzureDiskPersistentVolumeKind getKind(); +``` + +- *Type:* [`org.cdk8s.plus27.AzureDiskPersistentVolumeKind`](#org.cdk8s.plus27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto-generated + +The volume name. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +### BasicAuthSecretProps + +Options for `BasicAuthSecret`. + +#### Initializer + +```java +import org.cdk8s.plus27.BasicAuthSecretProps; + +BasicAuthSecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .password(java.lang.String) + .username(java.lang.String) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `password`Required + +```java +public java.lang.String getPassword(); +``` + +- *Type:* `java.lang.String` + +The password or token for authentication. + +--- + +##### `username`Required + +```java +public java.lang.String getUsername(); +``` + +- *Type:* `java.lang.String` + +The user name for authentication. + +--- + +### ClusterRoleBindingProps + +Properties for `ClusterRoleBinding`. + +#### Initializer + +```java +import org.cdk8s.plus27.ClusterRoleBindingProps; + +ClusterRoleBindingProps.builder() +// .metadata(ApiObjectMetadata) + .role(IClusterRole) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +```java +public IClusterRole getRole(); +``` + +- *Type:* [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole) + +The role to bind to. + +--- + +### ClusterRolePolicyRule + +Policy rule of a `ClusterRole. + +#### Initializer + +```java +import org.cdk8s.plus27.ClusterRolePolicyRule; + +ClusterRolePolicyRule.builder() + .endpoints(java.util.List) + .verbs(java.util.List) + .build(); +``` + +##### `endpoints`Required + +```java +public java.util.List getEndpoints(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint)> + +Endpoints this rule applies to. + +Can be either api resources +or non api resources. + +--- + +##### `verbs`Required + +```java +public java.util.List getVerbs(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Verbs to allow. + +(e.g ['get', 'watch']) + +--- + +### ClusterRoleProps + +Properties for `ClusterRole`. + +#### Initializer + +```java +import org.cdk8s.plus27.ClusterRoleProps; + +ClusterRoleProps.builder() +// .metadata(ApiObjectMetadata) +// .aggregationLabels(java.util.Map) +// .rules(java.util.List) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `aggregationLabels`Optional + +```java +public java.util.Map getAggregationLabels(); +``` + +- *Type:* java.util.Map + +Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules. + +--- + +##### `rules`Optional + +```java +public java.util.List getRules(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ClusterRolePolicyRule`](#org.cdk8s.plus27.ClusterRolePolicyRule)> +- *Default:* [] + +A list of rules the role should allow. + +--- + +### CommandProbeOptions + +Options for `Probe.fromCommand()`. + +#### Initializer + +```java +import org.cdk8s.plus27.CommandProbeOptions; + +CommandProbeOptions.builder() +// .failureThreshold(java.lang.Number) +// .initialDelaySeconds(Duration) +// .periodSeconds(Duration) +// .successThreshold(java.lang.Number) +// .timeoutSeconds(Duration) + .build(); +``` + +##### `failureThreshold`Optional + +```java +public java.lang.Number getFailureThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```java +public Duration getInitialDelaySeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```java +public Duration getPeriodSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```java +public java.lang.Number getSuccessThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```java +public Duration getTimeoutSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +### CommonSecretProps + +Common properties for `Secret`. + +#### Initializer + +```java +import org.cdk8s.plus27.CommonSecretProps; + +CommonSecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +### ConfigMapProps + +Properties for initialization of `ConfigMap`. + +#### Initializer + +```java +import org.cdk8s.plus27.ConfigMapProps; + +ConfigMapProps.builder() +// .metadata(ApiObjectMetadata) +// .binaryData(java.util.Map) +// .data(java.util.Map) +// .immutable(java.lang.Boolean) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `binaryData`Optional + +```java +public java.util.Map getBinaryData(); +``` + +- *Type:* java.util.Map + +BinaryData contains the binary data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. +BinaryData can contain byte sequences that are not in the UTF-8 range. The +keys stored in BinaryData must not overlap with the ones in the Data field, +this is enforced during validation process. + +You can also add binary data using `configMap.addBinaryData()`. + +--- + +##### `data`Optional + +```java +public java.util.Map getData(); +``` + +- *Type:* java.util.Map + +Data contains the configuration data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. Values +with non-UTF-8 byte sequences must use the BinaryData field. The keys +stored in Data must not overlap with the keys in the BinaryData field, this +is enforced during validation process. + +You can also add data using `configMap.addData()`. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +### ConfigMapVolumeOptions + +Options for the ConfigMap-based volume. + +#### Initializer + +```java +import org.cdk8s.plus27.ConfigMapVolumeOptions; + +ConfigMapVolumeOptions.builder() +// .defaultMode(java.lang.Number) +// .items(java.util.Map) +// .name(java.lang.String) +// .optional(java.lang.Boolean) + .build(); +``` + +##### `defaultMode`Optional + +```java +public java.lang.Number getDefaultMode(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 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. + +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. + +--- + +##### `items`Optional + +```java +public java.util.Map getItems(); +``` + +- *Type:* java.util.Map +- *Default:* no mapping + +If unspecified, each key-value pair in the Data field of the referenced ConfigMap 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 ConfigMap, the volume setup will +error unless it is marked optional. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto-generated + +The volume name. + +--- + +##### `optional`Optional + +```java +public java.lang.Boolean getOptional(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* undocumented + +Specify whether the ConfigMap or its keys must be defined. + +--- + +### ContainerLifecycle + +Container lifecycle properties. + +#### Initializer + +```java +import org.cdk8s.plus27.ContainerLifecycle; + +ContainerLifecycle.builder() +// .postStart(Handler) +// .preStop(Handler) + .build(); +``` + +##### `postStart`Optional + +```java +public Handler getPostStart(); +``` + +- *Type:* [`org.cdk8s.plus27.Handler`](#org.cdk8s.plus27.Handler) +- *Default:* No post start handler. + +This hook is executed immediately after a container is created. + +However, +there is no guarantee that the hook will execute before the container ENTRYPOINT. + +--- + +##### `preStop`Optional + +```java +public Handler getPreStop(); +``` + +- *Type:* [`org.cdk8s.plus27.Handler`](#org.cdk8s.plus27.Handler) +- *Default:* No pre stop handler. + +This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others. + +A call to the PreStop hook fails if the container is already in a terminated or completed state +and the hook must complete before the TERM signal to stop the container can be sent. +The Pod's termination grace period countdown begins before the PreStop hook is executed, +so regardless of the outcome of the handler, the container will eventually terminate +within the Pod's termination grace period. No parameters are passed to the handler. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination + +--- + +### ContainerOpts + +Optional properties of a container. + +#### Initializer + +```java +import org.cdk8s.plus27.ContainerOpts; + +ContainerOpts.builder() +// .args(java.util.List) +// .command(java.util.List) +// .envFrom(java.util.List) +// .envVariables(java.util.Map) +// .imagePullPolicy(ImagePullPolicy) +// .lifecycle(ContainerLifecycle) +// .liveness(Probe) +// .name(java.lang.String) +// .port(java.lang.Number) +// .portNumber(java.lang.Number) +// .ports(java.util.List) +// .readiness(Probe) +// .resources(ContainerResources) +// .securityContext(ContainerSecurityContextProps) +// .startup(Probe) +// .volumeMounts(java.util.List) +// .workingDir(java.lang.String) + .build(); +``` + +##### `args`Optional + +```java +public java.util.List getArgs(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +```java +public java.util.List getCommand(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `envFrom`Optional + +```java +public java.util.List getEnvFrom(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.EnvFrom`](#org.cdk8s.plus27.EnvFrom)> +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `envVariables`Optional + +```java +public java.util.Map getEnvVariables(); +``` + +- *Type:* java.util.Map +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `imagePullPolicy`Optional + +```java +public ImagePullPolicy getImagePullPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.ImagePullPolicy`](#org.cdk8s.plus27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +```java +public ContainerLifecycle getLifecycle(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerLifecycle`](#org.cdk8s.plus27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +```java +public Probe getLiveness(); +``` + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `portNumber`Optional + +```java +public java.lang.Number getPortNumber(); +``` + +- *Type:* `java.lang.Number` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerPort`](#org.cdk8s.plus27.ContainerPort)> +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +```java +public Probe getReadiness(); +``` + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +```java +public ContainerResources getResources(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerResources`](#org.cdk8s.plus27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `securityContext`Optional + +```java +public ContainerSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerSecurityContextProps`](#org.cdk8s.plus27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +```java +public Probe getStartup(); +``` + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volumeMounts`Optional + +```java +public java.util.List getVolumeMounts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.VolumeMount`](#org.cdk8s.plus27.VolumeMount)> + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `workingDir`Optional + +```java +public java.lang.String getWorkingDir(); +``` + +- *Type:* `java.lang.String` +- *Default:* The container runtime's default. + +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. + +--- + +### ContainerPort + +Represents a network port in a single container. + +#### Initializer + +```java +import org.cdk8s.plus27.ContainerPort; + +ContainerPort.builder() + .number(java.lang.Number) +// .hostIp(java.lang.String) +// .hostPort(java.lang.Number) +// .name(java.lang.String) +// .protocol(Protocol) + .build(); +``` + +##### `number`Required + +```java +public java.lang.Number getNumber(); +``` + +- *Type:* `java.lang.Number` + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +--- + +##### `hostIp`Optional + +```java +public java.lang.String getHostIp(); +``` + +- *Type:* `java.lang.String` +- *Default:* 127.0.0.1. + +What host IP to bind the external port to. + +--- + +##### `hostPort`Optional + +```java +public java.lang.Number getHostPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* auto generated by kubernetes and might change on restarts. + +Number of port to expose on the host. + +If specified, this must be a valid port number, 0 < x < 65536. +Most containers do not need this. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* port is not named. + +If specified, this must be an IANA_SVC_NAME and unique within the pod. + +Each named port in a pod must have a unique name. +Name for the port that can be referred to by services. + +--- + +##### `protocol`Optional + +```java +public Protocol getProtocol(); +``` + +- *Type:* [`org.cdk8s.plus27.Protocol`](#org.cdk8s.plus27.Protocol) +- *Default:* Protocol.TCP + +Protocol for port. + +Must be UDP, TCP, or SCTP. Defaults to "TCP". + +--- + +### ContainerProps + +Properties for creating a container. + +#### Initializer + +```java +import org.cdk8s.plus27.ContainerProps; + +ContainerProps.builder() +// .args(java.util.List) +// .command(java.util.List) +// .envFrom(java.util.List) +// .envVariables(java.util.Map) +// .imagePullPolicy(ImagePullPolicy) +// .lifecycle(ContainerLifecycle) +// .liveness(Probe) +// .name(java.lang.String) +// .port(java.lang.Number) +// .portNumber(java.lang.Number) +// .ports(java.util.List) +// .readiness(Probe) +// .resources(ContainerResources) +// .securityContext(ContainerSecurityContextProps) +// .startup(Probe) +// .volumeMounts(java.util.List) +// .workingDir(java.lang.String) + .image(java.lang.String) + .build(); +``` + +##### `args`Optional + +```java +public java.util.List getArgs(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +```java +public java.util.List getCommand(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `envFrom`Optional + +```java +public java.util.List getEnvFrom(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.EnvFrom`](#org.cdk8s.plus27.EnvFrom)> +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `envVariables`Optional + +```java +public java.util.Map getEnvVariables(); +``` + +- *Type:* java.util.Map +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `imagePullPolicy`Optional + +```java +public ImagePullPolicy getImagePullPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.ImagePullPolicy`](#org.cdk8s.plus27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +```java +public ContainerLifecycle getLifecycle(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerLifecycle`](#org.cdk8s.plus27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +```java +public Probe getLiveness(); +``` + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `portNumber`Optional + +```java +public java.lang.Number getPortNumber(); +``` + +- *Type:* `java.lang.Number` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerPort`](#org.cdk8s.plus27.ContainerPort)> +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +```java +public Probe getReadiness(); +``` + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +```java +public ContainerResources getResources(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerResources`](#org.cdk8s.plus27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `securityContext`Optional + +```java +public ContainerSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerSecurityContextProps`](#org.cdk8s.plus27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +```java +public Probe getStartup(); +``` + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volumeMounts`Optional + +```java +public java.util.List getVolumeMounts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.VolumeMount`](#org.cdk8s.plus27.VolumeMount)> + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `workingDir`Optional + +```java +public java.lang.String getWorkingDir(); +``` + +- *Type:* `java.lang.String` +- *Default:* The container runtime's default. + +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. + +--- + +##### `image`Required + +```java +public java.lang.String getImage(); +``` + +- *Type:* `java.lang.String` + +Docker image name. + +--- + +### ContainerResources + +CPU and memory compute resources. + +#### Initializer + +```java +import org.cdk8s.plus27.ContainerResources; + +ContainerResources.builder() +// .cpu(CpuResources) +// .ephemeralStorage(EphemeralStorageResources) +// .memory(MemoryResources) + .build(); +``` + +##### `cpu`Optional + +```java +public CpuResources getCpu(); +``` + +- *Type:* [`org.cdk8s.plus27.CpuResources`](#org.cdk8s.plus27.CpuResources) + +--- + +##### `ephemeralStorage`Optional + +```java +public EphemeralStorageResources getEphemeralStorage(); +``` + +- *Type:* [`org.cdk8s.plus27.EphemeralStorageResources`](#org.cdk8s.plus27.EphemeralStorageResources) + +--- + +##### `memory`Optional + +```java +public MemoryResources getMemory(); +``` + +- *Type:* [`org.cdk8s.plus27.MemoryResources`](#org.cdk8s.plus27.MemoryResources) + +--- + +### ContainerSecurityContextProps + +Properties for `ContainerSecurityContext`. + +#### Initializer + +```java +import org.cdk8s.plus27.ContainerSecurityContextProps; + +ContainerSecurityContextProps.builder() +// .allowPrivilegeEscalation(java.lang.Boolean) +// .ensureNonRoot(java.lang.Boolean) +// .group(java.lang.Number) +// .privileged(java.lang.Boolean) +// .readOnlyRootFilesystem(java.lang.Boolean) +// .user(java.lang.Number) + .build(); +``` + +##### `allowPrivilegeEscalation`Optional + +```java +public java.lang.Boolean getAllowPrivilegeEscalation(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Whether a process can gain more privileges than its parent process. + +--- + +##### `ensureNonRoot`Optional + +```java +public java.lang.Boolean getEnsureNonRoot(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +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. + +--- + +##### `group`Optional + +```java +public java.lang.Number getGroup(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 26000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The GID to run the entrypoint of the container process. + +--- + +##### `privileged`Optional + +```java +public java.lang.Boolean getPrivileged(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Run container in privileged mode. + +Processes in privileged containers are essentially equivalent to root on the host. + +--- + +##### `readOnlyRootFilesystem`Optional + +```java +public java.lang.Boolean getReadOnlyRootFilesystem(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Whether this container has a read-only root filesystem. + +--- + +##### `user`Optional + +```java +public java.lang.Number getUser(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 25000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The UID to run the entrypoint of the container process. + +--- + +### CpuResources + +CPU request and limit. + +#### Initializer + +```java +import org.cdk8s.plus27.CpuResources; + +CpuResources.builder() +// .limit(Cpu) +// .request(Cpu) + .build(); +``` + +##### `limit`Optional + +```java +public Cpu getLimit(); +``` + +- *Type:* [`org.cdk8s.plus27.Cpu`](#org.cdk8s.plus27.Cpu) + +--- + +##### `request`Optional + +```java +public Cpu getRequest(); +``` + +- *Type:* [`org.cdk8s.plus27.Cpu`](#org.cdk8s.plus27.Cpu) + +--- + +### CronJobProps + +Properties for `CronJob`. + +#### Initializer + +```java +import org.cdk8s.plus27.CronJobProps; + +CronJobProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .activeDeadline(Duration) +// .backoffLimit(java.lang.Number) +// .ttlAfterFinished(Duration) + .schedule(Cron) +// .concurrencyPolicy(ConcurrencyPolicy) +// .failedJobsRetained(java.lang.Number) +// .startingDeadline(Duration) +// .successfulJobsRetained(java.lang.Number) +// .suspend(java.lang.Boolean) +// .timeZone(java.lang.String) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```java +public ApiObjectMetadata getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```java +public java.lang.Boolean getSelect(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```java +public java.lang.Boolean getSpread(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `activeDeadline`Optional + +```java +public Duration getActiveDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoffLimit`Optional + +```java +public java.lang.Number getBackoffLimit(); +``` + +- *Type:* `java.lang.Number` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttlAfterFinished`Optional + +```java +public Duration getTtlAfterFinished(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +##### `schedule`Required + +```java +public Cron getSchedule(); +``` + +- *Type:* [`org.cdk8s.Cron`](#org.cdk8s.Cron) + +Specifies the time in which the job would run again. + +This is defined as a cron expression in the CronJob resource. + +--- + +##### `concurrencyPolicy`Optional + +```java +public ConcurrencyPolicy getConcurrencyPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.ConcurrencyPolicy`](#org.cdk8s.plus27.ConcurrencyPolicy) +- *Default:* ConcurrencyPolicy.Forbid + +Specifies the concurrency policy for the job. + +--- + +##### `failedJobsRetained`Optional + +```java +public java.lang.Number getFailedJobsRetained(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 + +Specifies the number of failed jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `startingDeadline`Optional + +```java +public Duration getStartingDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(10) + +Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. + +This deadline specifies +how much time can pass after a schedule point, for which kubernetes can still start the job. +For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after +the scheduled time. + +Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 +seconds is not allowed, as it may cause your job to never be scheduled. + +In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). +This property also controls what time interval should kubernetes consider when counting for missed schedules. + +For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00, +and its `startingDeadline` field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00, +the job will not start as the number of missed jobs which missed their schedule is greater than 100. +However, if `startingDeadline` is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus +start a new execution at 10:22:00. + +--- + +##### `successfulJobsRetained`Optional + +```java +public java.lang.Number getSuccessfulJobsRetained(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 3 + +Specifies the number of successful jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `suspend`Optional + +```java +public java.lang.Boolean getSuspend(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specifies if the cron job should be suspended. + +Only applies to future executions, current ones are remained untouched. + +--- + +##### `timeZone`Optional + +```java +public java.lang.String getTimeZone(); +``` + +- *Type:* `java.lang.String` +- *Default:* Timezone of kube-controller-manager process. + +Specifies the timezone for the job. + +This helps aligining the schedule to follow the specified timezone. + +> {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} for list of valid timezone values. + +--- + +### CsiVolumeOptions + +Options for the CSI driver based volume. + +#### Initializer + +```java +import org.cdk8s.plus27.CsiVolumeOptions; + +CsiVolumeOptions.builder() +// .attributes(java.util.Map) +// .fsType(java.lang.String) +// .name(java.lang.String) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `attributes`Optional + +```java +public java.util.Map getAttributes(); +``` + +- *Type:* java.util.Map +- *Default:* undefined + +Any driver-specific attributes to pass to the CSI volume builder. + +--- + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* driver-dependent + +The filesystem type to mount. + +Ex. "ext4", "xfs", "ntfs". If not provided, +the empty value is passed to the associated CSI driver, which will +determine the default filesystem to apply. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto-generated + +The volume name. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Whether the mounted volume should be read-only or not. + +--- + +### DaemonSetProps + +Properties for `DaemonSet`. + +#### Initializer + +```java +import org.cdk8s.plus27.DaemonSetProps; + +DaemonSetProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .minReadySeconds(java.lang.Number) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```java +public ApiObjectMetadata getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```java +public java.lang.Boolean getSelect(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```java +public java.lang.Boolean getSpread(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReadySeconds`Optional + +```java +public java.lang.Number getMinReadySeconds(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 0 + +Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +### DeploymentExposeViaServiceOptions + +Options for `Deployment.exposeViaService`. + +#### Initializer + +```java +import org.cdk8s.plus27.DeploymentExposeViaServiceOptions; + +DeploymentExposeViaServiceOptions.builder() +// .name(java.lang.String) +// .ports(java.util.List) +// .serviceType(ServiceType) + .build(); +``` + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ServicePort`](#org.cdk8s.plus27.ServicePort)> +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +##### `serviceType`Optional + +```java +public ServiceType getServiceType(); +``` + +- *Type:* [`org.cdk8s.plus27.ServiceType`](#org.cdk8s.plus27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +### DeploymentProps + +Properties for `Deployment`. + +#### Initializer + +```java +import org.cdk8s.plus27.DeploymentProps; + +DeploymentProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .minReady(Duration) +// .progressDeadline(Duration) +// .replicas(java.lang.Number) +// .strategy(DeploymentStrategy) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```java +public ApiObjectMetadata getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```java +public java.lang.Boolean getSelect(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```java +public java.lang.Boolean getSpread(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReady`Optional + +```java +public Duration getMinReady(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `progressDeadline`Optional + +```java +public Duration getProgressDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(600) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +The deployment controller will continue +to process failed deployments and a condition with a ProgressDeadlineExceeded +reason will be surfaced in the deployment status. + +Note that progress will not be estimated during the time a deployment is paused. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds + +--- + +##### `replicas`Optional + +```java +public java.lang.Number getReplicas(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 2 + +Number of desired pods. + +--- + +##### `strategy`Optional + +```java +public DeploymentStrategy getStrategy(); +``` + +- *Type:* [`org.cdk8s.plus27.DeploymentStrategy`](#org.cdk8s.plus27.DeploymentStrategy) +- *Default:* RollingUpdate with maxSurge and maxUnavailable set to 25%. + +Specifies the strategy used to replace old Pods by new ones. + +--- + +### DeploymentStrategyRollingUpdateOptions + +Options for `DeploymentStrategy.rollingUpdate`. + +#### Initializer + +```java +import org.cdk8s.plus27.DeploymentStrategyRollingUpdateOptions; + +DeploymentStrategyRollingUpdateOptions.builder() +// .maxSurge(PercentOrAbsolute) +// .maxUnavailable(PercentOrAbsolute) + .build(); +``` + +##### `maxSurge`Optional + +```java +public PercentOrAbsolute getMaxSurge(); +``` + +- *Type:* [`org.cdk8s.plus27.PercentOrAbsolute`](#org.cdk8s.plus27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be scheduled above the desired number of pods. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding up. +This can not be 0 if `maxUnavailable` is 0. + +Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update +starts, such that the total number of old and new pods do not exceed 130% of desired pods. +Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that +total number of pods running at any time during the update is at most 130% of desired pods. + +--- + +##### `maxUnavailable`Optional + +```java +public PercentOrAbsolute getMaxUnavailable(); +``` + +- *Type:* [`org.cdk8s.plus27.PercentOrAbsolute`](#org.cdk8s.plus27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be unavailable during the update. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding down. +This can not be 0 if `maxSurge` is 0. + +Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired +pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can +be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total +number of pods available at all times during the update is at least 70% of desired pods. + +--- + +### DnsOption + +Custom DNS option. + +#### Initializer + +```java +import org.cdk8s.plus27.DnsOption; + +DnsOption.builder() + .name(java.lang.String) +// .value(java.lang.String) + .build(); +``` + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +Option name. + +--- + +##### `value`Optional + +```java +public java.lang.String getValue(); +``` + +- *Type:* `java.lang.String` +- *Default:* No value. + +Option value. + +--- + +### DockerConfigSecretProps + +Options for `DockerConfigSecret`. + +#### Initializer + +```java +import org.cdk8s.plus27.DockerConfigSecretProps; + +DockerConfigSecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .data(java.util.Map) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `data`Required + +```java +public java.util.Map getData(); +``` + +- *Type:* java.util.Map + +JSON content to provide for the `~/.docker/config.json` file. This will be stringified and inserted as stringData. + +> https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file + +--- + +### EmptyDirVolumeOptions + +Options for volumes populated with an empty directory. + +#### Initializer + +```java +import org.cdk8s.plus27.EmptyDirVolumeOptions; + +EmptyDirVolumeOptions.builder() +// .medium(EmptyDirMedium) +// .sizeLimit(Size) + .build(); +``` + +##### `medium`Optional + +```java +public EmptyDirMedium getMedium(); +``` + +- *Type:* [`org.cdk8s.plus27.EmptyDirMedium`](#org.cdk8s.plus27.EmptyDirMedium) +- *Default:* EmptyDirMedium.DEFAULT + +By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. + +However, you can set the emptyDir.medium field to +`EmptyDirMedium.MEMORY` to tell Kubernetes to mount a tmpfs (RAM-backed +filesystem) for you instead. While tmpfs is very fast, be aware that unlike +disks, tmpfs is cleared on node reboot and any files you write will count +against your Container's memory limit. + +--- + +##### `sizeLimit`Optional + +```java +public Size getSizeLimit(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* limit is undefined + +Total amount of local storage required for this EmptyDir volume. + +The size +limit is also applicable for memory medium. The maximum usage on memory +medium EmptyDir would be the minimum value between the SizeLimit specified +here and the sum of memory limits of all containers in a pod. + +--- + +### EnvValueFromConfigMapOptions + +Options to specify an envionment variable value from a ConfigMap key. + +#### Initializer + +```java +import org.cdk8s.plus27.EnvValueFromConfigMapOptions; + +EnvValueFromConfigMapOptions.builder() +// .optional(java.lang.Boolean) + .build(); +``` + +##### `optional`Optional + +```java +public java.lang.Boolean getOptional(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify whether the ConfigMap or its key must be defined. + +--- + +### EnvValueFromFieldRefOptions + +Options to specify an environment variable value from a field reference. + +#### Initializer + +```java +import org.cdk8s.plus27.EnvValueFromFieldRefOptions; + +EnvValueFromFieldRefOptions.builder() +// .apiVersion(java.lang.String) +// .key(java.lang.String) + .build(); +``` + +##### `apiVersion`Optional + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +Version of the schema the FieldPath is written in terms of. + +--- + +##### `key`Optional + +```java +public java.lang.String getKey(); +``` + +- *Type:* `java.lang.String` + +The key to select the pod label or annotation. + +--- + +### EnvValueFromProcessOptions + +Options to specify an environment variable value from the process environment. + +#### Initializer + +```java +import org.cdk8s.plus27.EnvValueFromProcessOptions; + +EnvValueFromProcessOptions.builder() +// .required(java.lang.Boolean) + .build(); +``` + +##### `required`Optional + +```java +public java.lang.Boolean getRequired(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify whether the key must exist in the environment. + +If this is set to true, and the key does not exist, an error will thrown. + +--- + +### EnvValueFromResourceOptions + +Options to specify an environment variable value from a resource. + +#### Initializer + +```java +import org.cdk8s.plus27.EnvValueFromResourceOptions; + +EnvValueFromResourceOptions.builder() +// .container(Container) +// .divisor(java.lang.String) + .build(); +``` + +##### `container`Optional + +```java +public Container getContainer(); +``` + +- *Type:* [`org.cdk8s.plus27.Container`](#org.cdk8s.plus27.Container) + +The container to select the value from. + +--- + +##### `divisor`Optional + +```java +public java.lang.String getDivisor(); +``` + +- *Type:* `java.lang.String` + +The output format of the exposed resource. + +--- + +### EnvValueFromSecretOptions + +Options to specify an environment variable value from a Secret. + +#### Initializer + +```java +import org.cdk8s.plus27.EnvValueFromSecretOptions; + +EnvValueFromSecretOptions.builder() +// .optional(java.lang.Boolean) + .build(); +``` + +##### `optional`Optional + +```java +public java.lang.Boolean getOptional(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify whether the Secret or its key must be defined. + +--- + +### EphemeralStorageResources + +Emphemeral storage request and limit. + +#### Initializer + +```java +import org.cdk8s.plus27.EphemeralStorageResources; + +EphemeralStorageResources.builder() +// .limit(Size) +// .request(Size) + .build(); +``` + +##### `limit`Optional + +```java +public Size getLimit(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) + +--- + +##### `request`Optional + +```java +public Size getRequest(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) + +--- + +### ExposeDeploymentViaIngressOptions + +Options for exposing a deployment via an ingress. + +#### Initializer + +```java +import org.cdk8s.plus27.ExposeDeploymentViaIngressOptions; + +ExposeDeploymentViaIngressOptions.builder() +// .name(java.lang.String) +// .ports(java.util.List) +// .serviceType(ServiceType) +// .ingress(Ingress) +// .pathType(HttpIngressPathType) + .build(); +``` + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ServicePort`](#org.cdk8s.plus27.ServicePort)> +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +##### `serviceType`Optional + +```java +public ServiceType getServiceType(); +``` + +- *Type:* [`org.cdk8s.plus27.ServiceType`](#org.cdk8s.plus27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +##### `ingress`Optional + +```java +public Ingress getIngress(); +``` + +- *Type:* [`org.cdk8s.plus27.Ingress`](#org.cdk8s.plus27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +##### `pathType`Optional + +```java +public HttpIngressPathType getPathType(); +``` + +- *Type:* [`org.cdk8s.plus27.HttpIngressPathType`](#org.cdk8s.plus27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +### ExposeServiceViaIngressOptions + +Options for exposing a service using an ingress. + +#### Initializer + +```java +import org.cdk8s.plus27.ExposeServiceViaIngressOptions; + +ExposeServiceViaIngressOptions.builder() +// .ingress(Ingress) +// .pathType(HttpIngressPathType) + .build(); +``` + +##### `ingress`Optional + +```java +public Ingress getIngress(); +``` + +- *Type:* [`org.cdk8s.plus27.Ingress`](#org.cdk8s.plus27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +##### `pathType`Optional + +```java +public HttpIngressPathType getPathType(); +``` + +- *Type:* [`org.cdk8s.plus27.HttpIngressPathType`](#org.cdk8s.plus27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +### FromServiceAccountNameOptions + +#### Initializer + +```java +import org.cdk8s.plus27.FromServiceAccountNameOptions; + +FromServiceAccountNameOptions.builder() +// .namespaceName(java.lang.String) + .build(); +``` + +##### `namespaceName`Optional + +```java +public java.lang.String getNamespaceName(); +``` + +- *Type:* `java.lang.String` +- *Default:* "default" + +The name of the namespace the service account belongs to. + +--- + +### GCEPersistentDiskPersistentVolumeProps + +Properties for `GCEPersistentDiskPersistentVolume`. + +#### Initializer + +```java +import org.cdk8s.plus27.GCEPersistentDiskPersistentVolumeProps; + +GCEPersistentDiskPersistentVolumeProps.builder() +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .pdName(java.lang.String) +// .fsType(java.lang.String) +// .partition(java.lang.Number) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```java +public IPersistentVolumeClaim getClaim(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```java +public java.util.List getMountOptions(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```java +public PersistentVolumeReclaimPolicy getReclaimPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```java +public PersistentVolumeMode getVolumeMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `pdName`Required + +```java +public java.lang.String getPdName(); +``` + +- *Type:* `java.lang.String` + +Unique name of the PD resource in GCE. + +Used to identify the disk in GCE. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +--- + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### GCEPersistentDiskVolumeOptions + +Options of `Volume.fromGcePersistentDisk`. + +#### Initializer + +```java +import org.cdk8s.plus27.GCEPersistentDiskVolumeOptions; + +GCEPersistentDiskVolumeOptions.builder() +// .fsType(java.lang.String) +// .name(java.lang.String) +// .partition(java.lang.Number) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `fsType`Optional + +```java +public java.lang.String getFsType(); +``` + +- *Type:* `java.lang.String` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto-generated + +The volume name. + +--- + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### HandlerFromHttpGetOptions + +Options for `Handler.fromHttpGet`. + +#### Initializer + +```java +import org.cdk8s.plus27.HandlerFromHttpGetOptions; + +HandlerFromHttpGetOptions.builder() +// .port(java.lang.Number) + .build(); +``` + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +### HandlerFromTcpSocketOptions + +Options for `Handler.fromTcpSocket`. + +#### Initializer + +```java +import org.cdk8s.plus27.HandlerFromTcpSocketOptions; + +HandlerFromTcpSocketOptions.builder() +// .host(java.lang.String) +// .port(java.lang.Number) + .build(); +``` + +##### `host`Optional + +```java +public java.lang.String getHost(); +``` + +- *Type:* `java.lang.String` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + +### HorizontalPodAutoscalerProps + +Properties for HorizontalPodAutoscaler. + +#### Initializer + +```java +import org.cdk8s.plus27.HorizontalPodAutoscalerProps; + +HorizontalPodAutoscalerProps.builder() +// .metadata(ApiObjectMetadata) + .maxReplicas(java.lang.Number) + .target(IScalable) +// .metrics(java.util.List) +// .minReplicas(java.lang.Number) +// .scaleDown(ScalingRules) +// .scaleUp(ScalingRules) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `maxReplicas`Required + +```java +public java.lang.Number getMaxReplicas(); +``` + +- *Type:* `java.lang.Number` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `target`Required + +```java +public IScalable getTarget(); +``` + +- *Type:* [`org.cdk8s.plus27.IScalable`](#org.cdk8s.plus27.IScalable) + +The workload to scale up or down. + +Scalable workload types: + +* Deployment +* StatefulSet + +--- + +##### `metrics`Optional + +```java +public java.util.List getMetrics(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Metric`](#org.cdk8s.plus27.Metric)> +- *Default:* If metrics are not provided, then the target resource +constraints (e.g. cpu limit) will be used as scaling metrics. + +The metric conditions that trigger a scale up or scale down. + +--- + +##### `minReplicas`Optional + +```java +public java.lang.Number getMinReplicas(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 + +The minimum number of replicas that can be scaled down to. + +Can be set to 0 if the alpha feature gate `HPAScaleToZero` is enabled and +at least one Object or External metric is configured. + +--- + +##### `scaleDown`Optional + +```java +public ScalingRules getScaleDown(); +``` + +- *Type:* [`org.cdk8s.plus27.ScalingRules`](#org.cdk8s.plus27.ScalingRules) +- *Default:* Scale down to minReplica count with a 5 minute stabilization window. + +The scaling behavior when scaling down. + +--- + +##### `scaleUp`Optional + +```java +public ScalingRules getScaleUp(); +``` + +- *Type:* [`org.cdk8s.plus27.ScalingRules`](#org.cdk8s.plus27.ScalingRules) +- *Default:* Is the higher of: +* Increase no more than 4 pods per 60 seconds +* Double the number of pods per 60 seconds + +The scaling behavior when scaling up. + +--- + +### HostAlias + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's /etc/hosts file. + +#### Initializer + +```java +import org.cdk8s.plus27.HostAlias; + +HostAlias.builder() + .hostnames(java.util.List) + .ip(java.lang.String) + .build(); +``` + +##### `hostnames`Required + +```java +public java.util.List getHostnames(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Hostnames for the chosen IP address. + +--- + +##### `ip`Required + +```java +public java.lang.String getIp(); +``` + +- *Type:* `java.lang.String` + +IP address of the host file entry. + +--- + +### HostPathVolumeOptions + +Options for a HostPathVolume-based volume. + +#### Initializer + +```java +import org.cdk8s.plus27.HostPathVolumeOptions; + +HostPathVolumeOptions.builder() + .path(java.lang.String) +// .type(HostPathVolumeType) + .build(); +``` + +##### `path`Required + +```java +public java.lang.String getPath(); +``` + +- *Type:* `java.lang.String` + +The path of the directory on the host. + +--- + +##### `type`Optional + +```java +public HostPathVolumeType getType(); +``` + +- *Type:* [`org.cdk8s.plus27.HostPathVolumeType`](#org.cdk8s.plus27.HostPathVolumeType) +- *Default:* HostPathVolumeType.DEFAULT + +The expected type of the path found on the host. + +--- + +### HttpGetProbeOptions + +Options for `Probe.fromHttpGet()`. + +#### Initializer + +```java +import org.cdk8s.plus27.HttpGetProbeOptions; + +HttpGetProbeOptions.builder() +// .failureThreshold(java.lang.Number) +// .initialDelaySeconds(Duration) +// .periodSeconds(Duration) +// .successThreshold(java.lang.Number) +// .timeoutSeconds(Duration) +// .port(java.lang.Number) +// .scheme(ConnectionScheme) + .build(); +``` + +##### `failureThreshold`Optional + +```java +public java.lang.Number getFailureThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```java +public Duration getInitialDelaySeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```java +public Duration getPeriodSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```java +public java.lang.Number getSuccessThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```java +public Duration getTimeoutSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +##### `scheme`Optional + +```java +public ConnectionScheme getScheme(); +``` + +- *Type:* [`org.cdk8s.plus27.ConnectionScheme`](#org.cdk8s.plus27.ConnectionScheme) +- *Default:* ConnectionScheme.HTTP + +Scheme to use for connecting to the host (HTTP or HTTPS). + +--- + +### IngressProps + +Properties for `Ingress`. + +#### Initializer + +```java +import org.cdk8s.plus27.IngressProps; + +IngressProps.builder() +// .metadata(ApiObjectMetadata) +// .defaultBackend(IngressBackend) +// .rules(java.util.List) +// .tls(java.util.List) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `defaultBackend`Optional + +```java +public IngressBackend getDefaultBackend(); +``` + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +The default backend services requests that do not match any rule. + +Using this option or the `addDefaultBackend()` method is equivalent to +adding a rule with both `path` and `host` undefined. + +--- + +##### `rules`Optional + +```java +public java.util.List getRules(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.IngressRule`](#org.cdk8s.plus27.IngressRule)> + +Routing rules for this ingress. + +Each rule must define an `IngressBackend` that will receive the requests +that match this rule. If both `host` and `path` are not specifiec, this +backend will be used as the default backend of the ingress. + +You can also add rules later using `addRule()`, `addHostRule()`, +`addDefaultBackend()` and `addHostDefaultBackend()`. + +--- + +##### `tls`Optional + +```java +public java.util.List getTls(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.IngressTls`](#org.cdk8s.plus27.IngressTls)> + +TLS settings for this ingress. + +Using this option tells the ingress controller to expose a TLS endpoint. +Currently the Ingress only supports a single TLS port, 443. If multiple +members of this list specify different hosts, they will be multiplexed on +the same port according to the hostname specified through the SNI TLS +extension, if the ingress controller fulfilling the ingress supports SNI. + +--- + +### IngressRule + +Represents the rules mapping the paths under a specified host to the related backend services. + +Incoming requests are first evaluated for a host match, +then routed to the backend associated with the matching path. + +#### Initializer + +```java +import org.cdk8s.plus27.IngressRule; + +IngressRule.builder() + .backend(IngressBackend) +// .host(java.lang.String) +// .path(java.lang.String) +// .pathType(HttpIngressPathType) + .build(); +``` + +##### `backend`Required + +```java +public IngressBackend getBackend(); +``` + +- *Type:* [`org.cdk8s.plus27.IngressBackend`](#org.cdk8s.plus27.IngressBackend) + +Backend defines the referenced service endpoint to which the traffic will be forwarded to. + +--- + +##### `host`Optional + +```java +public java.lang.String getHost(); +``` + +- *Type:* `java.lang.String` +- *Default:* If the host is unspecified, the Ingress routes all traffic based +on the specified IngressRuleValue. + +Host is the fully qualified domain name of a network host, as defined by RFC 3986. + +Note the following deviations from the "host" part of the URI as +defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue +can only apply to the IP in the Spec of the parent Ingress. 2. The `:` +delimiter is not respected because ports are not allowed. Currently the +port of an Ingress is implicitly :80 for http and :443 for https. Both +these may change in the future. Incoming requests are matched against the +host before the IngressRuleValue. + +--- + +##### `path`Optional + +```java +public java.lang.String getPath(); +``` + +- *Type:* `java.lang.String` +- *Default:* If unspecified, the path defaults to a catch all sending traffic +to the backend. + +Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/'. + +--- + +##### `pathType`Optional + +```java +public HttpIngressPathType getPathType(); +``` + +- *Type:* [`org.cdk8s.plus27.HttpIngressPathType`](#org.cdk8s.plus27.HttpIngressPathType) + +Specify how the path is matched against request paths. + +By default, path +types will be matched by prefix. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +--- + +### IngressTls + +Represents the TLS configuration mapping that is passed to the ingress controller for SSL termination. + +#### Initializer + +```java +import org.cdk8s.plus27.IngressTls; + +IngressTls.builder() +// .hosts(java.util.List) +// .secret(ISecret) + .build(); +``` + +##### `hosts`Optional + +```java +public java.util.List getHosts(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* If unspecified, it defaults to the wildcard host setting for +the loadbalancer controller fulfilling this Ingress. + +Hosts are a list of hosts included in the TLS certificate. + +The values in +this list must match the name/s used in the TLS Secret. + +--- + +##### `secret`Optional + +```java +public ISecret getSecret(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* If unspecified, it allows SSL routing based on SNI hostname. + +Secret is the secret that contains the certificate and key used to terminate SSL traffic on 443. + +If the SNI host in a listener conflicts with +the "Host" header field used by an IngressRule, the SNI host is used for +termination and value of the Host header is used for routing. + +--- + +### JobProps + +Properties for `Job`. + +#### Initializer + +```java +import org.cdk8s.plus27.JobProps; + +JobProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .activeDeadline(Duration) +// .backoffLimit(java.lang.Number) +// .ttlAfterFinished(Duration) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```java +public ApiObjectMetadata getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```java +public java.lang.Boolean getSelect(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```java +public java.lang.Boolean getSpread(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `activeDeadline`Optional + +```java +public Duration getActiveDeadline(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoffLimit`Optional + +```java +public java.lang.Number getBackoffLimit(); +``` + +- *Type:* `java.lang.Number` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttlAfterFinished`Optional + +```java +public Duration getTtlAfterFinished(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +### LabelSelectorOptions + +Options for `LabelSelector.of`. + +#### Initializer + +```java +import org.cdk8s.plus27.LabelSelectorOptions; + +LabelSelectorOptions.builder() +// .expressions(java.util.List) +// .labels(java.util.Map) + .build(); +``` + +##### `expressions`Optional + +```java +public java.util.List getExpressions(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.LabelExpression`](#org.cdk8s.plus27.LabelExpression)> + +Expression based label matchers. + +--- + +##### `labels`Optional + +```java +public java.util.Map getLabels(); +``` + +- *Type:* java.util.Map + +Strict label matchers. + +--- + +### LabelSelectorRequirement + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + +#### Initializer + +```java +import org.cdk8s.plus27.LabelSelectorRequirement; + +LabelSelectorRequirement.builder() + .key(java.lang.String) + .operator(java.lang.String) +// .values(java.util.List) + .build(); +``` + +##### `key`Required + +```java +public java.lang.String getKey(); +``` + +- *Type:* `java.lang.String` + +The label key that the selector applies to. + +--- + +##### `operator`Required + +```java +public java.lang.String getOperator(); +``` + +- *Type:* `java.lang.String` + +Represents a key's relationship to a set of values. + +--- + +##### `values`Optional + +```java +public java.util.List getValues(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +An array of string values. + +If the operator is In or NotIn, the values array +must be non-empty. If the operator is Exists or DoesNotExist, +the values array must be empty. This array is replaced during a strategic merge patch. + +--- + +### MemoryResources + +Memory request and limit. + +#### Initializer + +```java +import org.cdk8s.plus27.MemoryResources; + +MemoryResources.builder() +// .limit(Size) +// .request(Size) + .build(); +``` + +##### `limit`Optional + +```java +public Size getLimit(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) + +--- + +##### `request`Optional + +```java +public Size getRequest(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) + +--- + +### MetricContainerResourceOptions + +Options for `Metric.containerResource()`. + +#### Initializer + +```java +import org.cdk8s.plus27.MetricContainerResourceOptions; + +MetricContainerResourceOptions.builder() + .container(Container) + .target(MetricTarget) + .build(); +``` + +##### `container`Required + +```java +public Container getContainer(); +``` + +- *Type:* [`org.cdk8s.plus27.Container`](#org.cdk8s.plus27.Container) + +Container where the metric can be found. + +--- + +##### `target`Required + +```java +public MetricTarget getTarget(); +``` + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +### MetricObjectOptions + +Options for `Metric.object()`. + +#### Initializer + +```java +import org.cdk8s.plus27.MetricObjectOptions; + +MetricObjectOptions.builder() + .name(java.lang.String) + .target(MetricTarget) +// .labelSelector(LabelSelector) + .object(IResource) + .build(); +``` + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of the metric to scale on. + +--- + +##### `target`Required + +```java +public MetricTarget getTarget(); +``` + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +##### `labelSelector`Optional + +```java +public LabelSelector getLabelSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.LabelSelector`](#org.cdk8s.plus27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +##### `object`Required + +```java +public IResource getObject(); +``` + +- *Type:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +Resource where the metric can be found. + +--- + +### MetricOptions + +Base options for a Metric. + +#### Initializer + +```java +import org.cdk8s.plus27.MetricOptions; + +MetricOptions.builder() + .name(java.lang.String) + .target(MetricTarget) +// .labelSelector(LabelSelector) + .build(); +``` + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of the metric to scale on. + +--- + +##### `target`Required + +```java +public MetricTarget getTarget(); +``` + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +##### `labelSelector`Optional + +```java +public LabelSelector getLabelSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.LabelSelector`](#org.cdk8s.plus27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +### MountOptions + +Options for mounts. + +#### Initializer + +```java +import org.cdk8s.plus27.MountOptions; + +MountOptions.builder() +// .propagation(MountPropagation) +// .readOnly(java.lang.Boolean) +// .subPath(java.lang.String) +// .subPathExpr(java.lang.String) + .build(); +``` + +##### `propagation`Optional + +```java +public MountPropagation getPropagation(); +``` + +- *Type:* [`org.cdk8s.plus27.MountPropagation`](#org.cdk8s.plus27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +##### `subPath`Optional + +```java +public java.lang.String getSubPath(); +``` + +- *Type:* `java.lang.String` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +##### `subPathExpr`Optional + +```java +public java.lang.String getSubPathExpr(); +``` + +- *Type:* `java.lang.String` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + +### NamespaceProps + +Properties for `Namespace`. + +#### Initializer + +```java +import org.cdk8s.plus27.NamespaceProps; + +NamespaceProps.builder() +// .metadata(ApiObjectMetadata) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +### NamespaceSelectorConfig + +Configuration for selecting namespaces. + +#### Initializer + +```java +import org.cdk8s.plus27.NamespaceSelectorConfig; + +NamespaceSelectorConfig.builder() +// .labelSelector(LabelSelector) +// .names(java.util.List) + .build(); +``` + +##### `labelSelector`Optional + +```java +public LabelSelector getLabelSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.LabelSelector`](#org.cdk8s.plus27.LabelSelector) + +A selector to select namespaces by labels. + +--- + +##### `names`Optional + +```java +public java.util.List getNames(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +A list of names to select namespaces by names. + +--- + +### NamespacesSelectOptions + +Options for `Namespaces.select`. + +#### Initializer + +```java +import org.cdk8s.plus27.NamespacesSelectOptions; + +NamespacesSelectOptions.builder() +// .expressions(java.util.List) +// .labels(java.util.Map) +// .names(java.util.List) + .build(); +``` + +##### `expressions`Optional + +```java +public java.util.List getExpressions(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.LabelExpression`](#org.cdk8s.plus27.LabelExpression)> +- *Default:* no selector requirements. + +Namespaces must satisfy these selectors. + +The selectors query labels, just like the `labels` property, but they +provide a more advanced matching mechanism. + +--- + +##### `labels`Optional + +```java +public java.util.Map getLabels(); +``` + +- *Type:* java.util.Map +- *Default:* no strict labels requirements. + +Labels the namespaces must have. + +This is equivalent to using an 'Is' selector. + +--- + +##### `names`Optional + +```java +public java.util.List getNames(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* no name requirements. + +Namespaces names must be one of these. + +--- + +### NetworkPolicyAddEgressRuleOptions + +Options for `NetworkPolicy.addEgressRule`. + +#### Initializer + +```java +import org.cdk8s.plus27.NetworkPolicyAddEgressRuleOptions; + +NetworkPolicyAddEgressRuleOptions.builder() +// .ports(java.util.List) + .build(); +``` + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyPort`](#org.cdk8s.plus27.NetworkPolicyPort)> +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports the rule should allow outgoing traffic to. + +--- + +### NetworkPolicyPeerConfig + +Configuration for network peers. + +A peer can either by an ip block, or a selection of pods, not both. + +#### Initializer + +```java +import org.cdk8s.plus27.NetworkPolicyPeerConfig; + +NetworkPolicyPeerConfig.builder() +// .ipBlock(NetworkPolicyIpBlock) +// .podSelector(PodSelectorConfig) + .build(); +``` + +##### `ipBlock`Optional + +```java +public NetworkPolicyIpBlock getIpBlock(); +``` + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyIpBlock`](#org.cdk8s.plus27.NetworkPolicyIpBlock) + +The ip block this peer represents. + +--- + +##### `podSelector`Optional + +```java +public PodSelectorConfig getPodSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSelectorConfig`](#org.cdk8s.plus27.PodSelectorConfig) + +The pod selector this peer represents. + +--- + +### NetworkPolicyPortProps + +Properties for `NetworkPolicyPort`. + +#### Initializer + +```java +import org.cdk8s.plus27.NetworkPolicyPortProps; + +NetworkPolicyPortProps.builder() +// .endPort(java.lang.Number) +// .port(java.lang.Number) +// .protocol(NetworkProtocol) + .build(); +``` + +##### `endPort`Optional + +```java +public java.lang.Number getEndPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* not a port range. + +End port (relative to `port`). + +Only applies if `port` is defined. +Use this to specify a port range, rather that a specific one. + +--- + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* all ports are allowed. + +Specific port number. + +--- + +##### `protocol`Optional + +```java +public NetworkProtocol getProtocol(); +``` + +- *Type:* [`org.cdk8s.plus27.NetworkProtocol`](#org.cdk8s.plus27.NetworkProtocol) +- *Default:* NetworkProtocol.TCP + +Protocol. + +--- + +### NetworkPolicyProps + +Properties for `NetworkPolicy`. + +#### Initializer + +```java +import org.cdk8s.plus27.NetworkPolicyProps; + +NetworkPolicyProps.builder() +// .metadata(ApiObjectMetadata) +// .egress(NetworkPolicyTraffic) +// .ingress(NetworkPolicyTraffic) +// .selector(IPodSelector) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `egress`Optional + +```java +public NetworkPolicyTraffic getEgress(); +``` + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyTraffic`](#org.cdk8s.plus27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change egress behavior of the pods it selects. + +Egress traffic configuration. + +--- + +##### `ingress`Optional + +```java +public NetworkPolicyTraffic getIngress(); +``` + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyTraffic`](#org.cdk8s.plus27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change ingress behavior of the pods it selects. + +Ingress traffic configuration. + +--- + +##### `selector`Optional + +```java +public IPodSelector getSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) +- *Default:* will select all pods in the namespace of the policy. + +Which pods does this policy object applies to. + +This can either be a single pod / workload, or a grouping of pods selected +via the `Pods.select` function. Rules is applied to any pods selected by this property. +Multiple network policies can select the same set of pods. +In this case, the rules for each are combined additively. + +Note that + +--- + +### NetworkPolicyRule + +Describes a rule allowing traffic from / to pods matched by a network policy selector. + +#### Initializer + +```java +import org.cdk8s.plus27.NetworkPolicyRule; + +NetworkPolicyRule.builder() + .peer(INetworkPolicyPeer) +// .ports(java.util.List) + .build(); +``` + +##### `peer`Required + +```java +public INetworkPolicyPeer getPeer(); +``` + +- *Type:* [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +Peer this rule interacts with. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyPort`](#org.cdk8s.plus27.NetworkPolicyPort)> +- *Default:* traffic is allowed on all ports. + +The ports of the rule. + +--- + +### NetworkPolicyTraffic + +Describes how the network policy should configure egress / ingress traffic. + +#### Initializer + +```java +import org.cdk8s.plus27.NetworkPolicyTraffic; + +NetworkPolicyTraffic.builder() +// .default(NetworkPolicyTrafficDefault) +// .rules(java.util.List) + .build(); +``` + +##### `default`Optional + +```java +public NetworkPolicyTrafficDefault getDefault(); +``` + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyTrafficDefault`](#org.cdk8s.plus27.NetworkPolicyTrafficDefault) +- *Default:* unset, the policy does not change the behavior. + +Specifies the default behavior of the policy when no rules are defined. + +--- + +##### `rules`Optional + +```java +public java.util.List getRules(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyRule`](#org.cdk8s.plus27.NetworkPolicyRule)> +- *Default:* no rules + +List of rules to be applied to the selected pods. + +If empty, the behavior of the policy is dictated by the `default` property. + +--- + +### NfsVolumeOptions + +Options for the NFS based volume. + +#### Initializer + +```java +import org.cdk8s.plus27.NfsVolumeOptions; + +NfsVolumeOptions.builder() + .path(java.lang.String) + .server(java.lang.String) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `path`Required + +```java +public java.lang.String getPath(); +``` + +- *Type:* `java.lang.String` + +Path that is exported by the NFS server. + +--- + +##### `server`Required + +```java +public java.lang.String getServer(); +``` + +- *Type:* `java.lang.String` + +Server is the hostname or IP address of the NFS server. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, will force the NFS export to be mounted with read-only permissions. + +--- + +### NodeTaintQueryOptions + +Options for `NodeTaintQuery`. + +#### Initializer + +```java +import org.cdk8s.plus27.NodeTaintQueryOptions; + +NodeTaintQueryOptions.builder() +// .effect(TaintEffect) +// .evictAfter(Duration) + .build(); +``` + +##### `effect`Optional + +```java +public TaintEffect getEffect(); +``` + +- *Type:* [`org.cdk8s.plus27.TaintEffect`](#org.cdk8s.plus27.TaintEffect) +- *Default:* all effects are matched. + +The taint effect to match. + +--- + +##### `evictAfter`Optional + +```java +public Duration getEvictAfter(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* bound forever. + +How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. + +Only applies for the `NO_EXECUTE` effect. + +--- + +### PathMapping + +Maps a string key to a path within a volume. + +#### Initializer + +```java +import org.cdk8s.plus27.PathMapping; + +PathMapping.builder() + .path(java.lang.String) +// .mode(java.lang.Number) + .build(); +``` + +##### `path`Required + +```java +public java.lang.String getPath(); +``` + +- *Type:* `java.lang.String` + +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`Optional + +```java +public java.lang.Number getMode(); +``` + +- *Type:* `java.lang.Number` + +Optional: 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. + +--- + +### PersistentVolumeClaimProps + +Properties for `PersistentVolumeClaim`. + +#### Initializer + +```java +import org.cdk8s.plus27.PersistentVolumeClaimProps; + +PersistentVolumeClaimProps.builder() +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volume(IPersistentVolume) +// .volumeMode(PersistentVolumeMode) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes requirement. + +Contains the access modes the volume should support. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No storage requirement. + +Minimum storage size the volume should have. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` +- *Default:* Not set. + +Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. + +* If the admission plugin is turned on, the storage class marked as default will be used. +* If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + +--- + +##### `volume`Optional + +```java +public IPersistentVolume getVolume(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume) +- *Default:* No specific volume binding. + +The PersistentVolume backing this claim. + +The control plane still checks that storage class, access modes, +and requested storage size on the volume are valid. + +Note that in order to guarantee a proper binding, the volume should +also define a `claimRef` referring to this claim. Otherwise, the volume may be +claimed be other pvc's before it gets a chance to bind to this one. + +If the volume is managed (i.e not imported), you can use `pv.claim()` to easily +create a bi-directional bounded claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding. + +--- + +##### `volumeMode`Optional + +```java +public PersistentVolumeMode getVolumeMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +### PersistentVolumeClaimVolumeOptions + +Options for a PersistentVolumeClaim-based volume. + +#### Initializer + +```java +import org.cdk8s.plus27.PersistentVolumeClaimVolumeOptions; + +PersistentVolumeClaimVolumeOptions.builder() +// .name(java.lang.String) +// .readOnly(java.lang.Boolean) + .build(); +``` + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* Derived from the PVC name. + +The volume name. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Will force the ReadOnly setting in VolumeMounts. + +--- + +### PersistentVolumeProps + +Properties for `PersistentVolume`. + +#### Initializer + +```java +import org.cdk8s.plus27.PersistentVolumeProps; + +PersistentVolumeProps.builder() +// .metadata(ApiObjectMetadata) +// .accessModes(java.util.List) +// .claim(IPersistentVolumeClaim) +// .mountOptions(java.util.List) +// .reclaimPolicy(PersistentVolumeReclaimPolicy) +// .storage(Size) +// .storageClassName(java.lang.String) +// .volumeMode(PersistentVolumeMode) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```java +public java.util.List getAccessModes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.PersistentVolumeAccessMode`](#org.cdk8s.plus27.PersistentVolumeAccessMode)> +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```java +public IPersistentVolumeClaim getClaim(); +``` + +- *Type:* [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```java +public java.util.List getMountOptions(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```java +public PersistentVolumeReclaimPolicy getReclaimPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeReclaimPolicy`](#org.cdk8s.plus27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```java +public Size getStorage(); +``` + +- *Type:* [`org.cdk8s.Size`](#org.cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```java +public java.lang.String getStorageClassName(); +``` + +- *Type:* `java.lang.String` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```java +public PersistentVolumeMode getVolumeMode(); +``` + +- *Type:* [`org.cdk8s.plus27.PersistentVolumeMode`](#org.cdk8s.plus27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +### PodConnectionsAllowFromOptions + +Options for `PodConnections.allowFrom`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodConnectionsAllowFromOptions; + +PodConnectionsAllowFromOptions.builder() +// .isolation(PodConnectionsIsolation) +// .ports(java.util.List) + .build(); +``` + +##### `isolation`Optional + +```java +public PodConnectionsIsolation getIsolation(); +``` + +- *Type:* [`org.cdk8s.plus27.PodConnectionsIsolation`](#org.cdk8s.plus27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyPort`](#org.cdk8s.plus27.NetworkPolicyPort)> +- *Default:* The pod ports. + +Ports to allow incoming traffic to. + +--- + +### PodConnectionsAllowToOptions + +Options for `PodConnections.allowTo`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodConnectionsAllowToOptions; + +PodConnectionsAllowToOptions.builder() +// .isolation(PodConnectionsIsolation) +// .ports(java.util.List) + .build(); +``` + +##### `isolation`Optional + +```java +public PodConnectionsIsolation getIsolation(); +``` + +- *Type:* [`org.cdk8s.plus27.PodConnectionsIsolation`](#org.cdk8s.plus27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NetworkPolicyPort`](#org.cdk8s.plus27.NetworkPolicyPort)> +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports to allow outgoing traffic to. + +--- + +### PodDnsProps + +Properties for `PodDns`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodDnsProps; + +PodDnsProps.builder() +// .hostname(java.lang.String) +// .hostnameAsFQDN(java.lang.Boolean) +// .nameservers(java.util.List) +// .options(java.util.List) +// .policy(DnsPolicy) +// .searches(java.util.List) +// .subdomain(java.lang.String) + .build(); +``` + +##### `hostname`Optional + +```java +public java.lang.String getHostname(); +``` + +- *Type:* `java.lang.String` +- *Default:* Set to a system-defined value. + +Specifies the hostname of the Pod. + +--- + +##### `hostnameAsFQDN`Optional + +```java +public java.lang.Boolean getHostnameAsFQDN(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + +In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). +In Windows containers, this means setting the registry value of hostname for the registry +key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. +If a pod does not have FQDN, this has no effect. + +--- + +##### `nameservers`Optional + +```java +public java.util.List getNameservers(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +A list of IP addresses that will be used as DNS servers for the Pod. + +There can be at most 3 IP addresses specified. +When the policy is set to "NONE", the list must contain at least one IP address, +otherwise this property is optional. +The servers listed will be combined to the base nameservers generated from +the specified DNS policy with duplicate addresses removed. + +--- + +##### `options`Optional + +```java +public java.util.List getOptions(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.DnsOption`](#org.cdk8s.plus27.DnsOption)> + +List of objects where each object may have a name property (required) and a value property (optional). + +The contents in this property +will be merged to the options generated from the specified DNS policy. +Duplicate entries are removed. + +--- + +##### `policy`Optional + +```java +public DnsPolicy getPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.DnsPolicy`](#org.cdk8s.plus27.DnsPolicy) +- *Default:* DnsPolicy.CLUSTER_FIRST + +Set DNS policy for the pod. + +If policy is set to `None`, other configuration must be supplied. + +--- + +##### `searches`Optional + +```java +public java.util.List getSearches(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +A list of DNS search domains for hostname lookup in the Pod. + +When specified, the provided list will be merged into the base +search domain names generated from the chosen DNS policy. +Duplicate domain names are removed. + +Kubernetes allows for at most 6 search domains. + +--- + +##### `subdomain`Optional + +```java +public java.lang.String getSubdomain(); +``` + +- *Type:* `java.lang.String` +- *Default:* No subdomain. + +If specified, the fully qualified Pod hostname will be "...svc.". + +--- + +### PodProps + +Properties for `Pod`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodProps; + +PodProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +### PodsAllOptions + +Options for `Pods.all`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodsAllOptions; + +PodsAllOptions.builder() +// .namespaces(Namespaces) + .build(); +``` + +##### `namespaces`Optional + +```java +public Namespaces getNamespaces(); +``` + +- *Type:* [`org.cdk8s.plus27.Namespaces`](#org.cdk8s.plus27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +### PodSchedulingAttractOptions + +Options for `PodScheduling.attract`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodSchedulingAttractOptions; + +PodSchedulingAttractOptions.builder() +// .weight(java.lang.Number) + .build(); +``` + +##### `weight`Optional + +```java +public java.lang.Number getWeight(); +``` + +- *Type:* `java.lang.Number` +- *Default:* no weight. assignment is assumed to be required (hard). + +Indicates the attraction is optional (soft), with this weight score. + +--- + +### PodSchedulingColocateOptions + +Options for `PodScheduling.colocate`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodSchedulingColocateOptions; + +PodSchedulingColocateOptions.builder() +// .topology(Topology) +// .weight(java.lang.Number) + .build(); +``` + +##### `topology`Optional + +```java +public Topology getTopology(); +``` + +- *Type:* [`org.cdk8s.plus27.Topology`](#org.cdk8s.plus27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to coloate on. + +--- + +##### `weight`Optional + +```java +public java.lang.Number getWeight(); +``` + +- *Type:* `java.lang.Number` +- *Default:* no weight. co-location is assumed to be required (hard). + +Indicates the co-location is optional (soft), with this weight score. + +--- + +### PodSchedulingSeparateOptions + +Options for `PodScheduling.separate`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodSchedulingSeparateOptions; + +PodSchedulingSeparateOptions.builder() +// .topology(Topology) +// .weight(java.lang.Number) + .build(); +``` + +##### `topology`Optional + +```java +public Topology getTopology(); +``` + +- *Type:* [`org.cdk8s.plus27.Topology`](#org.cdk8s.plus27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to separate on. + +--- + +##### `weight`Optional + +```java +public java.lang.Number getWeight(); +``` + +- *Type:* `java.lang.Number` +- *Default:* no weight. separation is assumed to be required (hard). + +Indicates the separation is optional (soft), with this weight score. + +--- + +### PodSecurityContextProps + +Properties for `PodSecurityContext`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodSecurityContextProps; + +PodSecurityContextProps.builder() +// .ensureNonRoot(java.lang.Boolean) +// .fsGroup(java.lang.Number) +// .fsGroupChangePolicy(FsGroupChangePolicy) +// .group(java.lang.Number) +// .sysctls(java.util.List) +// .user(java.lang.Number) + .build(); +``` + +##### `ensureNonRoot`Optional + +```java +public java.lang.Boolean getEnsureNonRoot(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +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. + +--- + +##### `fsGroup`Optional + +```java +public java.lang.Number getFsGroup(); +``` + +- *Type:* `java.lang.Number` +- *Default:* Volume ownership is not changed. + +Modify the ownership and permissions of pod volumes to this GID. + +--- + +##### `fsGroupChangePolicy`Optional + +```java +public FsGroupChangePolicy getFsGroupChangePolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.FsGroupChangePolicy`](#org.cdk8s.plus27.FsGroupChangePolicy) +- *Default:* FsGroupChangePolicy.ALWAYS + +Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. + +This field will only apply to volume types which support fsGroup based ownership(and permissions). +It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. + +--- + +##### `group`Optional + +```java +public java.lang.Number getGroup(); +``` + +- *Type:* `java.lang.Number` +- *Default:* Group configured by container runtime + +The GID to run the entrypoint of the container process. + +--- + +##### `sysctls`Optional + +```java +public java.util.List getSysctls(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Sysctl`](#org.cdk8s.plus27.Sysctl)> +- *Default:* No sysctls + +Sysctls hold a list of namespaced sysctls used for the pod. + +Pods with unsupported sysctls (by the container runtime) might fail to launch. + +--- + +##### `user`Optional + +```java +public java.lang.Number getUser(); +``` + +- *Type:* `java.lang.Number` +- *Default:* User specified in image metadata + +The UID to run the entrypoint of the container process. + +--- + +### PodSelectorConfig + +Configuration for selecting pods, optionally in particular namespaces. + +#### Initializer + +```java +import org.cdk8s.plus27.PodSelectorConfig; + +PodSelectorConfig.builder() + .labelSelector(LabelSelector) +// .namespaces(NamespaceSelectorConfig) + .build(); +``` + +##### `labelSelector`Required + +```java +public LabelSelector getLabelSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.LabelSelector`](#org.cdk8s.plus27.LabelSelector) + +A selector to select pods by labels. + +--- + +##### `namespaces`Optional + +```java +public NamespaceSelectorConfig getNamespaces(); +``` + +- *Type:* [`org.cdk8s.plus27.NamespaceSelectorConfig`](#org.cdk8s.plus27.NamespaceSelectorConfig) + +Configuration for selecting which namepsaces are the pods allowed to be in. + +--- + +### PodsSelectOptions + +Options for `Pods.select`. + +#### Initializer + +```java +import org.cdk8s.plus27.PodsSelectOptions; + +PodsSelectOptions.builder() +// .expressions(java.util.List) +// .labels(java.util.Map) +// .namespaces(Namespaces) + .build(); +``` + +##### `expressions`Optional + +```java +public java.util.List getExpressions(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.LabelExpression`](#org.cdk8s.plus27.LabelExpression)> +- *Default:* no expressions requirements. + +Expressions the pods must satisify. + +--- + +##### `labels`Optional + +```java +public java.util.Map getLabels(); +``` + +- *Type:* java.util.Map +- *Default:* no strict labels requirements. + +Labels the pods must have. + +--- + +##### `namespaces`Optional + +```java +public Namespaces getNamespaces(); +``` + +- *Type:* [`org.cdk8s.plus27.Namespaces`](#org.cdk8s.plus27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +### ProbeOptions + +Probe options. + +#### Initializer + +```java +import org.cdk8s.plus27.ProbeOptions; + +ProbeOptions.builder() +// .failureThreshold(java.lang.Number) +// .initialDelaySeconds(Duration) +// .periodSeconds(Duration) +// .successThreshold(java.lang.Number) +// .timeoutSeconds(Duration) + .build(); +``` + +##### `failureThreshold`Optional + +```java +public java.lang.Number getFailureThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```java +public Duration getInitialDelaySeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```java +public Duration getPeriodSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```java +public java.lang.Number getSuccessThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```java +public Duration getTimeoutSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +### ResourceProps + +Initialization properties for resources. + +#### Initializer + +```java +import org.cdk8s.plus27.ResourceProps; + +ResourceProps.builder() +// .metadata(ApiObjectMetadata) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +### RoleBindingProps + +Properties for `RoleBinding`. + +#### Initializer + +```java +import org.cdk8s.plus27.RoleBindingProps; + +RoleBindingProps.builder() +// .metadata(ApiObjectMetadata) + .role(IRole) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +```java +public IRole getRole(); +``` + +- *Type:* [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole) + +The role to bind to. + +A RoleBinding can reference a Role or a ClusterRole. + +--- + +### RolePolicyRule + +Policy rule of a `Role. + +#### Initializer + +```java +import org.cdk8s.plus27.RolePolicyRule; + +RolePolicyRule.builder() + .resources(java.util.List) + .verbs(java.util.List) + .build(); +``` + +##### `resources`Required + +```java +public java.util.List getResources(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource)> + +Resources this rule applies to. + +--- + +##### `verbs`Required + +```java +public java.util.List getVerbs(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Verbs to allow. + +(e.g ['get', 'watch']) + +--- + +### RoleProps + +Properties for `Role`. + +#### Initializer + +```java +import org.cdk8s.plus27.RoleProps; + +RoleProps.builder() +// .metadata(ApiObjectMetadata) +// .rules(java.util.List) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `rules`Optional + +```java +public java.util.List getRules(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.RolePolicyRule`](#org.cdk8s.plus27.RolePolicyRule)> +- *Default:* [] + +A list of rules the role should allow. + +--- + +### ScalingPolicy + +#### Initializer + +```java +import org.cdk8s.plus27.ScalingPolicy; + +ScalingPolicy.builder() + .replicas(Replicas) +// .duration(Duration) + .build(); +``` + +##### `replicas`Required + +```java +public Replicas getReplicas(); +``` + +- *Type:* [`org.cdk8s.plus27.Replicas`](#org.cdk8s.plus27.Replicas) + +The type and quantity of replicas to change. + +--- + +##### `duration`Optional + +```java +public Duration getDuration(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* 15 seconds + +The amount of time the scaling policy has to continue scaling before the target metric must be revalidated. + +Must be greater than 0 seconds and no longer than 30 minutes. + +--- + +### ScalingRules + +Defines the scaling behavior for one direction. + +#### Initializer + +```java +import org.cdk8s.plus27.ScalingRules; + +ScalingRules.builder() +// .policies(java.util.List) +// .stabilizationWindow(Duration) +// .strategy(ScalingStrategy) + .build(); +``` + +##### `policies`Optional + +```java +public java.util.List getPolicies(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ScalingPolicy`](#org.cdk8s.plus27.ScalingPolicy)> +- *Default:* * Scale up + * Increase no more than 4 pods per 60 seconds + * Double the number of pods per 60 seconds +* Scale down + * Decrease to minReplica count + +The scaling policies. + +--- + +##### `stabilizationWindow`Optional + +```java +public Duration getStabilizationWindow(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* * On scale down no stabilization is performed. +* On scale up stabilization is performed for 5 minutes. + +Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur. + +Minimum duration is 1 second, max is 1 hour. + +--- + +##### `strategy`Optional + +```java +public ScalingStrategy getStrategy(); +``` + +- *Type:* [`org.cdk8s.plus27.ScalingStrategy`](#org.cdk8s.plus27.ScalingStrategy) +- *Default:* MAX_CHANGE + +The strategy to use when scaling. + +--- + +### ScalingTarget + +Properties used to configure the target of an Autoscaler. + +#### Initializer + +```java +import org.cdk8s.plus27.ScalingTarget; + +ScalingTarget.builder() + .apiVersion(java.lang.String) + .containers(java.util.List) + .kind(java.lang.String) + .name(java.lang.String) +// .replicas(java.lang.Number) + .build(); +``` + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `containers`Required + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Container`](#org.cdk8s.plus27.Container)> + +Container definitions associated with the target. + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +##### `replicas`Optional + +```java +public java.lang.Number getReplicas(); +``` + +- *Type:* `java.lang.Number` + +The fixed number of replicas defined on the target. + +This is used +for validation purposes as Scalable targets should not have a +fixed number of replicas. + +--- + +### SecretProps + +Options for `Secret`. + +#### Initializer + +```java +import org.cdk8s.plus27.SecretProps; + +SecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) +// .stringData(java.util.Map) +// .type(java.lang.String) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `stringData`Optional + +```java +public java.util.Map getStringData(); +``` + +- *Type:* java.util.Map + +stringData allows specifying non-binary secret data in string form. + +It is +provided as a write-only convenience method. All keys and values are merged +into the data field on write, overwriting any existing values. It is never +output when reading from the API. + +--- + +##### `type`Optional + +```java +public java.lang.String getType(); +``` + +- *Type:* `java.lang.String` +- *Default:* undefined - Don't set a type. + +Optional type associated with the secret. + +Used to facilitate programmatic +handling of secret data by various controllers. + +--- + +### SecretValue + +Represents a specific value in JSON secret. + +#### Initializer + +```java +import org.cdk8s.plus27.SecretValue; + +SecretValue.builder() + .key(java.lang.String) + .secret(ISecret) + .build(); +``` + +##### `key`Required + +```java +public java.lang.String getKey(); +``` + +- *Type:* `java.lang.String` + +The JSON key. + +--- + +##### `secret`Required + +```java +public ISecret getSecret(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +The secret. + +--- + +### SecretVolumeOptions + +Options for the Secret-based volume. + +#### Initializer + +```java +import org.cdk8s.plus27.SecretVolumeOptions; + +SecretVolumeOptions.builder() +// .defaultMode(java.lang.Number) +// .items(java.util.Map) +// .name(java.lang.String) +// .optional(java.lang.Boolean) + .build(); +``` + +##### `defaultMode`Optional + +```java +public java.lang.Number getDefaultMode(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 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. + +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. + +--- + +##### `items`Optional + +```java +public java.util.Map getItems(); +``` + +- *Type:* java.util.Map +- *Default:* no mapping + +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. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` +- *Default:* auto-generated + +The volume name. + +--- + +##### `optional`Optional + +```java +public java.lang.Boolean getOptional(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* undocumented + +Specify whether the secret or its keys must be defined. + +--- + +### ServiceAccountProps + +Properties for initialization of `ServiceAccount`. + +#### Initializer + +```java +import org.cdk8s.plus27.ServiceAccountProps; + +ServiceAccountProps.builder() +// .metadata(ApiObjectMetadata) +// .automountToken(java.lang.Boolean) +// .secrets(java.util.List) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountToken`Optional + +```java +public java.lang.Boolean getAutomountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether pods running as this service account should have an API token automatically mounted. + +Can be overridden at the pod level. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `secrets`Optional + +```java +public java.util.List getSecrets(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret)> + +List of secrets allowed to be used by pods running using this ServiceAccount. + +> https://kubernetes.io/docs/concepts/configuration/secret + +--- + +### ServiceAccountTokenSecretProps + +Options for `ServiceAccountTokenSecret`. + +#### Initializer + +```java +import org.cdk8s.plus27.ServiceAccountTokenSecretProps; + +ServiceAccountTokenSecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .serviceAccount(IServiceAccount) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `serviceAccount`Required + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) + +The service account to store a secret for. + +--- + +### ServiceBindOptions + +Options for `Service.bind`. + +#### Initializer + +```java +import org.cdk8s.plus27.ServiceBindOptions; + +ServiceBindOptions.builder() +// .name(java.lang.String) +// .nodePort(java.lang.Number) +// .protocol(Protocol) +// .targetPort(java.lang.Number) + .build(); +``` + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `nodePort`Optional + +```java +public java.lang.Number getNodePort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```java +public Protocol getProtocol(); +``` + +- *Type:* [`org.cdk8s.plus27.Protocol`](#org.cdk8s.plus27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `targetPort`Optional + +```java +public java.lang.Number getTargetPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +### ServiceIngressBackendOptions + +Options for setting up backends for ingress rules. + +#### Initializer + +```java +import org.cdk8s.plus27.ServiceIngressBackendOptions; + +ServiceIngressBackendOptions.builder() +// .port(java.lang.Number) + .build(); +``` + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* if the service exposes a single port, this port will be used. + +The port to use to access the service. + +* This option will fail if the service does not expose any ports. +* If the service exposes multiple ports, this option must be specified. +* If the service exposes a single port, this option is optional and if + specified, it must be the same port exposed by the service. + +--- + +### ServicePort + +Definition of a service port. + +#### Initializer + +```java +import org.cdk8s.plus27.ServicePort; + +ServicePort.builder() +// .name(java.lang.String) +// .nodePort(java.lang.Number) +// .protocol(Protocol) +// .targetPort(java.lang.Number) + .port(java.lang.Number) + .build(); +``` + +##### `name`Optional + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `nodePort`Optional + +```java +public java.lang.Number getNodePort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```java +public Protocol getProtocol(); +``` + +- *Type:* [`org.cdk8s.plus27.Protocol`](#org.cdk8s.plus27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `targetPort`Optional + +```java +public java.lang.Number getTargetPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `port`Required + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` + +The port number the service will bind to. + +--- + +### ServiceProps + +Properties for `Service`. + +#### Initializer + +```java +import org.cdk8s.plus27.ServiceProps; + +ServiceProps.builder() +// .metadata(ApiObjectMetadata) +// .clusterIP(java.lang.String) +// .externalIPs(java.util.List) +// .externalName(java.lang.String) +// .loadBalancerSourceRanges(java.util.List) +// .ports(java.util.List) +// .selector(IPodSelector) +// .type(ServiceType) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `clusterIP`Optional + +```java +public java.lang.String getClusterIP(); +``` + +- *Type:* `java.lang.String` +- *Default:* Automatically assigned. + +The IP address of the service and is usually assigned randomly by the master. + +If an address is specified manually and is not in use by others, it +will be allocated to the service; otherwise, creation of the service will +fail. This field can not be changed through updates. Valid values are +"None", empty string (""), or a valid IP address. "None" can be specified +for headless services when proxying is not required. Only applies to types +ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. + +> https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + +--- + +##### `externalIPs`Optional + +```java +public java.util.List getExternalIPs(); +``` + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* No external IPs. + +A list of IP addresses for which nodes in the cluster will also accept traffic for this service. + +These IPs are not managed by Kubernetes. The user +is responsible for ensuring that traffic arrives at a node with this IP. A +common example is external load-balancers that are not part of the +Kubernetes system. + +--- + +##### `externalName`Optional + +```java +public java.lang.String getExternalName(); +``` + +- *Type:* `java.lang.String` +- *Default:* No external name. + +The externalName to be used when ServiceType.EXTERNAL_NAME is set. + +--- + +##### `loadBalancerSourceRanges`Optional + +```java +public java.util.List getLoadBalancerSourceRanges(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + +--- + +##### `ports`Optional + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ServicePort`](#org.cdk8s.plus27.ServicePort)> +- *Default:* either the selector ports, or none. + +The ports this service binds to. + +If the selector of the service is a managed pod / workload, +its ports will are automatically extracted and used as the default value. +Otherwise, no ports are bound. + +--- + +##### `selector`Optional + +```java +public IPodSelector getSelector(); +``` + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) +- *Default:* unset, the service is assumed to have an external process managing +its endpoints, which Kubernetes will not modify. + +Which pods should the service select and route to. + +You can pass one of the following: + +* An instance of `Pod` or any workload resource (e.g `Deployment`, `StatefulSet`, ...) +* Pods selected by the `Pods.select` function. Note that in this case only labels can be specified. + +--- + +##### `type`Optional + +```java +public ServiceType getType(); +``` + +- *Type:* [`org.cdk8s.plus27.ServiceType`](#org.cdk8s.plus27.ServiceType) +- *Default:* ServiceType.ClusterIP + +Determines how the Service is exposed. + +More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + +--- + +### SshAuthSecretProps + +Options for `SshAuthSecret`. + +#### Initializer + +```java +import org.cdk8s.plus27.SshAuthSecretProps; + +SshAuthSecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .sshPrivateKey(java.lang.String) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `sshPrivateKey`Required + +```java +public java.lang.String getSshPrivateKey(); +``` + +- *Type:* `java.lang.String` + +The SSH private key to use. + +--- + +### StatefulSetProps + +Properties for initialization of `StatefulSet`. + +#### Initializer + +```java +import org.cdk8s.plus27.StatefulSetProps; + +StatefulSetProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) +// .minReady(Duration) +// .podManagementPolicy(PodManagementPolicy) +// .replicas(java.lang.Number) +// .service(Service) +// .strategy(StatefulSetUpdateStrategy) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```java +public ApiObjectMetadata getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```java +public java.lang.Boolean getSelect(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```java +public java.lang.Boolean getSpread(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReady`Optional + +```java +public Duration getMinReady(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `podManagementPolicy`Optional + +```java +public PodManagementPolicy getPodManagementPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.PodManagementPolicy`](#org.cdk8s.plus27.PodManagementPolicy) +- *Default:* PodManagementPolicy.ORDERED_READY + +Pod management policy to use for this statefulset. + +--- + +##### `replicas`Optional + +```java +public java.lang.Number getReplicas(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 + +Number of desired pods. + +--- + +##### `service`Optional + +```java +public Service getService(); +``` + +- *Type:* [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service) +- *Default:* A new headless service will be created. + +Service to associate with the statefulset. + +--- + +##### `strategy`Optional + +```java +public StatefulSetUpdateStrategy getStrategy(); +``` + +- *Type:* [`org.cdk8s.plus27.StatefulSetUpdateStrategy`](#org.cdk8s.plus27.StatefulSetUpdateStrategy) +- *Default:* RollingUpdate with partition set to 0 + +Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. + +--- + +### StatefulSetUpdateStrategyRollingUpdateOptions + +Options for `StatefulSetUpdateStrategy.rollingUpdate`. + +#### Initializer + +```java +import org.cdk8s.plus27.StatefulSetUpdateStrategyRollingUpdateOptions; + +StatefulSetUpdateStrategyRollingUpdateOptions.builder() +// .partition(java.lang.Number) + .build(); +``` + +##### `partition`Optional + +```java +public java.lang.Number getPartition(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 0 + +If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet's .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version. + +If the partition is greater than replicas, updates to the pod template will not be propagated to Pods. +In most cases you will not need to use a partition, but they are useful if you want to stage an +update, roll out a canary, or perform a phased roll out. + +> https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions + +--- + +### SubjectConfiguration + +Subject contains a reference to the object or user identities a role binding applies to. + +This can either hold a direct API object reference, or a value +for non-objects such as user and group names. + +#### Initializer + +```java +import org.cdk8s.plus27.SubjectConfiguration; + +SubjectConfiguration.builder() + .kind(java.lang.String) + .name(java.lang.String) +// .apiGroup(java.lang.String) +// .namespace(java.lang.String) + .build(); +``` + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +Kind of object being referenced. + +Values defined by this API group are +"User", "Group", and "ServiceAccount". If the Authorizer does not +recognized the kind value, the Authorizer should report an error. + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +Name of the object being referenced. + +--- + +##### `apiGroup`Optional + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +APIGroup holds the API group of the referenced subject. + +Defaults to "" for +ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User +and Group subjects. + +--- + +##### `namespace`Optional + +```java +public java.lang.String getNamespace(); +``` + +- *Type:* `java.lang.String` + +Namespace of the referenced object. + +If the object kind is non-namespace, +such as "User" or "Group", and this value is not empty the Authorizer +should report an error. + +--- + +### Sysctl + +Sysctl defines a kernel parameter to be set. + +#### Initializer + +```java +import org.cdk8s.plus27.Sysctl; + +Sysctl.builder() + .name(java.lang.String) + .value(java.lang.String) + .build(); +``` + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +Name of a property to set. + +--- + +##### `value`Required + +```java +public java.lang.String getValue(); +``` + +- *Type:* `java.lang.String` + +Value of a property to set. + +--- + +### TcpSocketProbeOptions + +Options for `Probe.fromTcpSocket()`. + +#### Initializer + +```java +import org.cdk8s.plus27.TcpSocketProbeOptions; + +TcpSocketProbeOptions.builder() +// .failureThreshold(java.lang.Number) +// .initialDelaySeconds(Duration) +// .periodSeconds(Duration) +// .successThreshold(java.lang.Number) +// .timeoutSeconds(Duration) +// .host(java.lang.String) +// .port(java.lang.Number) + .build(); +``` + +##### `failureThreshold`Optional + +```java +public java.lang.Number getFailureThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```java +public Duration getInitialDelaySeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```java +public Duration getPeriodSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```java +public java.lang.Number getSuccessThreshold(); +``` + +- *Type:* `java.lang.Number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```java +public Duration getTimeoutSeconds(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `host`Optional + +```java +public java.lang.String getHost(); +``` + +- *Type:* `java.lang.String` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +##### `port`Optional + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + +### TlsSecretProps + +Options for `TlsSecret`. + +#### Initializer + +```java +import org.cdk8s.plus27.TlsSecretProps; + +TlsSecretProps.builder() +// .metadata(ApiObjectMetadata) +// .immutable(java.lang.Boolean) + .tlsCert(java.lang.String) + .tlsKey(java.lang.String) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```java +public java.lang.Boolean getImmutable(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `tlsCert`Required + +```java +public java.lang.String getTlsCert(); +``` + +- *Type:* `java.lang.String` + +The TLS cert. + +--- + +##### `tlsKey`Required + +```java +public java.lang.String getTlsKey(); +``` + +- *Type:* `java.lang.String` + +The TLS key. + +--- + +### VolumeMount + +Mount a volume from the pod to the container. + +#### Initializer + +```java +import org.cdk8s.plus27.VolumeMount; + +VolumeMount.builder() +// .propagation(MountPropagation) +// .readOnly(java.lang.Boolean) +// .subPath(java.lang.String) +// .subPathExpr(java.lang.String) + .path(java.lang.String) + .volume(Volume) + .build(); +``` + +##### `propagation`Optional + +```java +public MountPropagation getPropagation(); +``` + +- *Type:* [`org.cdk8s.plus27.MountPropagation`](#org.cdk8s.plus27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +##### `readOnly`Optional + +```java +public java.lang.Boolean getReadOnly(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +##### `subPath`Optional + +```java +public java.lang.String getSubPath(); +``` + +- *Type:* `java.lang.String` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +##### `subPathExpr`Optional + +```java +public java.lang.String getSubPathExpr(); +``` + +- *Type:* `java.lang.String` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + +##### `path`Required + +```java +public java.lang.String getPath(); +``` + +- *Type:* `java.lang.String` + +Path within the container at which the volume should be mounted. + +Must not +contain ':'. + +--- + +##### `volume`Required + +```java +public Volume getVolume(); +``` + +- *Type:* [`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume) + +The volume to mount. + +--- + +### WorkloadProps + +Properties for `Workload`. + +#### Initializer + +```java +import org.cdk8s.plus27.WorkloadProps; + +WorkloadProps.builder() +// .metadata(ApiObjectMetadata) +// .automountServiceAccountToken(java.lang.Boolean) +// .containers(java.util.List) +// .dns(PodDnsProps) +// .dockerRegistryAuth(ISecret) +// .hostAliases(java.util.List) +// .hostNetwork(java.lang.Boolean) +// .initContainers(java.util.List) +// .isolate(java.lang.Boolean) +// .restartPolicy(RestartPolicy) +// .securityContext(PodSecurityContextProps) +// .serviceAccount(IServiceAccount) +// .terminationGracePeriod(Duration) +// .volumes(java.util.List) +// .podMetadata(ApiObjectMetadata) +// .select(java.lang.Boolean) +// .spread(java.lang.Boolean) + .build(); +``` + +##### `metadata`Optional + +```java +public ApiObjectMetadata getMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```java +public java.lang.Boolean getAutomountServiceAccountToken(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```java +public java.util.List getContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```java +public PodDnsProps getDns(); +``` + +- *Type:* [`org.cdk8s.plus27.PodDnsProps`](#org.cdk8s.plus27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```java +public ISecret getDockerRegistryAuth(); +``` + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```java +public java.util.List getHostAliases(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.HostAlias`](#org.cdk8s.plus27.HostAlias)> + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```java +public java.lang.Boolean getHostNetwork(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```java +public java.util.List getInitContainers(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerProps`](#org.cdk8s.plus27.ContainerProps)> +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```java +public java.lang.Boolean getIsolate(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```java +public RestartPolicy getRestartPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.RestartPolicy`](#org.cdk8s.plus27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```java +public PodSecurityContextProps getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.PodSecurityContextProps`](#org.cdk8s.plus27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```java +public IServiceAccount getServiceAccount(); +``` + +- *Type:* [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```java +public Duration getTerminationGracePeriod(); +``` + +- *Type:* [`org.cdk8s.Duration`](#org.cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```java +public java.util.List getVolumes(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume)> +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```java +public ApiObjectMetadata getPodMetadata(); +``` + +- *Type:* [`org.cdk8s.ApiObjectMetadata`](#org.cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```java +public java.lang.Boolean getSelect(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```java +public java.lang.Boolean getSpread(); +``` + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +### WorkloadSchedulingSpreadOptions + +Options for `WorkloadScheduling.spread`. + +#### Initializer + +```java +import org.cdk8s.plus27.WorkloadSchedulingSpreadOptions; + +WorkloadSchedulingSpreadOptions.builder() +// .topology(Topology) +// .weight(java.lang.Number) + .build(); +``` + +##### `topology`Optional + +```java +public Topology getTopology(); +``` + +- *Type:* [`org.cdk8s.plus27.Topology`](#org.cdk8s.plus27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to spread on. + +--- + +##### `weight`Optional + +```java +public java.lang.Number getWeight(); +``` + +- *Type:* `java.lang.Number` +- *Default:* no weight. spread is assumed to be required. + +Indicates the spread is optional, with this weight score. + +--- + +## Classes + +### ApiResource + +- *Implements:* [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource), [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +Represents information about an API resource type. + +#### Methods + +##### `asApiResource` + +```java +public asApiResource() +``` + +##### `asNonApiResource` + +```java +public asNonApiResource() +``` + +#### Static Functions + +##### `custom` + +```java +import org.cdk8s.plus27.ApiResource; + +ApiResource.custom(ApiResourceOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.ApiResourceOptions`](#org.cdk8s.plus27.ApiResourceOptions) + +--- + +#### Properties + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +#### Constants + +##### `API_SERVICES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for APIService. + +--- + +##### `BINDINGS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Binding. + +--- + +##### `CERTIFICATE_SIGNING_REQUESTS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for CertificateSigningRequest. + +--- + +##### `CLUSTER_ROLE_BINDINGS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ClusterRoleBinding. + +--- + +##### `CLUSTER_ROLES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ClusterRole. + +--- + +##### `COMPONENT_STATUSES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ComponentStatus. + +--- + +##### `CONFIG_MAPS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ConfigMap. + +--- + +##### `CONTROLLER_REVISIONS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ControllerRevision. + +--- + +##### `CRON_JOBS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for CronJob. + +--- + +##### `CSI_DRIVERS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for CSIDriver. + +--- + +##### `CSI_NODES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for CSINode. + +--- + +##### `CSI_STORAGE_CAPACITIES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for CSIStorageCapacity. + +--- + +##### `CUSTOM_RESOURCE_DEFINITIONS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for CustomResourceDefinition. + +--- + +##### `DAEMON_SETS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for DaemonSet. + +--- + +##### `DEPLOYMENTS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Deployment. + +--- + +##### `ENDPOINT_SLICES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for EndpointSlice. + +--- + +##### `ENDPOINTS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Endpoints. + +--- + +##### `EVENTS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Event. + +--- + +##### `FLOW_SCHEMAS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for FlowSchema. + +--- + +##### `HORIZONTAL_POD_AUTOSCALERS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for HorizontalPodAutoscaler. + +--- + +##### `INGRESS_CLASSES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for IngressClass. + +--- + +##### `INGRESSES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Ingress. + +--- + +##### `JOBS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Job. + +--- + +##### `LEASES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Lease. + +--- + +##### `LIMIT_RANGES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for LimitRange. + +--- + +##### `LOCAL_SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for LocalSubjectAccessReview. + +--- + +##### `MUTATING_WEBHOOK_CONFIGURATIONS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for MutatingWebhookConfiguration. + +--- + +##### `NAMESPACES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Namespace. + +--- + +##### `NETWORK_POLICIES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for NetworkPolicy. + +--- + +##### `NODES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Node. + +--- + +##### `PERSISTENT_VOLUME_CLAIMS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for PersistentVolumeClaim. + +--- + +##### `PERSISTENT_VOLUMES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for PersistentVolume. + +--- + +##### `POD_DISRUPTION_BUDGETS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for PodDisruptionBudget. + +--- + +##### `POD_TEMPLATES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for PodTemplate. + +--- + +##### `PODS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Pod. + +--- + +##### `PRIORITY_CLASSES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for PriorityClass. + +--- + +##### `PRIORITY_LEVEL_CONFIGURATIONS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for PriorityLevelConfiguration. + +--- + +##### `REPLICA_SETS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ReplicaSet. + +--- + +##### `REPLICATION_CONTROLLERS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ReplicationController. + +--- + +##### `RESOURCE_QUOTAS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ResourceQuota. + +--- + +##### `ROLE_BINDINGS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for RoleBinding. + +--- + +##### `ROLES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Role. + +--- + +##### `RUNTIME_CLASSES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for RuntimeClass. + +--- + +##### `SECRETS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Secret. + +--- + +##### `SELF_SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for SelfSubjectAccessReview. + +--- + +##### `SELF_SUBJECT_RULES_REVIEWS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for SelfSubjectRulesReview. + +--- + +##### `SERVICE_ACCOUNTS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ServiceAccount. + +--- + +##### `SERVICES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for Service. + +--- + +##### `STATEFUL_SETS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for StatefulSet. + +--- + +##### `STORAGE_CLASSES` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for StorageClass. + +--- + +##### `SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for SubjectAccessReview. + +--- + +##### `TOKEN_REVIEWS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for TokenReview. + +--- + +##### `VALIDATING_WEBHOOK_CONFIGURATIONS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for ValidatingWebhookConfiguration. + +--- + +##### `VOLUME_ATTACHMENTS` + +- *Type:* [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource) + +API resource information for VolumeAttachment. + +--- + +### Container + +A single application container that you want to run within a pod. + +#### Initializers + +```java +import org.cdk8s.plus27.Container; + +Container.Builder.create() +// .args(java.util.List) +// .command(java.util.List) +// .envFrom(java.util.List) +// .envVariables(java.util.Map) +// .imagePullPolicy(ImagePullPolicy) +// .lifecycle(ContainerLifecycle) +// .liveness(Probe) +// .name(java.lang.String) +// .port(java.lang.Number) +// .portNumber(java.lang.Number) +// .ports(java.util.List) +// .readiness(Probe) +// .resources(ContainerResources) +// .securityContext(ContainerSecurityContextProps) +// .startup(Probe) +// .volumeMounts(java.util.List) +// .workingDir(java.lang.String) + .image(java.lang.String) + .build(); +``` + +##### `args`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +- *Type:* java.util.List<`java.lang.String`> +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `envFrom`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.EnvFrom`](#org.cdk8s.plus27.EnvFrom)> +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `envVariables`Optional + +- *Type:* java.util.Map +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `imagePullPolicy`Optional + +- *Type:* [`org.cdk8s.plus27.ImagePullPolicy`](#org.cdk8s.plus27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +- *Type:* [`org.cdk8s.plus27.ContainerLifecycle`](#org.cdk8s.plus27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +- *Type:* `java.lang.String` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +- *Type:* `java.lang.Number` + +--- + +##### `portNumber`Optional + +- *Type:* `java.lang.Number` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerPort`](#org.cdk8s.plus27.ContainerPort)> +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +- *Type:* [`org.cdk8s.plus27.ContainerResources`](#org.cdk8s.plus27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `securityContext`Optional + +- *Type:* [`org.cdk8s.plus27.ContainerSecurityContextProps`](#org.cdk8s.plus27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +- *Type:* [`org.cdk8s.plus27.Probe`](#org.cdk8s.plus27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volumeMounts`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.VolumeMount`](#org.cdk8s.plus27.VolumeMount)> + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `workingDir`Optional + +- *Type:* `java.lang.String` +- *Default:* The container runtime's default. + +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. + +--- + +##### `image`Required + +- *Type:* `java.lang.String` + +Docker image name. + +--- + +#### Methods + +##### `addPort` + +```java +public addPort(ContainerPort port) +``` + +###### `port`Required + +- *Type:* [`org.cdk8s.plus27.ContainerPort`](#org.cdk8s.plus27.ContainerPort) + +--- + +##### `mount` + +```java +public mount(java.lang.String path, IStorage storage) +public mount(java.lang.String path, IStorage storage, MountOptions options) +``` + +###### `path`Required + +- *Type:* `java.lang.String` + +The desired path in the container. + +--- + +###### `storage`Required + +- *Type:* [`org.cdk8s.plus27.IStorage`](#org.cdk8s.plus27.IStorage) + +The storage to mount. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.MountOptions`](#org.cdk8s.plus27.MountOptions) + +--- + + +#### Properties + +##### `env`Required + +```java +public Env getEnv(); +``` + +- *Type:* [`org.cdk8s.plus27.Env`](#org.cdk8s.plus27.Env) + +The environment of the container. + +--- + +##### `image`Required + +```java +public java.lang.String getImage(); +``` + +- *Type:* `java.lang.String` + +The container image. + +--- + +##### `imagePullPolicy`Required + +```java +public ImagePullPolicy getImagePullPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.ImagePullPolicy`](#org.cdk8s.plus27.ImagePullPolicy) + +Image pull policy for this container. + +--- + +##### `mounts`Required + +```java +public java.util.List getMounts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.VolumeMount`](#org.cdk8s.plus27.VolumeMount)> + +Volume mounts configured for this container. + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The name of the container. + +--- + +##### `ports`Required + +```java +public java.util.List getPorts(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.ContainerPort`](#org.cdk8s.plus27.ContainerPort)> + +Ports exposed by this containers. + +Returns a copy, use `addPort` to modify. + +--- + +##### `securityContext`Required + +```java +public ContainerSecurityContext getSecurityContext(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerSecurityContext`](#org.cdk8s.plus27.ContainerSecurityContext) + +The security context of the container. + +--- + +##### `args`Optional + +```java +public java.util.List getArgs(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Arguments to the entrypoint. + +--- + +##### `command`Optional + +```java +public java.util.List getCommand(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Entrypoint array (the command to execute when the container starts). + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```java +public java.lang.Number getPort(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `portNumber`Optional + +```java +public java.lang.Number getPortNumber(); +``` + +- *Type:* `java.lang.Number` + +The port number that was configured for this container. + +If undefined, either the container doesn't expose a port, or its +port configuration is stored in the `ports` field. + +--- + +##### `resources`Optional + +```java +public ContainerResources getResources(); +``` + +- *Type:* [`org.cdk8s.plus27.ContainerResources`](#org.cdk8s.plus27.ContainerResources) + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `workingDir`Optional + +```java +public java.lang.String getWorkingDir(); +``` + +- *Type:* `java.lang.String` + +The working directory inside the container. + +--- + + +### ContainerSecurityContext + +Container security attributes and settings. + +#### Initializers + +```java +import org.cdk8s.plus27.ContainerSecurityContext; + +ContainerSecurityContext.Builder.create() +// .allowPrivilegeEscalation(java.lang.Boolean) +// .ensureNonRoot(java.lang.Boolean) +// .group(java.lang.Number) +// .privileged(java.lang.Boolean) +// .readOnlyRootFilesystem(java.lang.Boolean) +// .user(java.lang.Number) + .build(); +``` + +##### `allowPrivilegeEscalation`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Whether a process can gain more privileges than its parent process. + +--- + +##### `ensureNonRoot`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +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. + +--- + +##### `group`Optional + +- *Type:* `java.lang.Number` +- *Default:* 26000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The GID to run the entrypoint of the container process. + +--- + +##### `privileged`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +Run container in privileged mode. + +Processes in privileged containers are essentially equivalent to root on the host. + +--- + +##### `readOnlyRootFilesystem`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +Whether this container has a read-only root filesystem. + +--- + +##### `user`Optional + +- *Type:* `java.lang.Number` +- *Default:* 25000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The UID to run the entrypoint of the container process. + +--- + + + +#### Properties + +##### `ensureNonRoot`Required + +```java +public java.lang.Boolean getEnsureNonRoot(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `privileged`Required + +```java +public java.lang.Boolean getPrivileged(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `readOnlyRootFilesystem`Required + +```java +public java.lang.Boolean getReadOnlyRootFilesystem(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `allowPrivilegeEscalation`Optional + +```java +public java.lang.Boolean getAllowPrivilegeEscalation(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `group`Optional + +```java +public java.lang.Number getGroup(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `user`Optional + +```java +public java.lang.Number getUser(); +``` + +- *Type:* `java.lang.Number` + +--- + + +### Cpu + +Represents the amount of CPU. + +The amount can be passed as millis or units. + + +#### Static Functions + +##### `millis` + +```java +import org.cdk8s.plus27.Cpu; + +Cpu.millis(java.lang.Number amount) +``` + +###### `amount`Required + +- *Type:* `java.lang.Number` + +--- + +##### `units` + +```java +import org.cdk8s.plus27.Cpu; + +Cpu.units(java.lang.Number amount) +``` + +###### `amount`Required + +- *Type:* `java.lang.Number` + +--- + +#### Properties + +##### `amount`Required + +```java +public java.lang.String getAmount(); +``` + +- *Type:* `java.lang.String` + +--- + + +### DeploymentStrategy + +Deployment strategies. + + +#### Static Functions + +##### `recreate` + +```java +import org.cdk8s.plus27.DeploymentStrategy; + +DeploymentStrategy.recreate() +``` + +##### `rollingUpdate` + +```java +import org.cdk8s.plus27.DeploymentStrategy; + +DeploymentStrategy.rollingUpdate() +DeploymentStrategy.rollingUpdate(DeploymentStrategyRollingUpdateOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.DeploymentStrategyRollingUpdateOptions`](#org.cdk8s.plus27.DeploymentStrategyRollingUpdateOptions) + +--- + + + +### Env + +Container environment variables. + +#### Initializers + +```java +import org.cdk8s.plus27.Env; + +new Env(java.util.List sources, java.util.Map variables); +``` + +##### `sources`Required + +- *Type:* java.util.List<[`org.cdk8s.plus27.EnvFrom`](#org.cdk8s.plus27.EnvFrom)> + +--- + +##### `variables`Required + +- *Type:* java.util.Map + +--- + +#### Methods + +##### `addVariable` + +```java +public addVariable(java.lang.String name, EnvValue value) +``` + +###### `name`Required + +- *Type:* `java.lang.String` + +--- + +###### `value`Required + +- *Type:* [`org.cdk8s.plus27.EnvValue`](#org.cdk8s.plus27.EnvValue) + +--- + +##### `copyFrom` + +```java +public copyFrom(EnvFrom from) +``` + +###### `from`Required + +- *Type:* [`org.cdk8s.plus27.EnvFrom`](#org.cdk8s.plus27.EnvFrom) + +--- + +#### Static Functions + +##### `fromConfigMap` + +```java +import org.cdk8s.plus27.Env; + +Env.fromConfigMap(IConfigMap configMap) +Env.fromConfigMap(IConfigMap configMap, java.lang.String prefix) +``` + +###### `configMap`Required + +- *Type:* [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap) + +--- + +###### `prefix`Optional + +- *Type:* `java.lang.String` + +--- + +##### `fromSecret` + +```java +import org.cdk8s.plus27.Env; + +Env.fromSecret(ISecret secr) +``` + +###### `secr`Required + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +--- + +#### Properties + +##### `sources`Required + +```java +public java.util.List getSources(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.EnvFrom`](#org.cdk8s.plus27.EnvFrom)> + +The list of sources used to populate the container environment, in addition to the `variables`. + +Returns a copy. To add a source use `container.env.copyFrom()`. + +--- + +##### `variables`Required + +```java +public java.util.Map getVariables(); +``` + +- *Type:* java.util.Map + +The environment variables for this container. + +Returns a copy. To add environment variables use `container.env.addVariable()`. + +--- + + +### EnvFrom + +A collection of env variables defined in other resources. + +#### Initializers + +```java +import org.cdk8s.plus27.EnvFrom; + +new EnvFrom(); +new EnvFrom(IConfigMap configMap); +new EnvFrom(IConfigMap configMap, java.lang.String prefix); +new EnvFrom(IConfigMap configMap, java.lang.String prefix, ISecret sec); +``` + +##### `configMap`Optional + +- *Type:* [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap) + +--- + +##### `prefix`Optional + +- *Type:* `java.lang.String` + +--- + +##### `sec`Optional + +- *Type:* [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +--- + + + + + +### EnvValue + +Utility class for creating reading env values from various sources. + + +#### Static Functions + +##### `fromConfigMap` + +```java +import org.cdk8s.plus27.EnvValue; + +EnvValue.fromConfigMap(IConfigMap configMap, java.lang.String key) +EnvValue.fromConfigMap(IConfigMap configMap, java.lang.String key, EnvValueFromConfigMapOptions options) +``` + +###### `configMap`Required + +- *Type:* [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap) + +The config map. + +--- + +###### `key`Required + +- *Type:* `java.lang.String` + +The key to extract the value from. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromConfigMapOptions`](#org.cdk8s.plus27.EnvValueFromConfigMapOptions) + +Additional options. + +--- + +##### `fromFieldRef` + +```java +import org.cdk8s.plus27.EnvValue; + +EnvValue.fromFieldRef(EnvFieldPaths fieldPath) +EnvValue.fromFieldRef(EnvFieldPaths fieldPath, EnvValueFromFieldRefOptions options) +``` + +###### `fieldPath`Required + +- *Type:* [`org.cdk8s.plus27.EnvFieldPaths`](#org.cdk8s.plus27.EnvFieldPaths) + +: The field reference. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromFieldRefOptions`](#org.cdk8s.plus27.EnvValueFromFieldRefOptions) + +: Additional options. + +--- + +##### `fromProcess` + +```java +import org.cdk8s.plus27.EnvValue; + +EnvValue.fromProcess(java.lang.String key) +EnvValue.fromProcess(java.lang.String key, EnvValueFromProcessOptions options) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +The key to read. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromProcessOptions`](#org.cdk8s.plus27.EnvValueFromProcessOptions) + +Additional options. + +--- + +##### `fromResource` + +```java +import org.cdk8s.plus27.EnvValue; + +EnvValue.fromResource(ResourceFieldPaths resource) +EnvValue.fromResource(ResourceFieldPaths resource, EnvValueFromResourceOptions options) +``` + +###### `resource`Required + +- *Type:* [`org.cdk8s.plus27.ResourceFieldPaths`](#org.cdk8s.plus27.ResourceFieldPaths) + +: Resource to select the value from. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromResourceOptions`](#org.cdk8s.plus27.EnvValueFromResourceOptions) + +: Additional options. + +--- + +##### `fromSecretValue` + +```java +import org.cdk8s.plus27.EnvValue; + +EnvValue.fromSecretValue(SecretValue secretValue) +EnvValue.fromSecretValue(SecretValue secretValue, EnvValueFromSecretOptions options) +``` + +###### `secretValue`Required + +- *Type:* [`org.cdk8s.plus27.SecretValue`](#org.cdk8s.plus27.SecretValue) + +The secret value (secrent + key). + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromSecretOptions`](#org.cdk8s.plus27.EnvValueFromSecretOptions) + +Additional options. + +--- + +##### `fromValue` + +```java +import org.cdk8s.plus27.EnvValue; + +EnvValue.fromValue(java.lang.String value) +``` + +###### `value`Required + +- *Type:* `java.lang.String` + +The value. + +--- + +#### Properties + +##### `value`Optional + +```java +public java.lang.Object getValue(); +``` + +- *Type:* `java.lang.Object` + +--- + +##### `valueFrom`Optional + +```java +public java.lang.Object getValueFrom(); +``` + +- *Type:* `java.lang.Object` + +--- + + +### Handler + +Defines a specific action that should be taken. + + +#### Static Functions + +##### `fromCommand` + +```java +import org.cdk8s.plus27.Handler; + +Handler.fromCommand(java.util.List command) +``` + +###### `command`Required + +- *Type:* java.util.List<`java.lang.String`> + +The command to execute. + +--- + +##### `fromHttpGet` + +```java +import org.cdk8s.plus27.Handler; + +Handler.fromHttpGet(java.lang.String path) +Handler.fromHttpGet(java.lang.String path, HandlerFromHttpGetOptions options) +``` + +###### `path`Required + +- *Type:* `java.lang.String` + +The URL path to hit. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.HandlerFromHttpGetOptions`](#org.cdk8s.plus27.HandlerFromHttpGetOptions) + +Options. + +--- + +##### `fromTcpSocket` + +```java +import org.cdk8s.plus27.Handler; + +Handler.fromTcpSocket() +Handler.fromTcpSocket(HandlerFromTcpSocketOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.HandlerFromTcpSocketOptions`](#org.cdk8s.plus27.HandlerFromTcpSocketOptions) + +Options. + +--- + + + +### IngressBackend + +The backend for an ingress path. + + +#### Static Functions + +##### `fromResource` + +```java +import org.cdk8s.plus27.IngressBackend; + +IngressBackend.fromResource(IResource resource) +``` + +###### `resource`Required + +- *Type:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +--- + +##### `fromService` + +```java +import org.cdk8s.plus27.IngressBackend; + +IngressBackend.fromService(Service serv) +IngressBackend.fromService(Service serv, ServiceIngressBackendOptions options) +``` + +###### `serv`Required + +- *Type:* [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service) + +The service object. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.ServiceIngressBackendOptions`](#org.cdk8s.plus27.ServiceIngressBackendOptions) + +--- + + + +### LabeledNode + +A node that is matched by label selectors. + +#### Initializers + +```java +import org.cdk8s.plus27.LabeledNode; + +new LabeledNode(java.util.List labelSelector); +``` + +##### `labelSelector`Required + +- *Type:* java.util.List<[`org.cdk8s.plus27.NodeLabelQuery`](#org.cdk8s.plus27.NodeLabelQuery)> + +--- + + + +#### Properties + +##### `labelSelector`Required + +```java +public java.util.List getLabelSelector(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NodeLabelQuery`](#org.cdk8s.plus27.NodeLabelQuery)> + +--- + + +### LabelExpression + +Represents a query that can be performed against resources with labels. + + +#### Static Functions + +##### `doesNotExist` + +```java +import org.cdk8s.plus27.LabelExpression; + +LabelExpression.doesNotExist(java.lang.String key) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +##### `exists` + +```java +import org.cdk8s.plus27.LabelExpression; + +LabelExpression.exists(java.lang.String key) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +##### `in` + +```java +import org.cdk8s.plus27.LabelExpression; + +LabelExpression.in(java.lang.String key, java.util.List values) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `values`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +##### `notIn` + +```java +import org.cdk8s.plus27.LabelExpression; + +LabelExpression.notIn(java.lang.String key, java.util.List values) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `values`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +#### Properties + +##### `key`Required + +```java +public java.lang.String getKey(); +``` + +- *Type:* `java.lang.String` + +--- + +##### `operator`Required + +```java +public java.lang.String getOperator(); +``` + +- *Type:* `java.lang.String` + +--- + +##### `values`Optional + +```java +public java.util.List getValues(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +--- + + +### LabelSelector + +Match a resource by labels. + +#### Methods + +##### `isEmpty` + +```java +public isEmpty() +``` + +#### Static Functions + +##### `of` + +```java +import org.cdk8s.plus27.LabelSelector; + +LabelSelector.of() +LabelSelector.of(LabelSelectorOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.LabelSelectorOptions`](#org.cdk8s.plus27.LabelSelectorOptions) + +--- + + + +### Metric + +A metric condition that HorizontalPodAutoscaler's scale on. + + +#### Static Functions + +##### `containerCpu` + +```java +import org.cdk8s.plus27.Metric; + +Metric.containerCpu(MetricContainerResourceOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricContainerResourceOptions`](#org.cdk8s.plus27.MetricContainerResourceOptions) + +--- + +##### `containerEphemeralStorage` + +```java +import org.cdk8s.plus27.Metric; + +Metric.containerEphemeralStorage(MetricContainerResourceOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricContainerResourceOptions`](#org.cdk8s.plus27.MetricContainerResourceOptions) + +--- + +##### `containerMemory` + +```java +import org.cdk8s.plus27.Metric; + +Metric.containerMemory(MetricContainerResourceOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricContainerResourceOptions`](#org.cdk8s.plus27.MetricContainerResourceOptions) + +--- + +##### `containerStorage` + +```java +import org.cdk8s.plus27.Metric; + +Metric.containerStorage(MetricContainerResourceOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricContainerResourceOptions`](#org.cdk8s.plus27.MetricContainerResourceOptions) + +--- + +##### `external` + +```java +import org.cdk8s.plus27.Metric; + +Metric.external(MetricOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricOptions`](#org.cdk8s.plus27.MetricOptions) + +--- + +##### `object` + +```java +import org.cdk8s.plus27.Metric; + +Metric.object(MetricObjectOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricObjectOptions`](#org.cdk8s.plus27.MetricObjectOptions) + +--- + +##### `pods` + +```java +import org.cdk8s.plus27.Metric; + +Metric.pods(MetricOptions options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.MetricOptions`](#org.cdk8s.plus27.MetricOptions) + +--- + +##### `resourceCpu` + +```java +import org.cdk8s.plus27.Metric; + +Metric.resourceCpu(MetricTarget target) +``` + +###### `target`Required + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +--- + +##### `resourceEphemeralStorage` + +```java +import org.cdk8s.plus27.Metric; + +Metric.resourceEphemeralStorage(MetricTarget target) +``` + +###### `target`Required + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +--- + +##### `resourceMemory` + +```java +import org.cdk8s.plus27.Metric; + +Metric.resourceMemory(MetricTarget target) +``` + +###### `target`Required + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +--- + +##### `resourceStorage` + +```java +import org.cdk8s.plus27.Metric; + +Metric.resourceStorage(MetricTarget target) +``` + +###### `target`Required + +- *Type:* [`org.cdk8s.plus27.MetricTarget`](#org.cdk8s.plus27.MetricTarget) + +--- + +#### Properties + +##### `type`Required + +```java +public java.lang.String getType(); +``` + +- *Type:* `java.lang.String` + +--- + + +### MetricTarget + +A metric condition that will trigger scaling behavior when satisfied. + + +#### Static Functions + +##### `averageUtilization` + +```java +import org.cdk8s.plus27.MetricTarget; + +MetricTarget.averageUtilization(java.lang.Number averageUtilization) +``` + +###### `averageUtilization`Required + +- *Type:* `java.lang.Number` + +The percentage of the utilization metric. + +e.g. `50` for 50%. + +--- + +##### `averageValue` + +```java +import org.cdk8s.plus27.MetricTarget; + +MetricTarget.averageValue(java.lang.Number averageValue) +``` + +###### `averageValue`Required + +- *Type:* `java.lang.Number` + +The average metric value. + +--- + +##### `value` + +```java +import org.cdk8s.plus27.MetricTarget; + +MetricTarget.value(java.lang.Number value) +``` + +###### `value`Required + +- *Type:* `java.lang.Number` + +The target value. + +--- + + + +### NamedNode + +A node that is matched by its name. + +#### Initializers + +```java +import org.cdk8s.plus27.NamedNode; + +new NamedNode(java.lang.String name); +``` + +##### `name`Required + +- *Type:* `java.lang.String` + +--- + + + +#### Properties + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +--- + + +### NetworkPolicyPort + +Describes a port to allow traffic on. + + +#### Static Functions + +##### `allTcp` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.allTcp() +``` + +##### `allUdp` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.allUdp() +``` + +##### `of` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.of(NetworkPolicyPortProps props) +``` + +###### `props`Required + +- *Type:* [`org.cdk8s.plus27.NetworkPolicyPortProps`](#org.cdk8s.plus27.NetworkPolicyPortProps) + +--- + +##### `tcp` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.tcp(java.lang.Number port) +``` + +###### `port`Required + +- *Type:* `java.lang.Number` + +--- + +##### `tcpRange` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.tcpRange(java.lang.Number startPort, java.lang.Number endPort) +``` + +###### `startPort`Required + +- *Type:* `java.lang.Number` + +--- + +###### `endPort`Required + +- *Type:* `java.lang.Number` + +--- + +##### `udp` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.udp(java.lang.Number port) +``` + +###### `port`Required + +- *Type:* `java.lang.Number` + +--- + +##### `udpRange` + +```java +import org.cdk8s.plus27.NetworkPolicyPort; + +NetworkPolicyPort.udpRange(java.lang.Number startPort, java.lang.Number endPort) +``` + +###### `startPort`Required + +- *Type:* `java.lang.Number` + +--- + +###### `endPort`Required + +- *Type:* `java.lang.Number` + +--- + + + +### Node + +Represents a node in the cluster. + +#### Initializers + +```java +import org.cdk8s.plus27.Node; + +new Node(); +``` + + +#### Static Functions + +##### `labeled` + +```java +import org.cdk8s.plus27.Node; + +Node.labeled(NodeLabelQuery labelSelector) +``` + +###### `labelSelector`Required + +- *Type:* [`org.cdk8s.plus27.NodeLabelQuery`](#org.cdk8s.plus27.NodeLabelQuery) + +--- + +##### `named` + +```java +import org.cdk8s.plus27.Node; + +Node.named(java.lang.String nodeName) +``` + +###### `nodeName`Required + +- *Type:* `java.lang.String` + +--- + +##### `tainted` + +```java +import org.cdk8s.plus27.Node; + +Node.tainted(NodeTaintQuery taintSelector) +``` + +###### `taintSelector`Required + +- *Type:* [`org.cdk8s.plus27.NodeTaintQuery`](#org.cdk8s.plus27.NodeTaintQuery) + +--- + + + +### NodeLabelQuery + +Represents a query that can be performed against nodes with labels. + + +#### Static Functions + +##### `doesNotExist` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.doesNotExist(java.lang.String key) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +##### `exists` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.exists(java.lang.String key) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +##### `gt` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.gt(java.lang.String key, java.util.List values) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `values`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +##### `in` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.in(java.lang.String key, java.util.List values) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `values`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +##### `is` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.is(java.lang.String key, java.lang.String value) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +--- + +##### `lt` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.lt(java.lang.String key, java.util.List values) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `values`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + +##### `notIn` + +```java +import org.cdk8s.plus27.NodeLabelQuery; + +NodeLabelQuery.notIn(java.lang.String key, java.util.List values) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `values`Required + +- *Type:* java.util.List<`java.lang.String`> + +--- + + + +### NodeTaintQuery + +Taint queries that can be perfomed against nodes. + + +#### Static Functions + +##### `any` + +```java +import org.cdk8s.plus27.NodeTaintQuery; + +NodeTaintQuery.any() +``` + +##### `exists` + +```java +import org.cdk8s.plus27.NodeTaintQuery; + +NodeTaintQuery.exists(java.lang.String key) +NodeTaintQuery.exists(java.lang.String key, NodeTaintQueryOptions options) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.NodeTaintQueryOptions`](#org.cdk8s.plus27.NodeTaintQueryOptions) + +--- + +##### `is` + +```java +import org.cdk8s.plus27.NodeTaintQuery; + +NodeTaintQuery.is(java.lang.String key, java.lang.String value) +NodeTaintQuery.is(java.lang.String key, java.lang.String value, NodeTaintQueryOptions options) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +###### `value`Required + +- *Type:* `java.lang.String` + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.NodeTaintQueryOptions`](#org.cdk8s.plus27.NodeTaintQueryOptions) + +--- + + + +### NonApiResource + +- *Implements:* [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +Factory for creating non api resources. + +#### Methods + +##### `asApiResource` + +```java +public asApiResource() +``` + +##### `asNonApiResource` + +```java +public asNonApiResource() +``` + +#### Static Functions + +##### `of` + +```java +import org.cdk8s.plus27.NonApiResource; + +NonApiResource.of(java.lang.String url) +``` + +###### `url`Required + +- *Type:* `java.lang.String` + +--- + + + +### PercentOrAbsolute + +Union like class repsenting either a ration in percents or an absolute number. + +#### Methods + +##### `isZero` + +```java +public isZero() +``` + +#### Static Functions + +##### `absolute` + +```java +import org.cdk8s.plus27.PercentOrAbsolute; + +PercentOrAbsolute.absolute(java.lang.Number num) +``` + +###### `num`Required + +- *Type:* `java.lang.Number` + +--- + +##### `percent` + +```java +import org.cdk8s.plus27.PercentOrAbsolute; + +PercentOrAbsolute.percent(java.lang.Number percent) +``` + +###### `percent`Required + +- *Type:* `java.lang.Number` + +--- + +#### Properties + +##### `value`Required + +```java +public java.lang.Object getValue(); +``` + +- *Type:* `java.lang.Object` + +--- + + +### PodConnections + +Controls network isolation rules for inter-pod communication. + +#### Initializers + +```java +import org.cdk8s.plus27.PodConnections; + +new PodConnections(AbstractPod instance); +``` + +##### `instance`Required + +- *Type:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod) + +--- + +#### Methods + +##### `allowFrom` + +```java +public allowFrom(INetworkPolicyPeer peer) +public allowFrom(INetworkPolicyPeer peer, PodConnectionsAllowFromOptions options) +``` + +###### `peer`Required + +- *Type:* [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PodConnectionsAllowFromOptions`](#org.cdk8s.plus27.PodConnectionsAllowFromOptions) + +--- + +##### `allowTo` + +```java +public allowTo(INetworkPolicyPeer peer) +public allowTo(INetworkPolicyPeer peer, PodConnectionsAllowToOptions options) +``` + +###### `peer`Required + +- *Type:* [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PodConnectionsAllowToOptions`](#org.cdk8s.plus27.PodConnectionsAllowToOptions) + +--- + +##### `isolate` + +```java +public isolate() +``` + + + + +### PodDns + +Holds dns settings of the pod. + +#### Initializers + +```java +import org.cdk8s.plus27.PodDns; + +PodDns.Builder.create() +// .hostname(java.lang.String) +// .hostnameAsFQDN(java.lang.Boolean) +// .nameservers(java.util.List) +// .options(java.util.List) +// .policy(DnsPolicy) +// .searches(java.util.List) +// .subdomain(java.lang.String) + .build(); +``` + +##### `hostname`Optional + +- *Type:* `java.lang.String` +- *Default:* Set to a system-defined value. + +Specifies the hostname of the Pod. + +--- + +##### `hostnameAsFQDN`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* false + +If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + +In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). +In Windows containers, this means setting the registry value of hostname for the registry +key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. +If a pod does not have FQDN, this has no effect. + +--- + +##### `nameservers`Optional + +- *Type:* java.util.List<`java.lang.String`> + +A list of IP addresses that will be used as DNS servers for the Pod. + +There can be at most 3 IP addresses specified. +When the policy is set to "NONE", the list must contain at least one IP address, +otherwise this property is optional. +The servers listed will be combined to the base nameservers generated from +the specified DNS policy with duplicate addresses removed. + +--- + +##### `options`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.DnsOption`](#org.cdk8s.plus27.DnsOption)> + +List of objects where each object may have a name property (required) and a value property (optional). + +The contents in this property +will be merged to the options generated from the specified DNS policy. +Duplicate entries are removed. + +--- + +##### `policy`Optional + +- *Type:* [`org.cdk8s.plus27.DnsPolicy`](#org.cdk8s.plus27.DnsPolicy) +- *Default:* DnsPolicy.CLUSTER_FIRST + +Set DNS policy for the pod. + +If policy is set to `None`, other configuration must be supplied. + +--- + +##### `searches`Optional + +- *Type:* java.util.List<`java.lang.String`> + +A list of DNS search domains for hostname lookup in the Pod. + +When specified, the provided list will be merged into the base +search domain names generated from the chosen DNS policy. +Duplicate domain names are removed. + +Kubernetes allows for at most 6 search domains. + +--- + +##### `subdomain`Optional + +- *Type:* `java.lang.String` +- *Default:* No subdomain. + +If specified, the fully qualified Pod hostname will be "...svc.". + +--- + +#### Methods + +##### `addNameserver` + +```java +public addNameserver(java.lang.String nameservers) +``` + +###### `nameservers`Required + +- *Type:* `java.lang.String` + +--- + +##### `addOption` + +```java +public addOption(DnsOption options) +``` + +###### `options`Required + +- *Type:* [`org.cdk8s.plus27.DnsOption`](#org.cdk8s.plus27.DnsOption) + +--- + +##### `addSearch` + +```java +public addSearch(java.lang.String searches) +``` + +###### `searches`Required + +- *Type:* `java.lang.String` + +--- + + +#### Properties + +##### `hostnameAsFQDN`Required + +```java +public java.lang.Boolean getHostnameAsFQDN(); +``` + +- *Type:* `java.lang.Boolean` + +Whether or not the pods hostname is set to its FQDN. + +--- + +##### `nameservers`Required + +```java +public java.util.List getNameservers(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Nameservers defined for this pod. + +--- + +##### `options`Required + +```java +public java.util.List getOptions(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.DnsOption`](#org.cdk8s.plus27.DnsOption)> + +Custom dns options defined for this pod. + +--- + +##### `policy`Required + +```java +public DnsPolicy getPolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.DnsPolicy`](#org.cdk8s.plus27.DnsPolicy) + +The DNS policy of this pod. + +--- + +##### `searches`Required + +```java +public java.util.List getSearches(); +``` + +- *Type:* java.util.List<`java.lang.String`> + +Search domains defined for this pod. + +--- + +##### `hostname`Optional + +```java +public java.lang.String getHostname(); +``` + +- *Type:* `java.lang.String` + +The configured hostname of the pod. + +Undefined means its set to a system-defined value. + +--- + +##### `subdomain`Optional + +```java +public java.lang.String getSubdomain(); +``` + +- *Type:* `java.lang.String` + +The configured subdomain of the pod. + +--- + + +### PodScheduling + +Controls the pod scheduling strategy. + +#### Initializers + +```java +import org.cdk8s.plus27.PodScheduling; + +new PodScheduling(AbstractPod instance); +``` + +##### `instance`Required + +- *Type:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod) + +--- + +#### Methods + +##### `assign` + +```java +public assign(NamedNode node) +``` + +###### `node`Required + +- *Type:* [`org.cdk8s.plus27.NamedNode`](#org.cdk8s.plus27.NamedNode) + +--- + +##### `attract` + +```java +public attract(LabeledNode node) +public attract(LabeledNode node, PodSchedulingAttractOptions options) +``` + +###### `node`Required + +- *Type:* [`org.cdk8s.plus27.LabeledNode`](#org.cdk8s.plus27.LabeledNode) + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PodSchedulingAttractOptions`](#org.cdk8s.plus27.PodSchedulingAttractOptions) + +--- + +##### `colocate` + +```java +public colocate(IPodSelector selector) +public colocate(IPodSelector selector, PodSchedulingColocateOptions options) +``` + +###### `selector`Required + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PodSchedulingColocateOptions`](#org.cdk8s.plus27.PodSchedulingColocateOptions) + +--- + +##### `separate` + +```java +public separate(IPodSelector selector) +public separate(IPodSelector selector, PodSchedulingSeparateOptions options) +``` + +###### `selector`Required + +- *Type:* [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.PodSchedulingSeparateOptions`](#org.cdk8s.plus27.PodSchedulingSeparateOptions) + +--- + +##### `tolerate` + +```java +public tolerate(TaintedNode node) +``` + +###### `node`Required + +- *Type:* [`org.cdk8s.plus27.TaintedNode`](#org.cdk8s.plus27.TaintedNode) + +--- + + + + +### PodSecurityContext + +Holds pod-level security attributes and common container settings. + +#### Initializers + +```java +import org.cdk8s.plus27.PodSecurityContext; + +PodSecurityContext.Builder.create() +// .ensureNonRoot(java.lang.Boolean) +// .fsGroup(java.lang.Number) +// .fsGroupChangePolicy(FsGroupChangePolicy) +// .group(java.lang.Number) +// .sysctls(java.util.List) +// .user(java.lang.Number) + .build(); +``` + +##### `ensureNonRoot`Optional + +- *Type:* `java.lang.Boolean` +- *Default:* true + +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. + +--- + +##### `fsGroup`Optional + +- *Type:* `java.lang.Number` +- *Default:* Volume ownership is not changed. + +Modify the ownership and permissions of pod volumes to this GID. + +--- + +##### `fsGroupChangePolicy`Optional + +- *Type:* [`org.cdk8s.plus27.FsGroupChangePolicy`](#org.cdk8s.plus27.FsGroupChangePolicy) +- *Default:* FsGroupChangePolicy.ALWAYS + +Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. + +This field will only apply to volume types which support fsGroup based ownership(and permissions). +It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. + +--- + +##### `group`Optional + +- *Type:* `java.lang.Number` +- *Default:* Group configured by container runtime + +The GID to run the entrypoint of the container process. + +--- + +##### `sysctls`Optional + +- *Type:* java.util.List<[`org.cdk8s.plus27.Sysctl`](#org.cdk8s.plus27.Sysctl)> +- *Default:* No sysctls + +Sysctls hold a list of namespaced sysctls used for the pod. + +Pods with unsupported sysctls (by the container runtime) might fail to launch. + +--- + +##### `user`Optional + +- *Type:* `java.lang.Number` +- *Default:* User specified in image metadata + +The UID to run the entrypoint of the container process. + +--- + + + +#### Properties + +##### `ensureNonRoot`Required + +```java +public java.lang.Boolean getEnsureNonRoot(); +``` + +- *Type:* `java.lang.Boolean` + +--- + +##### `fsGroupChangePolicy`Required + +```java +public FsGroupChangePolicy getFsGroupChangePolicy(); +``` + +- *Type:* [`org.cdk8s.plus27.FsGroupChangePolicy`](#org.cdk8s.plus27.FsGroupChangePolicy) + +--- + +##### `sysctls`Required + +```java +public java.util.List getSysctls(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.Sysctl`](#org.cdk8s.plus27.Sysctl)> + +--- + +##### `fsGroup`Optional + +```java +public java.lang.Number getFsGroup(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `group`Optional + +```java +public java.lang.Number getGroup(); +``` + +- *Type:* `java.lang.Number` + +--- + +##### `user`Optional + +```java +public java.lang.Number getUser(); +``` + +- *Type:* `java.lang.Number` + +--- + + +### Probe + +Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. + + +#### Static Functions + +##### `fromCommand` + +```java +import org.cdk8s.plus27.Probe; + +Probe.fromCommand(java.util.List command) +Probe.fromCommand(java.util.List command, CommandProbeOptions options) +``` + +###### `command`Required + +- *Type:* java.util.List<`java.lang.String`> + +The command to execute. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.CommandProbeOptions`](#org.cdk8s.plus27.CommandProbeOptions) + +Options. + +--- + +##### `fromHttpGet` + +```java +import org.cdk8s.plus27.Probe; + +Probe.fromHttpGet(java.lang.String path) +Probe.fromHttpGet(java.lang.String path, HttpGetProbeOptions options) +``` + +###### `path`Required + +- *Type:* `java.lang.String` + +The URL path to hit. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.HttpGetProbeOptions`](#org.cdk8s.plus27.HttpGetProbeOptions) + +Options. + +--- + +##### `fromTcpSocket` + +```java +import org.cdk8s.plus27.Probe; + +Probe.fromTcpSocket() +Probe.fromTcpSocket(TcpSocketProbeOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.TcpSocketProbeOptions`](#org.cdk8s.plus27.TcpSocketProbeOptions) + +Options. + +--- + + + +### Replicas + +The amount of replicas that will change. + + +#### Static Functions + +##### `absolute` + +```java +import org.cdk8s.plus27.Replicas; + +Replicas.absolute(java.lang.Number value) +``` + +###### `value`Required + +- *Type:* `java.lang.Number` + +The amount of change to apply. + +Must be greater than 0. + +--- + +##### `percent` + +```java +import org.cdk8s.plus27.Replicas; + +Replicas.percent(java.lang.Number value) +``` + +###### `value`Required + +- *Type:* `java.lang.Number` + +The percentage of change to apply. + +Must be greater than 0. + +--- + + + +### ResourcePermissions + +Controls permissions for operations on resources. + +#### Initializers + +```java +import org.cdk8s.plus27.ResourcePermissions; + +new ResourcePermissions(Resource instance); +``` + +##### `instance`Required + +- *Type:* [`org.cdk8s.plus27.Resource`](#org.cdk8s.plus27.Resource) + +--- + +#### Methods + +##### `grantRead` + +```java +public grantRead(ISubject subjects) +``` + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +--- + +##### `grantReadWrite` + +```java +public grantReadWrite(ISubject subjects) +``` + +###### `subjects`Required + +- *Type:* [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +--- + + + + +### StatefulSetUpdateStrategy + +StatefulSet update strategies. + + +#### Static Functions + +##### `onDelete` + +```java +import org.cdk8s.plus27.StatefulSetUpdateStrategy; + +StatefulSetUpdateStrategy.onDelete() +``` + +##### `rollingUpdate` + +```java +import org.cdk8s.plus27.StatefulSetUpdateStrategy; + +StatefulSetUpdateStrategy.rollingUpdate() +StatefulSetUpdateStrategy.rollingUpdate(StatefulSetUpdateStrategyRollingUpdateOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.StatefulSetUpdateStrategyRollingUpdateOptions`](#org.cdk8s.plus27.StatefulSetUpdateStrategyRollingUpdateOptions) + +--- + + + +### TaintedNode + +A node that is matched by taint selectors. + +#### Initializers + +```java +import org.cdk8s.plus27.TaintedNode; + +new TaintedNode(java.util.List taintSelector); +``` + +##### `taintSelector`Required + +- *Type:* java.util.List<[`org.cdk8s.plus27.NodeTaintQuery`](#org.cdk8s.plus27.NodeTaintQuery)> + +--- + + + +#### Properties + +##### `taintSelector`Required + +```java +public java.util.List getTaintSelector(); +``` + +- *Type:* java.util.List<[`org.cdk8s.plus27.NodeTaintQuery`](#org.cdk8s.plus27.NodeTaintQuery)> + +--- + + +### Topology + +Available topology domains. + + +#### Static Functions + +##### `custom` + +```java +import org.cdk8s.plus27.Topology; + +Topology.custom(java.lang.String key) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +--- + +#### Properties + +##### `key`Required + +```java +public java.lang.String getKey(); +``` + +- *Type:* `java.lang.String` + +--- + +#### Constants + +##### `HOSTNAME` + +- *Type:* [`org.cdk8s.plus27.Topology`](#org.cdk8s.plus27.Topology) + +A hostname represents a single node in the cluster. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetesiohostname + +--- + +##### `REGION` + +- *Type:* [`org.cdk8s.plus27.Topology`](#org.cdk8s.plus27.Topology) + +A region represents a larger domain, made up of one or more zones. + +It is uncommon +for Kubernetes clusters to span multiple regions. While the exact definition of a +zone or region is left to infrastructure implementations, common properties of a region +include higher network latency between them than within them, non-zero cost for network +traffic between them, and failure independence from other zones or regions. + +For example, nodes within a region might share power infrastructure (e.g. a UPS or generator), but +nodes in different regions typically would not. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesioregion + +--- + +##### `ZONE` + +- *Type:* [`org.cdk8s.plus27.Topology`](#org.cdk8s.plus27.Topology) + +A zone represents a logical failure domain. + +It is common for Kubernetes clusters to +span multiple zones for increased availability. While the exact definition of a zone is +left to infrastructure implementations, common properties of a zone include very low +network latency within a zone, no-cost network traffic within a zone, and failure +independence from other zones. For example, nodes within a zone might share a network +switch, but nodes in different zones should not. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesiozone + +--- + +### WorkloadScheduling + +Controls the pod scheduling strategy of this workload. + +It offers some additional API's on top of the core pod scheduling. + +#### Initializers + +```java +import org.cdk8s.plus27.WorkloadScheduling; + +new WorkloadScheduling(AbstractPod instance); +``` + +##### `instance`Required + +- *Type:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod) + +--- + +#### Methods + +##### `spread` + +```java +public spread() +public spread(WorkloadSchedulingSpreadOptions options) +``` + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.WorkloadSchedulingSpreadOptions`](#org.cdk8s.plus27.WorkloadSchedulingSpreadOptions) + +--- + + + + +## Protocols + +### IApiEndpoint + +- *Implemented By:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod), [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource), [`org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume`](#org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume), [`org.cdk8s.plus27.AzureDiskPersistentVolume`](#org.cdk8s.plus27.AzureDiskPersistentVolume), [`org.cdk8s.plus27.BasicAuthSecret`](#org.cdk8s.plus27.BasicAuthSecret), [`org.cdk8s.plus27.ClusterRole`](#org.cdk8s.plus27.ClusterRole), [`org.cdk8s.plus27.ClusterRoleBinding`](#org.cdk8s.plus27.ClusterRoleBinding), [`org.cdk8s.plus27.ConfigMap`](#org.cdk8s.plus27.ConfigMap), [`org.cdk8s.plus27.CronJob`](#org.cdk8s.plus27.CronJob), [`org.cdk8s.plus27.DaemonSet`](#org.cdk8s.plus27.DaemonSet), [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.DockerConfigSecret`](#org.cdk8s.plus27.DockerConfigSecret), [`org.cdk8s.plus27.GCEPersistentDiskPersistentVolume`](#org.cdk8s.plus27.GCEPersistentDiskPersistentVolume), [`org.cdk8s.plus27.HorizontalPodAutoscaler`](#org.cdk8s.plus27.HorizontalPodAutoscaler), [`org.cdk8s.plus27.Ingress`](#org.cdk8s.plus27.Ingress), [`org.cdk8s.plus27.Job`](#org.cdk8s.plus27.Job), [`org.cdk8s.plus27.Namespace`](#org.cdk8s.plus27.Namespace), [`org.cdk8s.plus27.NetworkPolicy`](#org.cdk8s.plus27.NetworkPolicy), [`org.cdk8s.plus27.NonApiResource`](#org.cdk8s.plus27.NonApiResource), [`org.cdk8s.plus27.PersistentVolume`](#org.cdk8s.plus27.PersistentVolume), [`org.cdk8s.plus27.PersistentVolumeClaim`](#org.cdk8s.plus27.PersistentVolumeClaim), [`org.cdk8s.plus27.Pod`](#org.cdk8s.plus27.Pod), [`org.cdk8s.plus27.Resource`](#org.cdk8s.plus27.Resource), [`org.cdk8s.plus27.Role`](#org.cdk8s.plus27.Role), [`org.cdk8s.plus27.RoleBinding`](#org.cdk8s.plus27.RoleBinding), [`org.cdk8s.plus27.Secret`](#org.cdk8s.plus27.Secret), [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service), [`org.cdk8s.plus27.ServiceAccount`](#org.cdk8s.plus27.ServiceAccount), [`org.cdk8s.plus27.ServiceAccountTokenSecret`](#org.cdk8s.plus27.ServiceAccountTokenSecret), [`org.cdk8s.plus27.SshAuthSecret`](#org.cdk8s.plus27.SshAuthSecret), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.TlsSecret`](#org.cdk8s.plus27.TlsSecret), [`org.cdk8s.plus27.Workload`](#org.cdk8s.plus27.Workload), [`org.cdk8s.plus27.IApiEndpoint`](#org.cdk8s.plus27.IApiEndpoint) + +An API Endpoint can either be a resource descriptor (e.g /pods) or a non resource url (e.g /healthz). It must be one or the other, and not both. + +#### Methods + +##### `asApiResource` + +```java +public asApiResource() +``` + +##### `asNonApiResource` + +```java +public asNonApiResource() +``` + + +### IApiResource + +- *Implemented By:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod), [`org.cdk8s.plus27.ApiResource`](#org.cdk8s.plus27.ApiResource), [`org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume`](#org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume), [`org.cdk8s.plus27.AzureDiskPersistentVolume`](#org.cdk8s.plus27.AzureDiskPersistentVolume), [`org.cdk8s.plus27.BasicAuthSecret`](#org.cdk8s.plus27.BasicAuthSecret), [`org.cdk8s.plus27.ClusterRole`](#org.cdk8s.plus27.ClusterRole), [`org.cdk8s.plus27.ClusterRoleBinding`](#org.cdk8s.plus27.ClusterRoleBinding), [`org.cdk8s.plus27.ConfigMap`](#org.cdk8s.plus27.ConfigMap), [`org.cdk8s.plus27.CronJob`](#org.cdk8s.plus27.CronJob), [`org.cdk8s.plus27.DaemonSet`](#org.cdk8s.plus27.DaemonSet), [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.DockerConfigSecret`](#org.cdk8s.plus27.DockerConfigSecret), [`org.cdk8s.plus27.GCEPersistentDiskPersistentVolume`](#org.cdk8s.plus27.GCEPersistentDiskPersistentVolume), [`org.cdk8s.plus27.HorizontalPodAutoscaler`](#org.cdk8s.plus27.HorizontalPodAutoscaler), [`org.cdk8s.plus27.Ingress`](#org.cdk8s.plus27.Ingress), [`org.cdk8s.plus27.Job`](#org.cdk8s.plus27.Job), [`org.cdk8s.plus27.Namespace`](#org.cdk8s.plus27.Namespace), [`org.cdk8s.plus27.NetworkPolicy`](#org.cdk8s.plus27.NetworkPolicy), [`org.cdk8s.plus27.PersistentVolume`](#org.cdk8s.plus27.PersistentVolume), [`org.cdk8s.plus27.PersistentVolumeClaim`](#org.cdk8s.plus27.PersistentVolumeClaim), [`org.cdk8s.plus27.Pod`](#org.cdk8s.plus27.Pod), [`org.cdk8s.plus27.Resource`](#org.cdk8s.plus27.Resource), [`org.cdk8s.plus27.Role`](#org.cdk8s.plus27.Role), [`org.cdk8s.plus27.RoleBinding`](#org.cdk8s.plus27.RoleBinding), [`org.cdk8s.plus27.Secret`](#org.cdk8s.plus27.Secret), [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service), [`org.cdk8s.plus27.ServiceAccount`](#org.cdk8s.plus27.ServiceAccount), [`org.cdk8s.plus27.ServiceAccountTokenSecret`](#org.cdk8s.plus27.ServiceAccountTokenSecret), [`org.cdk8s.plus27.SshAuthSecret`](#org.cdk8s.plus27.SshAuthSecret), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.TlsSecret`](#org.cdk8s.plus27.TlsSecret), [`org.cdk8s.plus27.Workload`](#org.cdk8s.plus27.Workload), [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource), [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole), [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap), [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume), [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim), [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource), [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole), [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret), [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) + +Represents a resource or collection of resources. + + +#### Properties + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +### IClusterRole + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +- *Implemented By:* [`org.cdk8s.plus27.ClusterRole`](#org.cdk8s.plus27.ClusterRole), [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole) + +Represents a cluster-level role. + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IConfigMap + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +- *Implemented By:* [`org.cdk8s.plus27.ConfigMap`](#org.cdk8s.plus27.ConfigMap), [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap) + +Represents a config map. + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### INamespaceSelector + +- *Extends:* [`software.constructs.IConstruct`](#software.constructs.IConstruct) + +- *Implemented By:* [`org.cdk8s.plus27.Namespace`](#org.cdk8s.plus27.Namespace), [`org.cdk8s.plus27.Namespaces`](#org.cdk8s.plus27.Namespaces), [`org.cdk8s.plus27.INamespaceSelector`](#org.cdk8s.plus27.INamespaceSelector) + +Represents an object that can select namespaces. + +#### Methods + +##### `toNamespaceSelectorConfig` + +```java +public toNamespaceSelectorConfig() +``` + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +### INetworkPolicyPeer + +- *Extends:* [`software.constructs.IConstruct`](#software.constructs.IConstruct) + +- *Implemented By:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod), [`org.cdk8s.plus27.CronJob`](#org.cdk8s.plus27.CronJob), [`org.cdk8s.plus27.DaemonSet`](#org.cdk8s.plus27.DaemonSet), [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.Job`](#org.cdk8s.plus27.Job), [`org.cdk8s.plus27.Namespace`](#org.cdk8s.plus27.Namespace), [`org.cdk8s.plus27.Namespaces`](#org.cdk8s.plus27.Namespaces), [`org.cdk8s.plus27.NetworkPolicyIpBlock`](#org.cdk8s.plus27.NetworkPolicyIpBlock), [`org.cdk8s.plus27.Pod`](#org.cdk8s.plus27.Pod), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.Workload`](#org.cdk8s.plus27.Workload), [`org.cdk8s.plus27.INetworkPolicyPeer`](#org.cdk8s.plus27.INetworkPolicyPeer) + +Describes a peer to allow traffic to/from. + +#### Methods + +##### `toNetworkPolicyPeerConfig` + +```java +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```java +public toPodSelector() +``` + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +### IPersistentVolume + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +- *Implemented By:* [`org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume`](#org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume), [`org.cdk8s.plus27.AzureDiskPersistentVolume`](#org.cdk8s.plus27.AzureDiskPersistentVolume), [`org.cdk8s.plus27.GCEPersistentDiskPersistentVolume`](#org.cdk8s.plus27.GCEPersistentDiskPersistentVolume), [`org.cdk8s.plus27.PersistentVolume`](#org.cdk8s.plus27.PersistentVolume), [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume) + +Contract of a `PersistentVolumeClaim`. + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IPersistentVolumeClaim + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +- *Implemented By:* [`org.cdk8s.plus27.PersistentVolumeClaim`](#org.cdk8s.plus27.PersistentVolumeClaim), [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim) + +Contract of a `PersistentVolumeClaim`. + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IPodSelector + +- *Extends:* [`software.constructs.IConstruct`](#software.constructs.IConstruct) + +- *Implemented By:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod), [`org.cdk8s.plus27.CronJob`](#org.cdk8s.plus27.CronJob), [`org.cdk8s.plus27.DaemonSet`](#org.cdk8s.plus27.DaemonSet), [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.Job`](#org.cdk8s.plus27.Job), [`org.cdk8s.plus27.Pod`](#org.cdk8s.plus27.Pod), [`org.cdk8s.plus27.Pods`](#org.cdk8s.plus27.Pods), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.Workload`](#org.cdk8s.plus27.Workload), [`org.cdk8s.plus27.IPodSelector`](#org.cdk8s.plus27.IPodSelector) + +Represents an object that can select pods. + +#### Methods + +##### `toPodSelectorConfig` + +```java +public toPodSelectorConfig() +``` + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +### IResource + +- *Extends:* [`software.constructs.IConstruct`](#software.constructs.IConstruct), [`org.cdk8s.plus27.IApiResource`](#org.cdk8s.plus27.IApiResource) + +- *Implemented By:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod), [`org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume`](#org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume), [`org.cdk8s.plus27.AzureDiskPersistentVolume`](#org.cdk8s.plus27.AzureDiskPersistentVolume), [`org.cdk8s.plus27.BasicAuthSecret`](#org.cdk8s.plus27.BasicAuthSecret), [`org.cdk8s.plus27.ClusterRole`](#org.cdk8s.plus27.ClusterRole), [`org.cdk8s.plus27.ClusterRoleBinding`](#org.cdk8s.plus27.ClusterRoleBinding), [`org.cdk8s.plus27.ConfigMap`](#org.cdk8s.plus27.ConfigMap), [`org.cdk8s.plus27.CronJob`](#org.cdk8s.plus27.CronJob), [`org.cdk8s.plus27.DaemonSet`](#org.cdk8s.plus27.DaemonSet), [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.DockerConfigSecret`](#org.cdk8s.plus27.DockerConfigSecret), [`org.cdk8s.plus27.GCEPersistentDiskPersistentVolume`](#org.cdk8s.plus27.GCEPersistentDiskPersistentVolume), [`org.cdk8s.plus27.HorizontalPodAutoscaler`](#org.cdk8s.plus27.HorizontalPodAutoscaler), [`org.cdk8s.plus27.Ingress`](#org.cdk8s.plus27.Ingress), [`org.cdk8s.plus27.Job`](#org.cdk8s.plus27.Job), [`org.cdk8s.plus27.Namespace`](#org.cdk8s.plus27.Namespace), [`org.cdk8s.plus27.NetworkPolicy`](#org.cdk8s.plus27.NetworkPolicy), [`org.cdk8s.plus27.PersistentVolume`](#org.cdk8s.plus27.PersistentVolume), [`org.cdk8s.plus27.PersistentVolumeClaim`](#org.cdk8s.plus27.PersistentVolumeClaim), [`org.cdk8s.plus27.Pod`](#org.cdk8s.plus27.Pod), [`org.cdk8s.plus27.Resource`](#org.cdk8s.plus27.Resource), [`org.cdk8s.plus27.Role`](#org.cdk8s.plus27.Role), [`org.cdk8s.plus27.RoleBinding`](#org.cdk8s.plus27.RoleBinding), [`org.cdk8s.plus27.Secret`](#org.cdk8s.plus27.Secret), [`org.cdk8s.plus27.Service`](#org.cdk8s.plus27.Service), [`org.cdk8s.plus27.ServiceAccount`](#org.cdk8s.plus27.ServiceAccount), [`org.cdk8s.plus27.ServiceAccountTokenSecret`](#org.cdk8s.plus27.ServiceAccountTokenSecret), [`org.cdk8s.plus27.SshAuthSecret`](#org.cdk8s.plus27.SshAuthSecret), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.TlsSecret`](#org.cdk8s.plus27.TlsSecret), [`org.cdk8s.plus27.Workload`](#org.cdk8s.plus27.Workload), [`org.cdk8s.plus27.IClusterRole`](#org.cdk8s.plus27.IClusterRole), [`org.cdk8s.plus27.IConfigMap`](#org.cdk8s.plus27.IConfigMap), [`org.cdk8s.plus27.IPersistentVolume`](#org.cdk8s.plus27.IPersistentVolume), [`org.cdk8s.plus27.IPersistentVolumeClaim`](#org.cdk8s.plus27.IPersistentVolumeClaim), [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource), [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole), [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret), [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) + +Represents a resource. + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IRole + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +- *Implemented By:* [`org.cdk8s.plus27.ClusterRole`](#org.cdk8s.plus27.ClusterRole), [`org.cdk8s.plus27.Role`](#org.cdk8s.plus27.Role), [`org.cdk8s.plus27.IRole`](#org.cdk8s.plus27.IRole) + +A reference to any Role or ClusterRole. + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IScalable + +- *Implemented By:* [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.IScalable`](#org.cdk8s.plus27.IScalable) + +Represents a scalable workload. + +#### Methods + +##### `markHasAutoscaler` + +```java +public markHasAutoscaler() +``` + +##### `toScalingTarget` + +```java +public toScalingTarget() +``` + +#### Properties + +##### `hasAutoscaler`Required + +```java +public java.lang.Boolean getHasAutoscaler(); +``` + +- *Type:* `java.lang.Boolean` + +If this is a target of an autoscaler. + +--- + +### ISecret + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource) + +- *Implemented By:* [`org.cdk8s.plus27.BasicAuthSecret`](#org.cdk8s.plus27.BasicAuthSecret), [`org.cdk8s.plus27.DockerConfigSecret`](#org.cdk8s.plus27.DockerConfigSecret), [`org.cdk8s.plus27.Secret`](#org.cdk8s.plus27.Secret), [`org.cdk8s.plus27.ServiceAccountTokenSecret`](#org.cdk8s.plus27.ServiceAccountTokenSecret), [`org.cdk8s.plus27.SshAuthSecret`](#org.cdk8s.plus27.SshAuthSecret), [`org.cdk8s.plus27.TlsSecret`](#org.cdk8s.plus27.TlsSecret), [`org.cdk8s.plus27.ISecret`](#org.cdk8s.plus27.ISecret) + +#### Methods + +##### `envValue` + +```java +public envValue(java.lang.String key) +public envValue(java.lang.String key, EnvValueFromSecretOptions options) +``` + +###### `key`Required + +- *Type:* `java.lang.String` + +Secret's key. + +--- + +###### `options`Optional + +- *Type:* [`org.cdk8s.plus27.EnvValueFromSecretOptions`](#org.cdk8s.plus27.EnvValueFromSecretOptions) + +Additional EnvValue options. + +--- + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IServiceAccount + +- *Extends:* [`org.cdk8s.plus27.IResource`](#org.cdk8s.plus27.IResource), [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +- *Implemented By:* [`org.cdk8s.plus27.ServiceAccount`](#org.cdk8s.plus27.ServiceAccount), [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount) + + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```java +public java.lang.String getApiGroup(); +``` + +- *Type:* `java.lang.String` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```java +public java.lang.String getResourceType(); +``` + +- *Type:* `java.lang.String` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```java +public java.lang.String getResourceName(); +``` + +- *Type:* `java.lang.String` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```java +public java.lang.String getApiVersion(); +``` + +- *Type:* `java.lang.String` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```java +public java.lang.String getKind(); +``` + +- *Type:* `java.lang.String` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```java +public java.lang.String getName(); +``` + +- *Type:* `java.lang.String` + +The Kubernetes name of this resource. + +--- + +### IStorage + +- *Extends:* [`software.constructs.IConstruct`](#software.constructs.IConstruct) + +- *Implemented By:* [`org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume`](#org.cdk8s.plus27.AwsElasticBlockStorePersistentVolume), [`org.cdk8s.plus27.AzureDiskPersistentVolume`](#org.cdk8s.plus27.AzureDiskPersistentVolume), [`org.cdk8s.plus27.GCEPersistentDiskPersistentVolume`](#org.cdk8s.plus27.GCEPersistentDiskPersistentVolume), [`org.cdk8s.plus27.PersistentVolume`](#org.cdk8s.plus27.PersistentVolume), [`org.cdk8s.plus27.Volume`](#org.cdk8s.plus27.Volume), [`org.cdk8s.plus27.IStorage`](#org.cdk8s.plus27.IStorage) + +Represents a piece of storage in the cluster. + +#### Methods + +##### `asVolume` + +```java +public asVolume() +``` + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +### ISubject + +- *Extends:* [`software.constructs.IConstruct`](#software.constructs.IConstruct) + +- *Implemented By:* [`org.cdk8s.plus27.AbstractPod`](#org.cdk8s.plus27.AbstractPod), [`org.cdk8s.plus27.CronJob`](#org.cdk8s.plus27.CronJob), [`org.cdk8s.plus27.DaemonSet`](#org.cdk8s.plus27.DaemonSet), [`org.cdk8s.plus27.Deployment`](#org.cdk8s.plus27.Deployment), [`org.cdk8s.plus27.Group`](#org.cdk8s.plus27.Group), [`org.cdk8s.plus27.Job`](#org.cdk8s.plus27.Job), [`org.cdk8s.plus27.Pod`](#org.cdk8s.plus27.Pod), [`org.cdk8s.plus27.ServiceAccount`](#org.cdk8s.plus27.ServiceAccount), [`org.cdk8s.plus27.StatefulSet`](#org.cdk8s.plus27.StatefulSet), [`org.cdk8s.plus27.User`](#org.cdk8s.plus27.User), [`org.cdk8s.plus27.Workload`](#org.cdk8s.plus27.Workload), [`org.cdk8s.plus27.IServiceAccount`](#org.cdk8s.plus27.IServiceAccount), [`org.cdk8s.plus27.ISubject`](#org.cdk8s.plus27.ISubject) + +Represents an object that can be used as a role binding subject. + +#### Methods + +##### `toSubjectConfiguration` + +```java +public toSubjectConfiguration() +``` + +#### Properties + +##### `node`Required + +```java +public Node getNode(); +``` + +- *Type:* [`software.constructs.Node`](#software.constructs.Node) + +The tree node. + +--- + +## Enums + +### AzureDiskPersistentVolumeCachingMode + +Azure disk caching modes. + +#### `NONE` + +None. + +--- + + +#### `READ_ONLY` + +ReadOnly. + +--- + + +#### `READ_WRITE` + +ReadWrite. + +--- + + +### AzureDiskPersistentVolumeKind + +Azure Disk kinds. + +#### `SHARED` + +Multiple blob disks per storage account. + +--- + + +#### `DEDICATED` + +Single blob disk per storage account. + +--- + + +#### `MANAGED` + +Azure managed data disk. + +--- + + +### ConcurrencyPolicy + +Concurrency policy for CronJobs. + +#### `ALLOW` + +This policy allows to run job concurrently. + +--- + + +#### `FORBID` + +This policy does not allow to run job concurrently. + +It does not let a new job to be scheduled if the previous one is not finished yet. + +--- + + +#### `REPLACE` + +This policy replaces the currently running job if a new job is being scheduled. + +--- + + +### ConnectionScheme + +#### `HTTP` + +Use HTTP request for connecting to host. + +--- + + +#### `HTTPS` + +Use HTTPS request for connecting to host. + +--- + + +### DnsPolicy + +Pod DNS policies. + +#### `CLUSTER_FIRST` + +Any DNS query that does not match the configured cluster domain suffix, such as "www.kubernetes.io", is forwarded to the upstream nameserver inherited from the node. Cluster administrators may have extra stub-domain and upstream DNS servers configured. + +--- + + +#### `CLUSTER_FIRST_WITH_HOST_NET` + +For Pods running with hostNetwork, you should explicitly set its DNS policy "ClusterFirstWithHostNet". + +--- + + +#### `DEFAULT` + +The Pod inherits the name resolution configuration from the node that the pods run on. + +--- + + +#### `NONE` + +It allows a Pod to ignore DNS settings from the Kubernetes environment. + +All DNS settings are supposed to be provided using the dnsConfig +field in the Pod Spec. + +--- + + +### EmptyDirMedium + +The medium on which to store the volume. + +#### `DEFAULT` + +The default volume of the backing node. + +--- + + +#### `MEMORY` + +Mount a tmpfs (RAM-backed filesystem) for you instead. + +While tmpfs is very +fast, be aware that unlike disks, tmpfs is cleared on node reboot and any +files you write will count against your Container's memory limit. + +--- + + +### EnvFieldPaths + +#### `POD_NAME` + +The name of the pod. + +--- + + +#### `POD_NAMESPACE` + +The namespace of the pod. + +--- + + +#### `POD_UID` + +The uid of the pod. + +--- + + +#### `POD_LABEL` + +The labels of the pod. + +--- + + +#### `POD_ANNOTATION` + +The annotations of the pod. + +--- + + +#### `POD_IP` + +The ipAddress of the pod. + +--- + + +#### `SERVICE_ACCOUNT_NAME` + +The service account name of the pod. + +--- + + +#### `NODE_NAME` + +The name of the node. + +--- + + +#### `NODE_IP` + +The ipAddress of the node. + +--- + + +#### `POD_IPS` + +The ipAddresess of the pod. + +--- + + +### FsGroupChangePolicy + +#### `ON_ROOT_MISMATCH` + +Only change permissions and ownership if permission and ownership of root directory does not match with expected permissions of the volume. + +This could help shorten the time it takes to change ownership and permission of a volume + +--- + + +#### `ALWAYS` + +Always change permission and ownership of the volume when volume is mounted. + +--- + + +### HostPathVolumeType + +Host path types. + +#### `DEFAULT` + +Empty string (default) is for backward compatibility, which means that no checks will be performed before mounting the hostPath volume. + +--- + + +#### `DIRECTORY_OR_CREATE` + +If nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Kubelet. + +--- + + +#### `DIRECTORY` + +A directory must exist at the given path. + +--- + + +#### `FILE_OR_CREATE` + +If nothing exists at the given path, an empty file will be created there as needed with permission set to 0644, having the same group and ownership with Kubelet. + +--- + + +#### `FILE` + +A file must exist at the given path. + +--- + + +#### `SOCKET` + +A UNIX socket must exist at the given path. + +--- + + +#### `CHAR_DEVICE` + +A character device must exist at the given path. + +--- + + +#### `BLOCK_DEVICE` + +A block device must exist at the given path. + +--- + + +### HttpIngressPathType + +Specify how the path is matched against request paths. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +#### `PREFIX` + +Matches the URL path exactly. + +--- + + +#### `EXACT` + +Matches based on a URL path prefix split by '/'. + +--- + + +#### `IMPLEMENTATION_SPECIFIC` + +Matching is specified by the underlying IngressClass. + +--- + + +### ImagePullPolicy + +#### `ALWAYS` + +Every time the kubelet launches a container, the kubelet queries the container image registry to resolve the name to an image digest. + +If the kubelet has a container image with that exact +digest cached locally, the kubelet uses its cached image; otherwise, the kubelet downloads +(pulls) the image with the resolved digest, and uses that image to launch the container. + +Default is Always if ImagePullPolicy is omitted and either the image tag is :latest or +the image tag is omitted. + +--- + + +#### `IF_NOT_PRESENT` + +The image is pulled only if it is not already present locally. + +Default is IfNotPresent if ImagePullPolicy is omitted and the image tag is present but +not :latest + +--- + + +#### `NEVER` + +The image is assumed to exist locally. + +No attempt is made to pull the image. + +--- + + +### MountPropagation + +#### `NONE` + +This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host. + +In similar +fashion, no mounts created by the Container will be visible on the host. + +This is the default mode. + +This mode is equal to `private` mount propagation as described in the Linux +kernel documentation + +--- + + +#### `HOST_TO_CONTAINER` + +This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories. + +In other words, if the host mounts anything inside the volume mount, the +Container will see it mounted there. + +Similarly, if any Pod with Bidirectional mount propagation to the same +volume mounts anything there, the Container with HostToContainer mount +propagation will see it. + +This mode is equal to `rslave` mount propagation as described in the Linux +kernel documentation + +--- + + +#### `BIDIRECTIONAL` + +This volume mount behaves the same the HostToContainer mount. + +In addition, +all volume mounts created by the Container will be propagated back to the +host and to all Containers of all Pods that use the same volume + +A typical use case for this mode is a Pod with a FlexVolume or CSI driver +or a Pod that needs to mount something on the host using a hostPath volume. + +This mode is equal to `rshared` mount propagation as described in the Linux +kernel documentation + +Caution: Bidirectional mount propagation can be dangerous. It can damage +the host operating system and therefore it is allowed only in privileged +Containers. Familiarity with Linux kernel behavior is strongly recommended. +In addition, any volume mounts created by Containers in Pods must be +destroyed (unmounted) by the Containers on termination. + +--- + + +### NetworkPolicyTrafficDefault + +Default behaviors of network traffic in policies. + +#### `DENY` + +The policy denies all traffic. + +Since rules are additive, additional rules or policies can allow +specific traffic. + +--- + + +#### `ALLOW` + +The policy allows all traffic (either ingress or egress). + +Since rules are additive, no additional rule or policies can +subsequently deny the traffic. + +--- + + +### NetworkProtocol + +Network protocols. + +#### `TCP` + +TCP. + +--- + + +#### `UDP` + +UDP. + +--- + + +#### `SCTP` + +SCTP. + +--- + + +### PersistentVolumeAccessMode + +Access Modes. + +#### `READ_WRITE_ONCE` + +The volume can be mounted as read-write by a single node. + +ReadWriteOnce access mode still can allow multiple pods to access +the volume when the pods are running on the same node. + +--- + + +#### `READ_ONLY_MANY` + +The volume can be mounted as read-only by many nodes. + +--- + + +#### `READ_WRITE_MANY` + +The volume can be mounted as read-write by many nodes. + +--- + + +#### `READ_WRITE_ONCE_POD` + +The volume can be mounted as read-write by a single Pod. + +Use ReadWriteOncePod access mode if you want to ensure that +only one pod across whole cluster can read that PVC or write to it. +This is only supported for CSI volumes and Kubernetes version 1.22+. + +--- + + +### PersistentVolumeMode + +Volume Modes. + +#### `FILE_SYSTEM` + +Volume is ounted into Pods into a directory. + +If the volume is backed by a block device and the device is empty, +Kubernetes creates a filesystem on the device before mounting it +for the first time. + +--- + + +#### `BLOCK` + +Use a volume as a raw block device. + +Such volume is presented into a Pod as a block device, +without any filesystem on it. This mode is useful to provide a Pod the fastest possible way +to access a volume, without any filesystem layer between the Pod +and the volume. On the other hand, the application running in +the Pod must know how to handle a raw block device + +--- + + +### PersistentVolumeReclaimPolicy + +Reclaim Policies. + +#### `RETAIN` + +The Retain reclaim policy allows for manual reclamation of the resource. + +When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the +volume is considered "released". But it is not yet available for another claim +because the previous claimant's data remains on the volume. +An administrator can manually reclaim the volume with the following steps: + +1. Delete the PersistentVolume. The associated storage asset in external + infrastructure (such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume) still exists after the PV is deleted. +2. Manually clean up the data on the associated storage asset accordingly. +3. Manually delete the associated storage asset. + +If you want to reuse the same storage asset, create a new PersistentVolume +with the same storage asset definition. + +--- + + +#### `DELETE` + +For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure, such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume. + +Volumes that were dynamically provisioned inherit the reclaim policy of their StorageClass, which defaults to Delete. +The administrator should configure the StorageClass according to users' expectations; otherwise, +the PV must be edited or patched after it is created + +--- + + +### PodConnectionsIsolation + +Isolation determines which policies are created when allowing connections from a a pod / workload to peers. + +#### `POD` + +Only creates network policies that select the pod. + +--- + + +#### `PEER` + +Only creates network policies that select the peer. + +--- + + +### PodManagementPolicy + +Controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. + +The default policy is `OrderedReady`, where pods are created in increasing order +(pod-0, then pod-1, etc) and the controller will wait until each pod is ready before +continuing. When scaling down, the pods are removed in the opposite order. + +The alternative policy is `Parallel` which will create pods in parallel to match the +desired scale without waiting, and on scale down will delete all pods at once. + +#### `ORDERED_READY` + +--- + + +#### `PARALLEL` + +--- + + +### Protocol + +Network protocols. + +#### `TCP` + +TCP. + +--- + + +#### `UDP` + +UDP. + +--- + + +#### `SCTP` + +SCTP. + +--- + + +### ResourceFieldPaths + +#### `CPU_LIMIT` + +CPU limit of the container. + +--- + + +#### `MEMORY_LIMIT` + +Memory limit of the container. + +--- + + +#### `CPU_REQUEST` + +CPU request of the container. + +--- + + +#### `MEMORY_REQUEST` + +Memory request of the container. + +--- + + +#### `STORAGE_LIMIT` + +Ephemeral storage limit of the container. + +--- + + +#### `STORAGE_REQUEST` + +Ephemeral storage request of the container. + +--- + + +### RestartPolicy + +Restart policy for all containers within the pod. + +#### `ALWAYS` + +Always restart the pod after it exits. + +--- + + +#### `ON_FAILURE` + +Only restart if the pod exits with a non-zero exit code. + +--- + + +#### `NEVER` + +Never restart the pod. + +--- + + +### ScalingStrategy + +#### `MAX_CHANGE` + +Use the policy that provisions the most changes. + +--- + + +#### `MIN_CHANGE` + +Use the policy that provisions the least amount of changes. + +--- + + +#### ~~`DISABLED`~~ + +- *Deprecated:* - Omit the ScalingRule instead + +Disables scaling in this direction. + +--- + + +### ServiceType + +For some parts of your application (for example, frontends) you may want to expose a Service onto an external IP address, that's outside of your cluster. + +Kubernetes ServiceTypes allow you to specify what kind of Service you want. +The default is ClusterIP. + +#### `CLUSTER_IP` + +Exposes the Service on a cluster-internal IP. + +Choosing this value makes the Service only reachable from within the cluster. +This is the default ServiceType + +--- + + +#### `NODE_PORT` + +Exposes the Service on each Node's IP at a static port (the NodePort). + +A ClusterIP Service, to which the NodePort Service routes, is automatically created. +You'll be able to contact the NodePort Service, from outside the cluster, +by requesting :. + +--- + + +#### `LOAD_BALANCER` + +Exposes the Service externally using a cloud provider's load balancer. + +NodePort and ClusterIP Services, to which the external load balancer routes, +are automatically created. + +--- + + +#### `EXTERNAL_NAME` + +Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up. + +> Note: You need either kube-dns version 1.7 or CoreDNS version 0.0.8 or higher to use the ExternalName type. + +--- + + +### TaintEffect + +Taint effects. + +#### `NO_SCHEDULE` + +This means that no pod will be able to schedule onto the node unless it has a matching toleration. + +--- + + +#### `PREFER_NO_SCHEDULE` + +This is a "preference" or "soft" version of `NO_SCHEDULE` -- the system will try to avoid placing a pod that does not tolerate the taint on the node, but it is not required. + +--- + + +#### `NO_EXECUTE` + +This affects pods that are already running on the node as follows:. + +* Pods that do not tolerate the taint are evicted immediately. +* Pods that tolerate the taint without specifying `duration` remain bound forever. +* Pods that tolerate the taint with a specified `duration` remain bound for + the specified amount of time. + +--- + diff --git a/docs/reference/cdk8s-plus-27/python.md b/docs/reference/cdk8s-plus-27/python.md new file mode 100644 index 0000000000..29e9e775a0 --- /dev/null +++ b/docs/reference/cdk8s-plus-27/python.md @@ -0,0 +1,25424 @@ +# cdk8s-plus-27 (Python) + +## Constructs + +### AbstractPod + +- *Implements:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector), [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer), [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AbstractPod( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +#### Methods + +##### `add_container` + +```python +def add_container( + args: typing.List[str] = None, + command: typing.List[str] = None, + env_from: typing.List[EnvFrom] = None, + env_variables: typing.Mapping[EnvValue] = None, + image_pull_policy: ImagePullPolicy = None, + lifecycle: ContainerLifecycle = None, + liveness: Probe = None, + name: str = None, + port: typing.Union[int, float] = None, + port_number: typing.Union[int, float] = None, + ports: typing.List[ContainerPort] = None, + readiness: Probe = None, + resources: ContainerResources = None, + security_context: ContainerSecurityContextProps = None, + startup: Probe = None, + volume_mounts: typing.List[VolumeMount] = None, + working_dir: str = None, + image: str +) +``` + +###### `args`Optional + +- *Type:* typing.List[`str`] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +###### `command`Optional + +- *Type:* typing.List[`str`] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +###### `env_from`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +###### `env_variables`Optional + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +###### `image_pull_policy`Optional + +- *Type:* [`cdk8s_plus_27.ImagePullPolicy`](#cdk8s_plus_27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +###### `lifecycle`Optional + +- *Type:* [`cdk8s_plus_27.ContainerLifecycle`](#cdk8s_plus_27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +###### `liveness`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +###### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +- *Type:* `typing.Union[int, float]` + +--- + +###### `port_number`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerPort`](#cdk8s_plus_27.ContainerPort)] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +###### `readiness`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +###### `resources`Optional + +- *Type:* [`cdk8s_plus_27.ContainerResources`](#cdk8s_plus_27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +###### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.ContainerSecurityContextProps`](#cdk8s_plus_27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +###### `startup`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +###### `volume_mounts`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.VolumeMount`](#cdk8s_plus_27.VolumeMount)] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +###### `working_dir`Optional + +- *Type:* `str` +- *Default:* The container runtime's default. + +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. + +--- + +###### `image`Required + +- *Type:* `str` + +Docker image name. + +--- + +##### `add_host_alias` + +```python +def add_host_alias( + hostnames: typing.List[str], + ip: str +) +``` + +###### `hostnames`Required + +- *Type:* typing.List[`str`] + +Hostnames for the chosen IP address. + +--- + +###### `ip`Required + +- *Type:* `str` + +IP address of the host file entry. + +--- + +##### `add_init_container` + +```python +def add_init_container( + args: typing.List[str] = None, + command: typing.List[str] = None, + env_from: typing.List[EnvFrom] = None, + env_variables: typing.Mapping[EnvValue] = None, + image_pull_policy: ImagePullPolicy = None, + lifecycle: ContainerLifecycle = None, + liveness: Probe = None, + name: str = None, + port: typing.Union[int, float] = None, + port_number: typing.Union[int, float] = None, + ports: typing.List[ContainerPort] = None, + readiness: Probe = None, + resources: ContainerResources = None, + security_context: ContainerSecurityContextProps = None, + startup: Probe = None, + volume_mounts: typing.List[VolumeMount] = None, + working_dir: str = None, + image: str +) +``` + +###### `args`Optional + +- *Type:* typing.List[`str`] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +###### `command`Optional + +- *Type:* typing.List[`str`] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +###### `env_from`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +###### `env_variables`Optional + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +###### `image_pull_policy`Optional + +- *Type:* [`cdk8s_plus_27.ImagePullPolicy`](#cdk8s_plus_27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +###### `lifecycle`Optional + +- *Type:* [`cdk8s_plus_27.ContainerLifecycle`](#cdk8s_plus_27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +###### `liveness`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +###### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +- *Type:* `typing.Union[int, float]` + +--- + +###### `port_number`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerPort`](#cdk8s_plus_27.ContainerPort)] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +###### `readiness`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +###### `resources`Optional + +- *Type:* [`cdk8s_plus_27.ContainerResources`](#cdk8s_plus_27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +###### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.ContainerSecurityContextProps`](#cdk8s_plus_27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +###### `startup`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +###### `volume_mounts`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.VolumeMount`](#cdk8s_plus_27.VolumeMount)] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +###### `working_dir`Optional + +- *Type:* `str` +- *Default:* The container runtime's default. + +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. + +--- + +###### `image`Required + +- *Type:* `str` + +Docker image name. + +--- + +##### `add_volume` + +```python +def add_volume( + vol: Volume +) +``` + +###### `vol`Required + +- *Type:* [`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume) + +--- + +##### `attach_container` + +```python +def attach_container( + cont: Container +) +``` + +###### `cont`Required + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +--- + +##### `to_network_policy_peer_config` + +```python +def to_network_policy_peer_config() +``` + +##### `to_pod_selector` + +```python +def to_pod_selector() +``` + +##### `to_pod_selector_config` + +```python +def to_pod_selector_config() +``` + +##### `to_subject_configuration` + +```python +def to_subject_configuration() +``` + + +#### Properties + +##### `automount_service_account_token`Required + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` + +--- + +##### `containers`Required + +```python +containers: typing.List[Container] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container)] + +--- + +##### `dns`Required + +```python +dns: PodDns +``` + +- *Type:* [`cdk8s_plus_27.PodDns`](#cdk8s_plus_27.PodDns) + +--- + +##### `host_aliases`Required + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +--- + +##### `init_containers`Required + +```python +init_containers: typing.List[Container] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container)] + +--- + +##### `pod_metadata`Required + +```python +pod_metadata: ApiObjectMetadataDefinition +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `security_context`Required + +```python +security_context: PodSecurityContext +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContext`](#cdk8s_plus_27.PodSecurityContext) + +--- + +##### `volumes`Required + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +--- + + +### AwsElasticBlockStorePersistentVolume + +Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AwsElasticBlockStorePersistentVolume( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None, + volume_id: str, + fs_type: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `volume_id`Required + +- *Type:* `str` + +Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + +More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `fs_type`Optional + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + + + +#### Properties + +##### `fs_type`Required + +```python +fs_type: str +``` + +- *Type:* `str` + +File system type of this volume. + +--- + +##### `read_only`Required + +```python +read_only: bool +``` + +- *Type:* `bool` + +Whether or not it is mounted as a read-only volume. + +--- + +##### `volume_id`Required + +```python +volume_id: str +``` + +- *Type:* `str` + +Volume id of this volume. + +--- + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Partition of this volume. + +--- + + +### AzureDiskPersistentVolume + +AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AzureDiskPersistentVolume( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None, + disk_name: str, + disk_uri: str, + caching_mode: AzureDiskPersistentVolumeCachingMode = None, + fs_type: str = None, + kind: AzureDiskPersistentVolumeKind = None, + read_only: bool = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `disk_name`Required + +- *Type:* `str` + +The Name of the data disk in the blob storage. + +--- + +##### `disk_uri`Required + +- *Type:* `str` + +The URI the data disk in the blob storage. + +--- + +##### `caching_mode`Optional + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode`](#cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fs_type`Optional + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeKind`](#cdk8s_plus_27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + + + +#### Properties + +##### `azure_kind`Required + +```python +azure_kind: AzureDiskPersistentVolumeKind +``` + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeKind`](#cdk8s_plus_27.AzureDiskPersistentVolumeKind) + +Azure kind of this volume. + +--- + +##### `caching_mode`Required + +```python +caching_mode: AzureDiskPersistentVolumeCachingMode +``` + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode`](#cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode) + +Caching mode of this volume. + +--- + +##### `disk_name`Required + +```python +disk_name: str +``` + +- *Type:* `str` + +Disk name of this volume. + +--- + +##### `disk_uri`Required + +```python +disk_uri: str +``` + +- *Type:* `str` + +Disk URI of this volume. + +--- + +##### `fs_type`Required + +```python +fs_type: str +``` + +- *Type:* `str` + +File system type of this volume. + +--- + +##### `read_only`Required + +```python +read_only: bool +``` + +- *Type:* `bool` + +Whether or not it is mounted as a read-only volume. + +--- + + +### BasicAuthSecret + +Create a secret for basic authentication. + +> https://kubernetes.io/docs/concepts/configuration/secret/#basic-authentication-secret + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.BasicAuthSecret( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + immutable: bool = None, + password: str, + username: str +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `password`Required + +- *Type:* `str` + +The password or token for authentication. + +--- + +##### `username`Required + +- *Type:* `str` + +The user name for authentication. + +--- + + + + + +### ClusterRole + +- *Implements:* [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole), [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole) + +ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ClusterRole( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + aggregation_labels: typing.Mapping[str] = None, + rules: typing.List[ClusterRolePolicyRule] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `aggregation_labels`Optional + +- *Type:* typing.Mapping[`str`] + +Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules. + +--- + +##### `rules`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ClusterRolePolicyRule`](#cdk8s_plus_27.ClusterRolePolicyRule)] +- *Default:* [] + +A list of rules the role should allow. + +--- + +#### Methods + +##### `aggregate` + +```python +def aggregate( + key: str, + value: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `value`Required + +- *Type:* `str` + +--- + +##### `allow` + +```python +def allow( + verbs: typing.List[str], + endpoints: IApiEndpoint +) +``` + +###### `verbs`Required + +- *Type:* typing.List[`str`] + +--- + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The endpoints(s) to apply to. + +--- + +##### `allow_create` + +```python +def allow_create( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_delete` + +```python +def allow_delete( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_delete_collection` + +```python +def allow_delete_collection( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_get` + +```python +def allow_get( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_list` + +```python +def allow_list( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_patch` + +```python +def allow_patch( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_read` + +```python +def allow_read( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_read_write` + +```python +def allow_read_write( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_update` + +```python +def allow_update( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allow_watch` + +```python +def allow_watch( + endpoints: IApiEndpoint +) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `bind` + +```python +def bind( + subjects: ISubject +) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +a list of subjects to bind to. + +--- + +##### `bind_in_namespace` + +```python +def bind_in_namespace( + namespace: str, + subjects: ISubject +) +``` + +###### `namespace`Required + +- *Type:* `str` + +the namespace to limit permissions to. + +--- + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +a list of subjects to bind to. + +--- + +##### `combine` + +```python +def combine( + rol: ClusterRole +) +``` + +###### `rol`Required + +- *Type:* [`cdk8s_plus_27.ClusterRole`](#cdk8s_plus_27.ClusterRole) + +--- + +#### Static Functions + +##### `from_cluster_role_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ClusterRole.from_cluster_role_name( + scope: Construct, + id: str, + name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `rules`Required + +```python +rules: typing.List[ClusterRolePolicyRule] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ClusterRolePolicyRule`](#cdk8s_plus_27.ClusterRolePolicyRule)] + +Rules associaated with this Role. + +Returns a copy, use `allow` to add rules. + +--- + + +### ClusterRoleBinding + +A ClusterRoleBinding grants permissions cluster-wide to a user or set of users. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ClusterRoleBinding( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + role: IClusterRole +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +- *Type:* [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole) + +The role to bind to. + +--- + +#### Methods + +##### `add_subjects` + +```python +def add_subjects( + subjects: ISubject +) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +The subjects to add. + +--- + + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `role`Required + +```python +role: IClusterRole +``` + +- *Type:* [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole) + +--- + +##### `subjects`Required + +```python +subjects: typing.List[ISubject] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject)] + +--- + + +### ConfigMap + +- *Implements:* [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap) + +ConfigMap holds configuration data for pods to consume. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ConfigMap( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + binary_data: typing.Mapping[str] = None, + data: typing.Mapping[str] = None, + immutable: bool = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `binary_data`Optional + +- *Type:* typing.Mapping[`str`] + +BinaryData contains the binary data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. +BinaryData can contain byte sequences that are not in the UTF-8 range. The +keys stored in BinaryData must not overlap with the ones in the Data field, +this is enforced during validation process. + +You can also add binary data using `configMap.addBinaryData()`. + +--- + +##### `data`Optional + +- *Type:* typing.Mapping[`str`] + +Data contains the configuration data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. Values +with non-UTF-8 byte sequences must use the BinaryData field. The keys +stored in Data must not overlap with the keys in the BinaryData field, this +is enforced during validation process. + +You can also add data using `configMap.addData()`. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +#### Methods + +##### `add_binary_data` + +```python +def add_binary_data( + key: str, + value: str +) +``` + +###### `key`Required + +- *Type:* `str` + +The key. + +--- + +###### `value`Required + +- *Type:* `str` + +The value. + +--- + +##### `add_data` + +```python +def add_data( + key: str, + value: str +) +``` + +###### `key`Required + +- *Type:* `str` + +The key. + +--- + +###### `value`Required + +- *Type:* `str` + +The value. + +--- + +##### `add_directory` + +```python +def add_directory( + local_dir: str, + exclude: typing.List[str] = None, + key_prefix: str = None +) +``` + +###### `local_dir`Required + +- *Type:* `str` + +A path to a local directory. + +--- + +###### `exclude`Optional + +- *Type:* typing.List[`str`] +- *Default:* include all files + +Glob patterns to exclude when adding files. + +--- + +###### `key_prefix`Optional + +- *Type:* `str` +- *Default:* "" + +A prefix to add to all keys in the config map. + +--- + +##### `add_file` + +```python +def add_file( + local_file: str, + key: str = None +) +``` + +###### `local_file`Required + +- *Type:* `str` + +The path to the local file. + +--- + +###### `key`Optional + +- *Type:* `str` + +The ConfigMap key (default to the file name). + +--- + +#### Static Functions + +##### `from_config_map_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ConfigMap.from_config_map_name( + scope: Construct, + id: str, + name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `binary_data`Required + +```python +binary_data: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +The binary data associated with this config map. + +Returns a copy. To add data records, use `addBinaryData()` or `addData()`. + +--- + +##### `data`Required + +```python +data: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +The data associated with this config map. + +Returns an copy. To add data records, use `addData()` or `addBinaryData()`. + +--- + +##### `immutable`Required + +```python +immutable: bool +``` + +- *Type:* `bool` + +Whether or not this config map is immutable. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### CronJob + +A CronJob is responsible for creating a Job and scheduling it based on provided cron schedule. + +This helps running Jobs in a recurring manner. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.CronJob( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + active_deadline: Duration = None, + backoff_limit: typing.Union[int, float] = None, + ttl_after_finished: Duration = None, + schedule: Cron, + concurrency_policy: ConcurrencyPolicy = None, + failed_jobs_retained: typing.Union[int, float] = None, + starting_deadline: Duration = None, + successful_jobs_retained: typing.Union[int, float] = None, + suspend: bool = None, + time_zone: str = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `active_deadline`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoff_limit`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttl_after_finished`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +##### `schedule`Required + +- *Type:* [`cdk8s.Cron`](#cdk8s.Cron) + +Specifies the time in which the job would run again. + +This is defined as a cron expression in the CronJob resource. + +--- + +##### `concurrency_policy`Optional + +- *Type:* [`cdk8s_plus_27.ConcurrencyPolicy`](#cdk8s_plus_27.ConcurrencyPolicy) +- *Default:* ConcurrencyPolicy.Forbid + +Specifies the concurrency policy for the job. + +--- + +##### `failed_jobs_retained`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 + +Specifies the number of failed jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `starting_deadline`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) + +Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. + +This deadline specifies +how much time can pass after a schedule point, for which kubernetes can still start the job. +For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after +the scheduled time. + +Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 +seconds is not allowed, as it may cause your job to never be scheduled. + +In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). +This property also controls what time interval should kubernetes consider when counting for missed schedules. + +For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00, +and its `startingDeadline` field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00, +the job will not start as the number of missed jobs which missed their schedule is greater than 100. +However, if `startingDeadline` is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus +start a new execution at 10:22:00. + +--- + +##### `successful_jobs_retained`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Specifies the number of successful jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `suspend`Optional + +- *Type:* `bool` +- *Default:* false + +Specifies if the cron job should be suspended. + +Only applies to future executions, current ones are remained untouched. + +--- + +##### `time_zone`Optional + +- *Type:* `str` +- *Default:* Timezone of kube-controller-manager process. + +Specifies the timezone for the job. + +This helps aligining the schedule to follow the specified timezone. + +> {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} for list of valid timezone values. + +--- + + + +#### Properties + +##### `concurrency_policy`Required + +```python +concurrency_policy: str +``` + +- *Type:* `str` + +The policy used by this cron job to determine the concurrency mode in which to schedule jobs. + +--- + +##### `failed_jobs_retained`Required + +```python +failed_jobs_retained: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The number of failed jobs retained by this cron job. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +Represents the resource type. + +--- + +##### `schedule`Required + +```python +schedule: Cron +``` + +- *Type:* [`cdk8s.Cron`](#cdk8s.Cron) + +The schedule this cron job is scheduled to run in. + +--- + +##### `starting_deadline`Required + +```python +starting_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +The time by which the running cron job needs to schedule the next job execution. + +The job is considered as failed if it misses this deadline. + +--- + +##### `successful_jobs_retained`Required + +```python +successful_jobs_retained: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The number of successful jobs retained by this cron job. + +--- + +##### `suspend`Required + +```python +suspend: bool +``` + +- *Type:* `bool` + +Whether or not the cron job is currently suspended or not. + +--- + +##### `time_zone`Optional + +```python +time_zone: str +``` + +- *Type:* `str` + +The timezone which this cron job would follow to schedule jobs. + +--- + + +### DaemonSet + +A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. + +As nodes are added to the cluster, Pods are added to them. +As nodes are removed from the cluster, those Pods are garbage collected. +Deleting a DaemonSet will clean up the Pods it created. + +Some typical uses of a DaemonSet are: + +* running a cluster storage daemon on every node +* running a logs collection daemon on every node +* running a node monitoring daemon on every node + +In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon. +A more complex setup might use multiple DaemonSets for a single type of daemon, +but with different flags and/or different memory and cpu requests for different hardware types. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DaemonSet( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + min_ready_seconds: typing.Union[int, float] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `min_ready_seconds`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 0 + +Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + + + +#### Properties + +##### `min_ready_seconds`Required + +```python +min_ready_seconds: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Deployment + +- *Implements:* [`cdk8s_plus_27.IScalable`](#cdk8s_plus_27.IScalable) + +A Deployment provides declarative updates for Pods and ReplicaSets. + +You describe a desired state in a Deployment, and the Deployment Controller changes the actual +state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove +existing Deployments and adopt all their resources with new Deployments. + +> Note: Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below. + +Use Case + +The following are typical use cases for Deployments: + +* Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. + Check the status of the rollout to see if it succeeds or not. +* Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. + A new ReplicaSet is created and the Deployment manages moving the Pods from the old ReplicaSet to the new one at a controlled rate. + Each new ReplicaSet updates the revision of the Deployment. +* Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. + Each rollback updates the revision of the Deployment. +* Scale up the Deployment to facilitate more load. +* Pause the Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout. +* Use the status of the Deployment as an indicator that a rollout has stuck. +* Clean up older ReplicaSets that you don't need anymore. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Deployment( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + min_ready: Duration = None, + progress_deadline: Duration = None, + replicas: typing.Union[int, float] = None, + strategy: DeploymentStrategy = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `min_ready`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `progress_deadline`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(600) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +The deployment controller will continue +to process failed deployments and a condition with a ProgressDeadlineExceeded +reason will be surfaced in the deployment status. + +Note that progress will not be estimated during the time a deployment is paused. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds + +--- + +##### `replicas`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 2 + +Number of desired pods. + +--- + +##### `strategy`Optional + +- *Type:* [`cdk8s_plus_27.DeploymentStrategy`](#cdk8s_plus_27.DeploymentStrategy) +- *Default:* RollingUpdate with maxSurge and maxUnavailable set to 25%. + +Specifies the strategy used to replace old Pods by new ones. + +--- + +#### Methods + +##### `expose_via_ingress` + +```python +def expose_via_ingress( + path: str, + name: str = None, + ports: typing.List[ServicePort] = None, + service_type: ServiceType = None, + ingress: Ingress = None, + path_type: HttpIngressPathType = None +) +``` + +###### `path`Required + +- *Type:* `str` + +The ingress path to register under. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +###### `service_type`Optional + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +###### `ingress`Optional + +- *Type:* [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +###### `path_type`Optional + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +##### `expose_via_service` + +```python +def expose_via_service( + name: str = None, + ports: typing.List[ServicePort] = None, + service_type: ServiceType = None +) +``` + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +###### `service_type`Optional + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +##### `mark_has_autoscaler` + +```python +def mark_has_autoscaler() +``` + +##### `to_scaling_target` + +```python +def to_scaling_target() +``` + + +#### Properties + +##### `min_ready`Required + +```python +min_ready: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +##### `progress_deadline`Required + +```python +progress_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `strategy`Required + +```python +strategy: DeploymentStrategy +``` + +- *Type:* [`cdk8s_plus_27.DeploymentStrategy`](#cdk8s_plus_27.DeploymentStrategy) + +--- + +##### `replicas`Optional + +```python +replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Number of desired pods. + +--- + +##### `has_autoscaler`Required + +```python +has_autoscaler: bool +``` + +- *Type:* `bool` + +If this is a target of an autoscaler. + +--- + + +### DockerConfigSecret + +Create a secret for storing credentials for accessing a container image registry. + +> https://kubernetes.io/docs/concepts/configuration/secret/#docker-config-secrets + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DockerConfigSecret( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + immutable: bool = None, + data: typing.Mapping[typing.Any] +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `data`Required + +- *Type:* typing.Mapping[`typing.Any`] + +JSON content to provide for the `~/.docker/config.json` file. This will be stringified and inserted as stringData. + +> https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file + +--- + + + + + +### GCEPersistentDiskPersistentVolume + +GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + +Provisioned by an admin. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.GCEPersistentDiskPersistentVolume( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None, + pd_name: str, + fs_type: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `pd_name`Required + +- *Type:* `str` + +Unique name of the PD resource in GCE. + +Used to identify the disk in GCE. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +--- + +##### `fs_type`Optional + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + + + +#### Properties + +##### `fs_type`Required + +```python +fs_type: str +``` + +- *Type:* `str` + +File system type of this volume. + +--- + +##### `pd_name`Required + +```python +pd_name: str +``` + +- *Type:* `str` + +PD resource in GCE of this volume. + +--- + +##### `read_only`Required + +```python +read_only: bool +``` + +- *Type:* `bool` + +Whether or not it is mounted as a read-only volume. + +--- + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Partition of this volume. + +--- + + +### Group + +- *Implements:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +Represents a group. + +#### Methods + +##### `to_subject_configuration` + +```python +def to_subject_configuration() +``` + +#### Static Functions + +##### `from_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Group.from_name( + scope: Construct, + id: str, + name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +--- + +##### `api_group`Optional + +```python +api_group: str +``` + +- *Type:* `str` + +--- + + +### HorizontalPodAutoscaler + +A HorizontalPodAutoscaler scales a workload up or down in response to a metric change. + +This allows your services to scale up when demand is high and scale down +when they are no longer needed. + +Typical use cases for HorizontalPodAutoscaler: + +* When Memory usage is above 70%, scale up the number of replicas to meet the demand. +* When CPU usage is below 30%, scale down the number of replicas to save resources. +* When a service is experiencing a spike in traffic, scale up the number of replicas + to meet the demand. Then, when the traffic subsides, scale down the number of + replicas to save resources. + +The autoscaler uses the following algorithm to determine the number of replicas to scale: + +`desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]` + +HorizontalPodAutoscaler's can be used to with any `Scalable` workload: + +* Deployment +* StatefulSet + +**Targets that already have a replica count defined:** + +Remove any replica counts from the target resource before associating with a +HorizontalPodAutoscaler. If this isn't done, then any time a change to that object is applied, +Kubernetes will scale the current number of Pods to the value of the target.replicas key. This +may not be desired and could lead to unexpected behavior. + +> https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#implicit-maintenance-mode-deactivation + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HorizontalPodAutoscaler( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + max_replicas: typing.Union[int, float], + target: IScalable, + metrics: typing.List[Metric] = None, + min_replicas: typing.Union[int, float] = None, + scale_down: ScalingRules = None, + scale_up: ScalingRules = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `max_replicas`Required + +- *Type:* `typing.Union[int, float]` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `target`Required + +- *Type:* [`cdk8s_plus_27.IScalable`](#cdk8s_plus_27.IScalable) + +The workload to scale up or down. + +Scalable workload types: + +* Deployment +* StatefulSet + +--- + +##### `metrics`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Metric`](#cdk8s_plus_27.Metric)] +- *Default:* If metrics are not provided, then the target resource +constraints (e.g. cpu limit) will be used as scaling metrics. + +The metric conditions that trigger a scale up or scale down. + +--- + +##### `min_replicas`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 + +The minimum number of replicas that can be scaled down to. + +Can be set to 0 if the alpha feature gate `HPAScaleToZero` is enabled and +at least one Object or External metric is configured. + +--- + +##### `scale_down`Optional + +- *Type:* [`cdk8s_plus_27.ScalingRules`](#cdk8s_plus_27.ScalingRules) +- *Default:* Scale down to minReplica count with a 5 minute stabilization window. + +The scaling behavior when scaling down. + +--- + +##### `scale_up`Optional + +- *Type:* [`cdk8s_plus_27.ScalingRules`](#cdk8s_plus_27.ScalingRules) +- *Default:* Is the higher of: +* Increase no more than 4 pods per 60 seconds +* Double the number of pods per 60 seconds + +The scaling behavior when scaling up. + +--- + + + +#### Properties + +##### `max_replicas`Required + +```python +max_replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `min_replicas`Required + +```python +min_replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The minimum number of replicas that can be scaled down to. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `scale_down`Required + +```python +scale_down: ScalingRules +``` + +- *Type:* [`cdk8s_plus_27.ScalingRules`](#cdk8s_plus_27.ScalingRules) + +The scaling behavior when scaling down. + +--- + +##### `scale_up`Required + +```python +scale_up: ScalingRules +``` + +- *Type:* [`cdk8s_plus_27.ScalingRules`](#cdk8s_plus_27.ScalingRules) + +The scaling behavior when scaling up. + +--- + +##### `target`Required + +```python +target: IScalable +``` + +- *Type:* [`cdk8s_plus_27.IScalable`](#cdk8s_plus_27.IScalable) + +The workload to scale up or down. + +--- + +##### `metrics`Optional + +```python +metrics: typing.List[Metric] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Metric`](#cdk8s_plus_27.Metric)] + +The metric conditions that trigger a scale up or scale down. + +--- + + +### Ingress + +Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. + +An Ingress can be configured to give services +externally-reachable urls, load balance traffic, terminate SSL, offer name +based virtual hosting etc. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Ingress( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + default_backend: IngressBackend = None, + rules: typing.List[IngressRule] = None, + tls: typing.List[IngressTls] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `default_backend`Optional + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +The default backend services requests that do not match any rule. + +Using this option or the `addDefaultBackend()` method is equivalent to +adding a rule with both `path` and `host` undefined. + +--- + +##### `rules`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.IngressRule`](#cdk8s_plus_27.IngressRule)] + +Routing rules for this ingress. + +Each rule must define an `IngressBackend` that will receive the requests +that match this rule. If both `host` and `path` are not specifiec, this +backend will be used as the default backend of the ingress. + +You can also add rules later using `addRule()`, `addHostRule()`, +`addDefaultBackend()` and `addHostDefaultBackend()`. + +--- + +##### `tls`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.IngressTls`](#cdk8s_plus_27.IngressTls)] + +TLS settings for this ingress. + +Using this option tells the ingress controller to expose a TLS endpoint. +Currently the Ingress only supports a single TLS port, 443. If multiple +members of this list specify different hosts, they will be multiplexed on +the same port according to the hostname specified through the SNI TLS +extension, if the ingress controller fulfilling the ingress supports SNI. + +--- + +#### Methods + +##### `add_default_backend` + +```python +def add_default_backend( + backend: IngressBackend +) +``` + +###### `backend`Required + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +The backend to use for requests that do not match any rule. + +--- + +##### `add_host_default_backend` + +```python +def add_host_default_backend( + host: str, + backend: IngressBackend +) +``` + +###### `host`Required + +- *Type:* `str` + +The host name to match. + +--- + +###### `backend`Required + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +The backend to route to. + +--- + +##### `add_host_rule` + +```python +def add_host_rule( + host: str, + path: str, + backend: IngressBackend, + path_type: HttpIngressPathType = None +) +``` + +###### `host`Required + +- *Type:* `str` + +The host name. + +--- + +###### `path`Required + +- *Type:* `str` + +The HTTP path. + +--- + +###### `backend`Required + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +The backend to route requests to. + +--- + +###### `path_type`Optional + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) + +How the path is matched against request paths. + +--- + +##### `add_rule` + +```python +def add_rule( + path: str, + backend: IngressBackend, + path_type: HttpIngressPathType = None +) +``` + +###### `path`Required + +- *Type:* `str` + +The HTTP path. + +--- + +###### `backend`Required + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +The backend to route requests to. + +--- + +###### `path_type`Optional + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) + +How the path is matched against request paths. + +--- + +##### `add_rules` + +```python +def add_rules( + backend: IngressBackend, + host: str = None, + path: str = None, + path_type: HttpIngressPathType = None +) +``` + +###### `backend`Required + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +Backend defines the referenced service endpoint to which the traffic will be forwarded to. + +--- + +###### `host`Optional + +- *Type:* `str` +- *Default:* If the host is unspecified, the Ingress routes all traffic based +on the specified IngressRuleValue. + +Host is the fully qualified domain name of a network host, as defined by RFC 3986. + +Note the following deviations from the "host" part of the URI as +defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue +can only apply to the IP in the Spec of the parent Ingress. 2. The `:` +delimiter is not respected because ports are not allowed. Currently the +port of an Ingress is implicitly :80 for http and :443 for https. Both +these may change in the future. Incoming requests are matched against the +host before the IngressRuleValue. + +--- + +###### `path`Optional + +- *Type:* `str` +- *Default:* If unspecified, the path defaults to a catch all sending traffic +to the backend. + +Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/'. + +--- + +###### `path_type`Optional + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) + +Specify how the path is matched against request paths. + +By default, path +types will be matched by prefix. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +--- + +##### `add_tls` + +```python +def add_tls( + tls: typing.List[IngressTls] +) +``` + +###### `tls`Required + +- *Type:* typing.List[[`cdk8s_plus_27.IngressTls`](#cdk8s_plus_27.IngressTls)] + +--- + + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Job + +A Job creates one or more Pods and ensures that a specified number of them successfully terminate. + +As pods successfully complete, +the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. +Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. +The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). +You can also use a Job to run multiple Pods in parallel. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Job( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + active_deadline: Duration = None, + backoff_limit: typing.Union[int, float] = None, + ttl_after_finished: Duration = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `active_deadline`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoff_limit`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttl_after_finished`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + + + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `active_deadline`Optional + +```python +active_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +Duration before job is terminated. + +If undefined, there is no deadline. + +--- + +##### `backoff_limit`Optional + +```python +backoff_limit: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Number of retries before marking failed. + +--- + +##### `ttl_after_finished`Optional + +```python +ttl_after_finished: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +TTL before the job is deleted after it is finished. + +--- + + +### Namespace + +- *Implements:* [`cdk8s_plus_27.INamespaceSelector`](#cdk8s_plus_27.INamespaceSelector), [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +In Kubernetes, namespaces provides a mechanism for isolating groups of resources within a single cluster. + +Names of resources need to be unique within a namespace, but not across namespaces. +Namespace-based scoping is applicable only for namespaced objects (e.g. Deployments, Services, etc) and +not for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc). + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Namespace( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +#### Methods + +##### `to_namespace_selector_config` + +```python +def to_namespace_selector_config() +``` + +##### `to_network_policy_peer_config` + +```python +def to_network_policy_peer_config() +``` + +##### `to_pod_selector` + +```python +def to_pod_selector() +``` + + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +#### Constants + +##### `NAME_LABEL` + +- *Type:* `str` + +> https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling + +--- + +### Namespaces + +- *Implements:* [`cdk8s_plus_27.INamespaceSelector`](#cdk8s_plus_27.INamespaceSelector), [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +Represents a group of namespaces. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Namespaces( + scope: Construct, + id: str, + expressions: typing.List[LabelExpression] = None, + names: typing.List[str] = None, + labels: typing.Mapping[str] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `expressions`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] + +--- + +##### `names`Optional + +- *Type:* typing.List[`str`] + +--- + +##### `labels`Optional + +- *Type:* typing.Mapping[`str`] + +--- + +#### Methods + +##### `to_namespace_selector_config` + +```python +def to_namespace_selector_config() +``` + +##### `to_network_policy_peer_config` + +```python +def to_network_policy_peer_config() +``` + +##### `to_pod_selector` + +```python +def to_pod_selector() +``` + +#### Static Functions + +##### `all` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Namespaces.all( + scope: Construct, + id: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +##### `select` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Namespaces.select( + scope: Construct, + id: str, + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None, + names: typing.List[str] = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `expressions`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] +- *Default:* no selector requirements. + +Namespaces must satisfy these selectors. + +The selectors query labels, just like the `labels` property, but they +provide a more advanced matching mechanism. + +--- + +###### `labels`Optional + +- *Type:* typing.Mapping[`str`] +- *Default:* no strict labels requirements. + +Labels the namespaces must have. + +This is equivalent to using an 'Is' selector. + +--- + +###### `names`Optional + +- *Type:* typing.List[`str`] +- *Default:* no name requirements. + +Namespaces names must be one of these. + +--- + + + +### NetworkPolicy + +Control traffic flow at the IP address or port level (OSI layer 3 or 4), network policies are an application-centric construct which allow you to specify how a pod is allowed to communicate with various network peers. + +* Outgoing traffic is allowed if there are no network policies selecting + the pod (and cluster policy otherwise allows the traffic), + OR if the traffic matches at least one egress rule across all of the + network policies that select the pod. +* Incoming traffic is allowed to a pod if there are no network policies + selecting the pod (and cluster policy otherwise allows the traffic), + OR if the traffic source is the pod's local node, + OR if the traffic matches at least one ingress rule across all of + the network policies that select the pod. + +Network policies do not conflict; they are additive. +If any policy or policies apply to a given pod for a given +direction, the connections allowed in that direction from +that pod is the union of what the applicable policies allow. +Thus, order of evaluation does not affect the policy result. + +For a connection from a source pod to a destination pod to be allowed, +both the egress policy on the source pod and the ingress policy on the +destination pod need to allow the connection. +If either side does not allow the connection, it will not happen. + +> https://kubernetes.io/docs/concepts/services-networking/network-policies/#networkpolicy-resource + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicy( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + egress: NetworkPolicyTraffic = None, + ingress: NetworkPolicyTraffic = None, + selector: IPodSelector = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `egress`Optional + +- *Type:* [`cdk8s_plus_27.NetworkPolicyTraffic`](#cdk8s_plus_27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change egress behavior of the pods it selects. + +Egress traffic configuration. + +--- + +##### `ingress`Optional + +- *Type:* [`cdk8s_plus_27.NetworkPolicyTraffic`](#cdk8s_plus_27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change ingress behavior of the pods it selects. + +Ingress traffic configuration. + +--- + +##### `selector`Optional + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) +- *Default:* will select all pods in the namespace of the policy. + +Which pods does this policy object applies to. + +This can either be a single pod / workload, or a grouping of pods selected +via the `Pods.select` function. Rules is applied to any pods selected by this property. +Multiple network policies can select the same set of pods. +In this case, the rules for each are combined additively. + +Note that + +--- + +#### Methods + +##### `add_egress_rule` + +```python +def add_egress_rule( + peer: INetworkPolicyPeer, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +###### `peer`Required + +- *Type:* [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] + +--- + +##### `add_ingress_rule` + +```python +def add_ingress_rule( + peer: INetworkPolicyPeer, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +###### `peer`Required + +- *Type:* [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] + +--- + + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### NetworkPolicyIpBlock + +- *Implements:* [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +Describes a particular CIDR (Ex. + +"192.168.1.1/24","2001:db9::/64") that is +allowed to the pods matched by a network policy selector. +The except entry describes CIDRs that should not be included within this rule. + +#### Methods + +##### `to_network_policy_peer_config` + +```python +def to_network_policy_peer_config() +``` + +##### `to_pod_selector` + +```python +def to_pod_selector() +``` + +#### Static Functions + +##### `any_ipv4` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyIpBlock.any_ipv4( + scope: Construct, + id: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +##### `any_ipv6` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyIpBlock.any_ipv6( + scope: Construct, + id: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +##### `ipv4` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyIpBlock.ipv4( + scope: Construct, + id: str, + cidr_ip: str, + except: typing.List[str] = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `cidr_ip`Required + +- *Type:* `str` + +--- + +###### `except`Optional + +- *Type:* typing.List[`str`] + +--- + +##### `ipv6` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyIpBlock.ipv6( + scope: Construct, + id: str, + cidr_ip: str, + except: typing.List[str] = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `cidr_ip`Required + +- *Type:* `str` + +--- + +###### `except`Optional + +- *Type:* typing.List[`str`] + +--- + +#### Properties + +##### `cidr`Required + +```python +cidr: str +``` + +- *Type:* `str` + +A string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". + +--- + +##### `except`Optional + +```python +except: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +A slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". Except values will be rejected if they are outside the CIDR range. + +--- + + +### PersistentVolume + +- *Implements:* [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume), [`cdk8s_plus_27.IStorage`](#cdk8s_plus_27.IStorage) + +A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. + +It is a resource in the cluster just like a node is a cluster resource. +PVs are volume plugins like Volumes, but have a lifecycle independent of any +individual Pod that uses the PV. This API object captures the details of the +implementation of the storage, be that NFS, iSCSI, or a +cloud-provider-specific storage system. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolume( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +#### Methods + +##### `as_volume` + +```python +def as_volume() +``` + +##### `bind` + +```python +def bind( + claim: IPersistentVolumeClaim +) +``` + +###### `claim`Required + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) + +The PVC to bind to. + +--- + +##### `reserve` + +```python +def reserve() +``` + +#### Static Functions + +##### `from_persistent_volume_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolume.from_persistent_volume_name( + scope: Construct, + id: str, + volume_name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `volume_name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `mode`Required + +```python +mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) + +Volume mode of this volume. + +--- + +##### `reclaim_policy`Required + +```python +reclaim_policy: PersistentVolumeReclaimPolicy +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) + +Reclaim policy of this volume. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] + +Access modes requirement of this claim. + +--- + +##### `claim`Optional + +```python +claim: IPersistentVolumeClaim +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) + +PVC this volume is bound to. + +Undefined means this volume is not yet +claimed by any PVC. + +--- + +##### `mount_options`Optional + +```python +mount_options: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Mount options of this volume. + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +Storage size of this volume. + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` + +Storage class this volume belongs to. + +--- + + +### PersistentVolumeClaim + +- *Implements:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) + +A PersistentVolumeClaim (PVC) is a request for storage by a user. + +It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. +Pods can request specific levels of resources (CPU and Memory). +Claims can request specific size and access modes + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolumeClaim( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + storage: Size = None, + storage_class_name: str = None, + volume: IPersistentVolume = None, + volume_mode: PersistentVolumeMode = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes requirement. + +Contains the access modes the volume should support. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + +--- + +##### `storage`Optional + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No storage requirement. + +Minimum storage size the volume should have. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +- *Type:* `str` +- *Default:* Not set. + +Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. + +* If the admission plugin is turned on, the storage class marked as default will be used. +* If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + +--- + +##### `volume`Optional + +- *Type:* [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume) +- *Default:* No specific volume binding. + +The PersistentVolume backing this claim. + +The control plane still checks that storage class, access modes, +and requested storage size on the volume are valid. + +Note that in order to guarantee a proper binding, the volume should +also define a `claimRef` referring to this claim. Otherwise, the volume may be +claimed be other pvc's before it gets a chance to bind to this one. + +If the volume is managed (i.e not imported), you can use `pv.claim()` to easily +create a bi-directional bounded claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding. + +--- + +##### `volume_mode`Optional + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +#### Methods + +##### `bind` + +```python +def bind( + vol: IPersistentVolume +) +``` + +###### `vol`Required + +- *Type:* [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume) + +The PV to bind to. + +--- + +#### Static Functions + +##### `from_claim_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolumeClaim.from_claim_name( + scope: Construct, + id: str, + claim_name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `claim_name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `volume_mode`Required + +```python +volume_mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) + +Volume mode requirement of this claim. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] + +Access modes requirement of this claim. + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +Storage requirement of this claim. + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` + +Storage class requirment of this claim. + +--- + +##### `volume`Optional + +```python +volume: IPersistentVolume +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume) + +PV this claim is bound to. + +Undefined means the claim is not bound +to any specific volume. + +--- + + +### Pod + +Pod is a collection of containers that can run on a host. + +This resource is +created by clients and scheduled onto hosts. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Pod( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + + + +#### Properties + +##### `connections`Required + +```python +connections: PodConnections +``` + +- *Type:* [`cdk8s_plus_27.PodConnections`](#cdk8s_plus_27.PodConnections) + +--- + +##### `pod_metadata`Required + +```python +pod_metadata: ApiObjectMetadataDefinition +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `scheduling`Required + +```python +scheduling: PodScheduling +``` + +- *Type:* [`cdk8s_plus_27.PodScheduling`](#cdk8s_plus_27.PodScheduling) + +--- + +#### Constants + +##### `ADDRESS_LABEL` + +- *Type:* `str` + +This label is autoamtically added by cdk8s to any pod. + +It provides +a unique and stable identifier for the pod. + +--- + +### Pods + +- *Implements:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) + +Represents a group of pods. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Pods( + scope: Construct, + id: str, + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None, + namespaces: INamespaceSelector = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `expressions`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] + +--- + +##### `labels`Optional + +- *Type:* typing.Mapping[`str`] + +--- + +##### `namespaces`Optional + +- *Type:* [`cdk8s_plus_27.INamespaceSelector`](#cdk8s_plus_27.INamespaceSelector) + +--- + +#### Methods + +##### `to_network_policy_peer_config` + +```python +def to_network_policy_peer_config() +``` + +##### `to_pod_selector` + +```python +def to_pod_selector() +``` + +##### `to_pod_selector_config` + +```python +def to_pod_selector_config() +``` + +#### Static Functions + +##### `all` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Pods.all( + scope: Construct, + id: str, + namespaces: Namespaces = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `namespaces`Optional + +- *Type:* [`cdk8s_plus_27.Namespaces`](#cdk8s_plus_27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +##### `select` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Pods.select( + scope: Construct, + id: str, + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None, + namespaces: Namespaces = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `expressions`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] +- *Default:* no expressions requirements. + +Expressions the pods must satisify. + +--- + +###### `labels`Optional + +- *Type:* typing.Mapping[`str`] +- *Default:* no strict labels requirements. + +Labels the pods must have. + +--- + +###### `namespaces`Optional + +- *Type:* [`cdk8s_plus_27.Namespaces`](#cdk8s_plus_27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + + + +### Resource + +- *Implements:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource), [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource), [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +Base class for all Kubernetes objects in stdk8s. + +Represents a single +resource. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Resource( + scope: Construct, + id: str +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +#### Methods + +##### `as_api_resource` + +```python +def as_api_resource() +``` + +##### `as_non_api_resource` + +```python +def as_non_api_resource() +``` + + +#### Properties + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. "authorization.k8s.io"). + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `metadata`Required + +```python +metadata: ApiObjectMetadataDefinition +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The name of this API object. + +--- + +##### `permissions`Required + +```python +permissions: ResourcePermissions +``` + +- *Type:* [`cdk8s_plus_27.ResourcePermissions`](#cdk8s_plus_27.ResourcePermissions) + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + + +### Role + +- *Implements:* [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole) + +Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Role( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + rules: typing.List[RolePolicyRule] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `rules`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.RolePolicyRule`](#cdk8s_plus_27.RolePolicyRule)] +- *Default:* [] + +A list of rules the role should allow. + +--- + +#### Methods + +##### `allow` + +```python +def allow( + verbs: typing.List[str], + resources: IApiResource +) +``` + +###### `verbs`Required + +- *Type:* typing.List[`str`] + +--- + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_create` + +```python +def allow_create( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_delete` + +```python +def allow_delete( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_delete_collection` + +```python +def allow_delete_collection( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_get` + +```python +def allow_get( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_list` + +```python +def allow_list( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_patch` + +```python +def allow_patch( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_read` + +```python +def allow_read( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_read_write` + +```python +def allow_read_write( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_update` + +```python +def allow_update( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allow_watch` + +```python +def allow_watch( + resources: IApiResource +) +``` + +###### `resources`Required + +- *Type:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `bind` + +```python +def bind( + subjects: ISubject +) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +a list of subjects to bind to. + +--- + +#### Static Functions + +##### `from_role_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Role.from_role_name( + scope: Construct, + id: str, + name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `rules`Required + +```python +rules: typing.List[RolePolicyRule] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.RolePolicyRule`](#cdk8s_plus_27.RolePolicyRule)] + +Rules associaated with this Role. + +Returns a copy, use `allow` to add rules. + +--- + + +### RoleBinding + +A RoleBinding grants permissions within a specific namespace to a user or set of users. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.RoleBinding( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + role: IRole +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +- *Type:* [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole) + +The role to bind to. + +A RoleBinding can reference a Role or a ClusterRole. + +--- + +#### Methods + +##### `add_subjects` + +```python +def add_subjects( + subjects: ISubject +) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +The subjects to add. + +--- + + +#### Properties + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `role`Required + +```python +role: IRole +``` + +- *Type:* [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole) + +--- + +##### `subjects`Required + +```python +subjects: typing.List[ISubject] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject)] + +--- + + +### Secret + +- *Implements:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys. + +Storing confidential information in a +Secret is safer and more flexible than putting it verbatim in a Pod +definition or in a container image. + +> https://kubernetes.io/docs/concepts/configuration/secret + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Secret( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + immutable: bool = None, + string_data: typing.Mapping[str] = None, + type: str = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `string_data`Optional + +- *Type:* typing.Mapping[`str`] + +stringData allows specifying non-binary secret data in string form. + +It is +provided as a write-only convenience method. All keys and values are merged +into the data field on write, overwriting any existing values. It is never +output when reading from the API. + +--- + +##### `type`Optional + +- *Type:* `str` +- *Default:* undefined - Don't set a type. + +Optional type associated with the secret. + +Used to facilitate programmatic +handling of secret data by various controllers. + +--- + +#### Methods + +##### `add_string_data` + +```python +def add_string_data( + key: str, + value: str +) +``` + +###### `key`Required + +- *Type:* `str` + +Key. + +--- + +###### `value`Required + +- *Type:* `str` + +Value. + +--- + +##### `env_value` + +```python +def env_value( + key: str, + optional: bool = None +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `optional`Optional + +- *Type:* `bool` +- *Default:* false + +Specify whether the Secret or its key must be defined. + +--- + +##### `get_string_data` + +```python +def get_string_data( + key: str +) +``` + +###### `key`Required + +- *Type:* `str` + +Key. + +--- + +#### Static Functions + +##### `from_secret_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Secret.from_secret_name( + scope: Construct, + id: str, + name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `immutable`Required + +```python +immutable: bool +``` + +- *Type:* `bool` + +Whether or not the secret is immutable. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Service + +An abstract way to expose an application running on a set of Pods as a network service. + +With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. +Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them. + +For example, consider a stateless image-processing backend which is running with 3 replicas. Those replicas are fungible—frontends do not care which backend they use. +While the actual Pods that compose the backend set may change, the frontend clients should not need to be aware of that, +nor should they need to keep track of the set of backends themselves. +The Service abstraction enables this decoupling. + +If you're able to use Kubernetes APIs for service discovery in your application, you can query the API server for Endpoints, +that get updated whenever the set of Pods in a Service changes. For non-native applications, Kubernetes offers ways to place a network port +or load balancer in between your application and the backend Pods. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Service( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + cluster_i_p: str = None, + external_i_ps: typing.List[str] = None, + external_name: str = None, + load_balancer_source_ranges: typing.List[str] = None, + ports: typing.List[ServicePort] = None, + selector: IPodSelector = None, + type: ServiceType = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `cluster_i_p`Optional + +- *Type:* `str` +- *Default:* Automatically assigned. + +The IP address of the service and is usually assigned randomly by the master. + +If an address is specified manually and is not in use by others, it +will be allocated to the service; otherwise, creation of the service will +fail. This field can not be changed through updates. Valid values are +"None", empty string (""), or a valid IP address. "None" can be specified +for headless services when proxying is not required. Only applies to types +ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. + +> https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + +--- + +##### `external_i_ps`Optional + +- *Type:* typing.List[`str`] +- *Default:* No external IPs. + +A list of IP addresses for which nodes in the cluster will also accept traffic for this service. + +These IPs are not managed by Kubernetes. The user +is responsible for ensuring that traffic arrives at a node with this IP. A +common example is external load-balancers that are not part of the +Kubernetes system. + +--- + +##### `external_name`Optional + +- *Type:* `str` +- *Default:* No external name. + +The externalName to be used when ServiceType.EXTERNAL_NAME is set. + +--- + +##### `load_balancer_source_ranges`Optional + +- *Type:* typing.List[`str`] + +A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + +--- + +##### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] +- *Default:* either the selector ports, or none. + +The ports this service binds to. + +If the selector of the service is a managed pod / workload, +its ports will are automatically extracted and used as the default value. +Otherwise, no ports are bound. + +--- + +##### `selector`Optional + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) +- *Default:* unset, the service is assumed to have an external process managing +its endpoints, which Kubernetes will not modify. + +Which pods should the service select and route to. + +You can pass one of the following: + +* An instance of `Pod` or any workload resource (e.g `Deployment`, `StatefulSet`, ...) +* Pods selected by the `Pods.select` function. Note that in this case only labels can be specified. + +--- + +##### `type`Optional + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) +- *Default:* ServiceType.ClusterIP + +Determines how the Service is exposed. + +More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + +--- + +#### Methods + +##### `bind` + +```python +def bind( + port: typing.Union[int, float], + name: str = None, + node_port: typing.Union[int, float] = None, + protocol: Protocol = None, + target_port: typing.Union[int, float] = None +) +``` + +###### `port`Required + +- *Type:* `typing.Union[int, float]` + +The port definition. + +--- + +###### `name`Optional + +- *Type:* `str` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +###### `node_port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +###### `protocol`Optional + +- *Type:* [`cdk8s_plus_27.Protocol`](#cdk8s_plus_27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +###### `target_port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `expose_via_ingress` + +```python +def expose_via_ingress( + path: str, + ingress: Ingress = None, + path_type: HttpIngressPathType = None +) +``` + +###### `path`Required + +- *Type:* `str` + +The path to expose the service under. + +--- + +###### `ingress`Optional + +- *Type:* [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +###### `path_type`Optional + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +##### `select` + +```python +def select( + selector: IPodSelector +) +``` + +###### `selector`Required + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) + +--- + +##### `select_label` + +```python +def select_label( + key: str, + value: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `value`Required + +- *Type:* `str` + +--- + + +#### Properties + +##### `port`Required + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Return the first port of the service. + +--- + +##### `ports`Required + +```python +ports: typing.List[ServicePort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] + +Ports for this service. + +Use `bind()` to bind additional service ports. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `type`Required + +```python +type: ServiceType +``` + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) + +Determines how the Service is exposed. + +--- + +##### `cluster_i_p`Optional + +```python +cluster_i_p: str +``` + +- *Type:* `str` + +The IP address of the service and is usually assigned randomly by the master. + +--- + +##### `external_name`Optional + +```python +external_name: str +``` + +- *Type:* `str` + +The externalName to be used for EXTERNAL_NAME types. + +--- + + +### ServiceAccount + +- *Implements:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount), [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceAccount( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_token: bool = None, + secrets: typing.List[ISecret] = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether pods running as this service account should have an API token automatically mounted. + +Can be overridden at the pod level. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `secrets`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret)] + +List of secrets allowed to be used by pods running using this ServiceAccount. + +> https://kubernetes.io/docs/concepts/configuration/secret + +--- + +#### Methods + +##### `add_secret` + +```python +def add_secret( + secr: ISecret +) +``` + +###### `secr`Required + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +The secret. + +--- + +##### `to_subject_configuration` + +```python +def to_subject_configuration() +``` + +#### Static Functions + +##### `from_service_account_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceAccount.from_service_account_name( + scope: Construct, + id: str, + name: str, + namespace_name: str = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +The name of the service account resource. + +--- + +###### `namespace_name`Optional + +- *Type:* `str` +- *Default:* "default" + +The name of the namespace the service account belongs to. + +--- + +#### Properties + +##### `automount_token`Required + +```python +automount_token: bool +``` + +- *Type:* `bool` + +Whether or not a token is automatically mounted for this service account. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `secrets`Required + +```python +secrets: typing.List[ISecret] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret)] + +List of secrets allowed to be used by pods running using this service account. + +Returns a copy. To add a secret, use `addSecret()`. + +--- + + +### ServiceAccountTokenSecret + +Create a secret for a service account token. + +> https://kubernetes.io/docs/concepts/configuration/secret/#service-account-token-secrets + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceAccountTokenSecret( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + immutable: bool = None, + service_account: IServiceAccount +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `service_account`Required + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) + +The service account to store a secret for. + +--- + + + + + +### SshAuthSecret + +Create a secret for ssh authentication. + +> https://kubernetes.io/docs/concepts/configuration/secret/#ssh-authentication-secrets + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.SshAuthSecret( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + immutable: bool = None, + ssh_private_key: str +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `ssh_private_key`Required + +- *Type:* `str` + +The SSH private key to use. + +--- + + + + + +### StatefulSet + +- *Implements:* [`cdk8s_plus_27.IScalable`](#cdk8s_plus_27.IScalable) + +StatefulSet is the workload API object used to manage stateful applications. + +Manages the deployment and scaling of a set of Pods, and provides guarantees +about the ordering and uniqueness of these Pods. + +Like a Deployment, a StatefulSet manages Pods that are based on an identical +container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity +for each of their Pods. These pods are created from the same spec, but are not +interchangeable: each has a persistent identifier that it maintains across any +rescheduling. + +If you want to use storage volumes to provide persistence for your workload, you +can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet +are susceptible to failure, the persistent Pod identifiers make it easier to match existing +volumes to the new Pods that replace any that have failed. + +## Using StatefulSets + +StatefulSets are valuable for applications that require one or more of the following. + +* Stable, unique network identifiers. +* Stable, persistent storage. +* Ordered, graceful deployment and scaling. +* Ordered, automated rolling updates. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.StatefulSet( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + min_ready: Duration = None, + pod_management_policy: PodManagementPolicy = None, + replicas: typing.Union[int, float] = None, + service: Service = None, + strategy: StatefulSetUpdateStrategy = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `min_ready`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `pod_management_policy`Optional + +- *Type:* [`cdk8s_plus_27.PodManagementPolicy`](#cdk8s_plus_27.PodManagementPolicy) +- *Default:* PodManagementPolicy.ORDERED_READY + +Pod management policy to use for this statefulset. + +--- + +##### `replicas`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 + +Number of desired pods. + +--- + +##### `service`Optional + +- *Type:* [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service) +- *Default:* A new headless service will be created. + +Service to associate with the statefulset. + +--- + +##### `strategy`Optional + +- *Type:* [`cdk8s_plus_27.StatefulSetUpdateStrategy`](#cdk8s_plus_27.StatefulSetUpdateStrategy) +- *Default:* RollingUpdate with partition set to 0 + +Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. + +--- + +#### Methods + +##### `mark_has_autoscaler` + +```python +def mark_has_autoscaler() +``` + +##### `to_scaling_target` + +```python +def to_scaling_target() +``` + + +#### Properties + +##### `min_ready`Required + +```python +min_ready: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +##### `pod_management_policy`Required + +```python +pod_management_policy: PodManagementPolicy +``` + +- *Type:* [`cdk8s_plus_27.PodManagementPolicy`](#cdk8s_plus_27.PodManagementPolicy) + +Management policy to use for the set. + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `service`Required + +```python +service: Service +``` + +- *Type:* [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service) + +--- + +##### `strategy`Required + +```python +strategy: StatefulSetUpdateStrategy +``` + +- *Type:* [`cdk8s_plus_27.StatefulSetUpdateStrategy`](#cdk8s_plus_27.StatefulSetUpdateStrategy) + +The update startegy of this stateful set. + +--- + +##### `replicas`Optional + +```python +replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Number of desired pods. + +--- + +##### `has_autoscaler`Required + +```python +has_autoscaler: bool +``` + +- *Type:* `bool` + +If this is a target of an autoscaler. + +--- + + +### TlsSecret + +Create a secret for storing a TLS certificate and its associated key. + +> https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.TlsSecret( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + immutable: bool = None, + tls_cert: str, + tls_key: str +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `tls_cert`Required + +- *Type:* `str` + +The TLS cert. + +--- + +##### `tls_key`Required + +- *Type:* `str` + +The TLS key. + +--- + + + + + +### User + +- *Implements:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +Represents a user. + +#### Methods + +##### `to_subject_configuration` + +```python +def to_subject_configuration() +``` + +#### Static Functions + +##### `from_name` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.User.from_name( + scope: Construct, + id: str, + name: str +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +--- + +##### `api_group`Optional + +```python +api_group: str +``` + +- *Type:* `str` + +--- + + +### Volume + +- *Implements:* [`cdk8s_plus_27.IStorage`](#cdk8s_plus_27.IStorage) + +Volume represents a named volume in a pod that may be accessed by any container in the pod. + +Docker also has a concept of volumes, though it is somewhat looser and less +managed. In Docker, a volume is simply a directory on disk or in another +Container. Lifetimes are not managed and until very recently there were only +local-disk-backed volumes. Docker now provides volume drivers, but the +functionality is very limited for now (e.g. as of Docker 1.7 only one volume +driver is allowed per Container and there is no way to pass parameters to +volumes). + +A Kubernetes volume, on the other hand, has an explicit lifetime - the same +as the Pod that encloses it. Consequently, a volume outlives any Containers +that run within the Pod, and data is preserved across Container restarts. Of +course, when a Pod ceases to exist, the volume will cease to exist, too. +Perhaps more importantly than this, Kubernetes supports many types of +volumes, and a Pod can use any number of them simultaneously. + +At its core, a volume is just a directory, possibly with some data in it, +which is accessible to the Containers in a Pod. How that directory comes to +be, the medium that backs it, and the contents of it are determined by the +particular volume type used. + +To use a volume, a Pod specifies what volumes to provide for the Pod (the +.spec.volumes field) and where to mount those into Containers (the +.spec.containers[*].volumeMounts field). + +A process in a container sees a filesystem view composed from their Docker +image and volumes. The Docker image is at the root of the filesystem +hierarchy, and any volumes are mounted at the specified paths within the +image. Volumes can not mount onto other volumes + +#### Methods + +##### `as_volume` + +```python +def as_volume() +``` + +#### Static Functions + +##### `from_aws_elastic_block_store` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_aws_elastic_block_store( + scope: Construct, + id: str, + volume_id: str, + fs_type: str = None, + name: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `volume_id`Required + +- *Type:* `str` + +--- + +###### `fs_type`Optional + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +###### `partition`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `from_azure_disk` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_azure_disk( + scope: Construct, + id: str, + disk_name: str, + disk_uri: str, + caching_mode: AzureDiskPersistentVolumeCachingMode = None, + fs_type: str = None, + kind: AzureDiskPersistentVolumeKind = None, + name: str = None, + read_only: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `disk_name`Required + +- *Type:* `str` + +--- + +###### `disk_uri`Required + +- *Type:* `str` + +--- + +###### `caching_mode`Optional + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode`](#cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +###### `fs_type`Optional + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +###### `kind`Optional + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeKind`](#cdk8s_plus_27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +##### `from_config_map` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_config_map( + scope: Construct, + id: str, + config_map: IConfigMap, + default_mode: typing.Union[int, float] = None, + items: typing.Mapping[PathMapping] = None, + name: str = None, + optional: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `config_map`Required + +- *Type:* [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap) + +The config map to use to populate the volume. + +--- + +###### `default_mode`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 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. + +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. + +--- + +###### `items`Optional + +- *Type:* typing.Mapping[[`cdk8s_plus_27.PathMapping`](#cdk8s_plus_27.PathMapping)] +- *Default:* no mapping + +If unspecified, each key-value pair in the Data field of the referenced ConfigMap 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 ConfigMap, the volume setup will +error unless it is marked optional. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +###### `optional`Optional + +- *Type:* `bool` +- *Default:* undocumented + +Specify whether the ConfigMap or its keys must be defined. + +--- + +##### `from_csi` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_csi( + scope: Construct, + id: str, + driver: str, + attributes: typing.Mapping[str] = None, + fs_type: str = None, + name: str = None, + read_only: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `driver`Required + +- *Type:* `str` + +The name of the CSI driver to use to populate the volume. + +--- + +###### `attributes`Optional + +- *Type:* typing.Mapping[`str`] +- *Default:* undefined + +Any driver-specific attributes to pass to the CSI volume builder. + +--- + +###### `fs_type`Optional + +- *Type:* `str` +- *Default:* driver-dependent + +The filesystem type to mount. + +Ex. "ext4", "xfs", "ntfs". If not provided, +the empty value is passed to the associated CSI driver, which will +determine the default filesystem to apply. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Whether the mounted volume should be read-only or not. + +--- + +##### `from_empty_dir` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_empty_dir( + scope: Construct, + id: str, + name: str, + medium: EmptyDirMedium = None, + size_limit: Size = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +###### `medium`Optional + +- *Type:* [`cdk8s_plus_27.EmptyDirMedium`](#cdk8s_plus_27.EmptyDirMedium) +- *Default:* EmptyDirMedium.DEFAULT + +By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. + +However, you can set the emptyDir.medium field to +`EmptyDirMedium.MEMORY` to tell Kubernetes to mount a tmpfs (RAM-backed +filesystem) for you instead. While tmpfs is very fast, be aware that unlike +disks, tmpfs is cleared on node reboot and any files you write will count +against your Container's memory limit. + +--- + +###### `size_limit`Optional + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* limit is undefined + +Total amount of local storage required for this EmptyDir volume. + +The size +limit is also applicable for memory medium. The maximum usage on memory +medium EmptyDir would be the minimum value between the SizeLimit specified +here and the sum of memory limits of all containers in a pod. + +--- + +##### `from_gce_persistent_disk` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_gce_persistent_disk( + scope: Construct, + id: str, + pd_name: str, + fs_type: str = None, + name: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `pd_name`Required + +- *Type:* `str` + +--- + +###### `fs_type`Optional + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +###### `partition`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `from_host_path` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_host_path( + scope: Construct, + id: str, + name: str, + path: str, + type: HostPathVolumeType = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +###### `path`Required + +- *Type:* `str` + +The path of the directory on the host. + +--- + +###### `type`Optional + +- *Type:* [`cdk8s_plus_27.HostPathVolumeType`](#cdk8s_plus_27.HostPathVolumeType) +- *Default:* HostPathVolumeType.DEFAULT + +The expected type of the path found on the host. + +--- + +##### `from_nfs` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_nfs( + scope: Construct, + id: str, + name: str, + path: str, + server: str, + read_only: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `name`Required + +- *Type:* `str` + +--- + +###### `path`Required + +- *Type:* `str` + +Path that is exported by the NFS server. + +--- + +###### `server`Required + +- *Type:* `str` + +Server is the hostname or IP address of the NFS server. + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +If set to true, will force the NFS export to be mounted with read-only permissions. + +--- + +##### `from_persistent_volume_claim` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_persistent_volume_claim( + scope: Construct, + id: str, + claim: IPersistentVolumeClaim, + name: str = None, + read_only: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `claim`Required + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* Derived from the PVC name. + +The volume name. + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Will force the ReadOnly setting in VolumeMounts. + +--- + +##### `from_secret` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Volume.from_secret( + scope: Construct, + id: str, + secr: ISecret, + default_mode: typing.Union[int, float] = None, + items: typing.Mapping[PathMapping] = None, + name: str = None, + optional: bool = None +) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `str` + +--- + +###### `secr`Required + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +The secret to use to populate the volume. + +--- + +###### `default_mode`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 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. + +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. + +--- + +###### `items`Optional + +- *Type:* typing.Mapping[[`cdk8s_plus_27.PathMapping`](#cdk8s_plus_27.PathMapping)] +- *Default:* no mapping + +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. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +###### `optional`Optional + +- *Type:* `bool` +- *Default:* undocumented + +Specify whether the secret or its keys must be defined. + +--- + +#### Properties + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +--- + + +### Workload + +A workload is an application running on Kubernetes. + +Whether your workload is a single +component or several that work together, on Kubernetes you run it inside a set of pods. +In Kubernetes, a Pod represents a set of running containers on your cluster. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Workload( + scope: Construct, + id: str, + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None +) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `str` + +--- + +##### `metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +#### Methods + +##### `select` + +```python +def select( + selectors: LabelSelector +) +``` + +###### `selectors`Required + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) + +--- + + +#### Properties + +##### `connections`Required + +```python +connections: PodConnections +``` + +- *Type:* [`cdk8s_plus_27.PodConnections`](#cdk8s_plus_27.PodConnections) + +--- + +##### `match_expressions`Required + +```python +match_expressions: typing.List[LabelSelectorRequirement] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.LabelSelectorRequirement`](#cdk8s_plus_27.LabelSelectorRequirement)] + +The expression matchers this workload will use in order to select pods. + +Returns a a copy. Use `select()` to add expression matchers. + +--- + +##### `match_labels`Required + +```python +match_labels: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +The label matchers this workload will use in order to select pods. + +Returns a a copy. Use `select()` to add label matchers. + +--- + +##### `pod_metadata`Required + +```python +pod_metadata: ApiObjectMetadataDefinition +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +The metadata of pods in this workload. + +--- + +##### `scheduling`Required + +```python +scheduling: WorkloadScheduling +``` + +- *Type:* [`cdk8s_plus_27.WorkloadScheduling`](#cdk8s_plus_27.WorkloadScheduling) + +--- + + +## Structs + +### AbstractPodProps + +Properties for `AbstractPod`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AbstractPodProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +### AddDeploymentOptions + +Options to add a deployment to a service. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AddDeploymentOptions( + name: str = None, + node_port: typing.Union[int, float] = None, + protocol: Protocol = None, + target_port: typing.Union[int, float] = None, + port: typing.Union[int, float] = None +) +``` + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `node_port`Optional + +```python +node_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```python +protocol: Protocol +``` + +- *Type:* [`cdk8s_plus_27.Protocol`](#cdk8s_plus_27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `target_port`Optional + +```python +target_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* Copied from the first container of the deployment. + +The port number the service will bind to. + +--- + +### AddDirectoryOptions + +Options for `configmap.addDirectory()`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AddDirectoryOptions( + exclude: typing.List[str] = None, + key_prefix: str = None +) +``` + +##### `exclude`Optional + +```python +exclude: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* include all files + +Glob patterns to exclude when adding files. + +--- + +##### `key_prefix`Optional + +```python +key_prefix: str +``` + +- *Type:* `str` +- *Default:* "" + +A prefix to add to all keys in the config map. + +--- + +### ApiResourceOptions + +Options for `ApiResource`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ApiResourceOptions( + api_group: str, + resource_type: str +) +``` + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +### AwsElasticBlockStorePersistentVolumeProps + +Properties for `AwsElasticBlockStorePersistentVolume`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AwsElasticBlockStorePersistentVolumeProps( + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None, + volume_id: str, + fs_type: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```python +claim: IPersistentVolumeClaim +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +```python +mount_options: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +```python +reclaim_policy: PersistentVolumeReclaimPolicy +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +```python +volume_mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `volume_id`Required + +```python +volume_id: str +``` + +- *Type:* `str` + +Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + +More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### AwsElasticBlockStoreVolumeOptions + +Options of `Volume.fromAwsElasticBlockStore`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AwsElasticBlockStoreVolumeOptions( + fs_type: str = None, + name: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### AzureDiskPersistentVolumeProps + +Properties for `AzureDiskPersistentVolume`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AzureDiskPersistentVolumeProps( + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None, + disk_name: str, + disk_uri: str, + caching_mode: AzureDiskPersistentVolumeCachingMode = None, + fs_type: str = None, + kind: AzureDiskPersistentVolumeKind = None, + read_only: bool = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```python +claim: IPersistentVolumeClaim +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +```python +mount_options: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +```python +reclaim_policy: PersistentVolumeReclaimPolicy +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +```python +volume_mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `disk_name`Required + +```python +disk_name: str +``` + +- *Type:* `str` + +The Name of the data disk in the blob storage. + +--- + +##### `disk_uri`Required + +```python +disk_uri: str +``` + +- *Type:* `str` + +The URI the data disk in the blob storage. + +--- + +##### `caching_mode`Optional + +```python +caching_mode: AzureDiskPersistentVolumeCachingMode +``` + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode`](#cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +```python +kind: AzureDiskPersistentVolumeKind +``` + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeKind`](#cdk8s_plus_27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +### AzureDiskVolumeOptions + +Options of `Volume.fromAzureDisk`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.AzureDiskVolumeOptions( + caching_mode: AzureDiskPersistentVolumeCachingMode = None, + fs_type: str = None, + kind: AzureDiskPersistentVolumeKind = None, + name: str = None, + read_only: bool = None +) +``` + +##### `caching_mode`Optional + +```python +caching_mode: AzureDiskPersistentVolumeCachingMode +``` + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode`](#cdk8s_plus_27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +```python +kind: AzureDiskPersistentVolumeKind +``` + +- *Type:* [`cdk8s_plus_27.AzureDiskPersistentVolumeKind`](#cdk8s_plus_27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +### BasicAuthSecretProps + +Options for `BasicAuthSecret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.BasicAuthSecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None, + password: str, + username: str +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `password`Required + +```python +password: str +``` + +- *Type:* `str` + +The password or token for authentication. + +--- + +##### `username`Required + +```python +username: str +``` + +- *Type:* `str` + +The user name for authentication. + +--- + +### ClusterRoleBindingProps + +Properties for `ClusterRoleBinding`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ClusterRoleBindingProps( + metadata: ApiObjectMetadata = None, + role: IClusterRole +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +```python +role: IClusterRole +``` + +- *Type:* [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole) + +The role to bind to. + +--- + +### ClusterRolePolicyRule + +Policy rule of a `ClusterRole. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ClusterRolePolicyRule( + endpoints: typing.List[IApiEndpoint], + verbs: typing.List[str] +) +``` + +##### `endpoints`Required + +```python +endpoints: typing.List[IApiEndpoint] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint)] + +Endpoints this rule applies to. + +Can be either api resources +or non api resources. + +--- + +##### `verbs`Required + +```python +verbs: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Verbs to allow. + +(e.g ['get', 'watch']) + +--- + +### ClusterRoleProps + +Properties for `ClusterRole`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ClusterRoleProps( + metadata: ApiObjectMetadata = None, + aggregation_labels: typing.Mapping[str] = None, + rules: typing.List[ClusterRolePolicyRule] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `aggregation_labels`Optional + +```python +aggregation_labels: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules. + +--- + +##### `rules`Optional + +```python +rules: typing.List[ClusterRolePolicyRule] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ClusterRolePolicyRule`](#cdk8s_plus_27.ClusterRolePolicyRule)] +- *Default:* [] + +A list of rules the role should allow. + +--- + +### CommandProbeOptions + +Options for `Probe.fromCommand()`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.CommandProbeOptions( + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None +) +``` + +##### `failure_threshold`Optional + +```python +failure_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initial_delay_seconds`Optional + +```python +initial_delay_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `period_seconds`Optional + +```python +period_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `success_threshold`Optional + +```python +success_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeout_seconds`Optional + +```python +timeout_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +### CommonSecretProps + +Common properties for `Secret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.CommonSecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +### ConfigMapProps + +Properties for initialization of `ConfigMap`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ConfigMapProps( + metadata: ApiObjectMetadata = None, + binary_data: typing.Mapping[str] = None, + data: typing.Mapping[str] = None, + immutable: bool = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `binary_data`Optional + +```python +binary_data: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +BinaryData contains the binary data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. +BinaryData can contain byte sequences that are not in the UTF-8 range. The +keys stored in BinaryData must not overlap with the ones in the Data field, +this is enforced during validation process. + +You can also add binary data using `configMap.addBinaryData()`. + +--- + +##### `data`Optional + +```python +data: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +Data contains the configuration data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. Values +with non-UTF-8 byte sequences must use the BinaryData field. The keys +stored in Data must not overlap with the keys in the BinaryData field, this +is enforced during validation process. + +You can also add data using `configMap.addData()`. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +### ConfigMapVolumeOptions + +Options for the ConfigMap-based volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ConfigMapVolumeOptions( + default_mode: typing.Union[int, float] = None, + items: typing.Mapping[PathMapping] = None, + name: str = None, + optional: bool = None +) +``` + +##### `default_mode`Optional + +```python +default_mode: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 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. + +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. + +--- + +##### `items`Optional + +```python +items: typing.Mapping[PathMapping] +``` + +- *Type:* typing.Mapping[[`cdk8s_plus_27.PathMapping`](#cdk8s_plus_27.PathMapping)] +- *Default:* no mapping + +If unspecified, each key-value pair in the Data field of the referenced ConfigMap 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 ConfigMap, the volume setup will +error unless it is marked optional. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +##### `optional`Optional + +```python +optional: bool +``` + +- *Type:* `bool` +- *Default:* undocumented + +Specify whether the ConfigMap or its keys must be defined. + +--- + +### ContainerLifecycle + +Container lifecycle properties. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerLifecycle( + post_start: Handler = None, + pre_stop: Handler = None +) +``` + +##### `post_start`Optional + +```python +post_start: Handler +``` + +- *Type:* [`cdk8s_plus_27.Handler`](#cdk8s_plus_27.Handler) +- *Default:* No post start handler. + +This hook is executed immediately after a container is created. + +However, +there is no guarantee that the hook will execute before the container ENTRYPOINT. + +--- + +##### `pre_stop`Optional + +```python +pre_stop: Handler +``` + +- *Type:* [`cdk8s_plus_27.Handler`](#cdk8s_plus_27.Handler) +- *Default:* No pre stop handler. + +This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others. + +A call to the PreStop hook fails if the container is already in a terminated or completed state +and the hook must complete before the TERM signal to stop the container can be sent. +The Pod's termination grace period countdown begins before the PreStop hook is executed, +so regardless of the outcome of the handler, the container will eventually terminate +within the Pod's termination grace period. No parameters are passed to the handler. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination + +--- + +### ContainerOpts + +Optional properties of a container. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerOpts( + args: typing.List[str] = None, + command: typing.List[str] = None, + env_from: typing.List[EnvFrom] = None, + env_variables: typing.Mapping[EnvValue] = None, + image_pull_policy: ImagePullPolicy = None, + lifecycle: ContainerLifecycle = None, + liveness: Probe = None, + name: str = None, + port: typing.Union[int, float] = None, + port_number: typing.Union[int, float] = None, + ports: typing.List[ContainerPort] = None, + readiness: Probe = None, + resources: ContainerResources = None, + security_context: ContainerSecurityContextProps = None, + startup: Probe = None, + volume_mounts: typing.List[VolumeMount] = None, + working_dir: str = None +) +``` + +##### `args`Optional + +```python +args: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +```python +command: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `env_from`Optional + +```python +env_from: typing.List[EnvFrom] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `env_variables`Optional + +```python +env_variables: typing.Mapping[EnvValue] +``` + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `image_pull_policy`Optional + +```python +image_pull_policy: ImagePullPolicy +``` + +- *Type:* [`cdk8s_plus_27.ImagePullPolicy`](#cdk8s_plus_27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +```python +lifecycle: ContainerLifecycle +``` + +- *Type:* [`cdk8s_plus_27.ContainerLifecycle`](#cdk8s_plus_27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +```python +liveness: Probe +``` + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `port_number`Optional + +```python +port_number: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +```python +ports: typing.List[ContainerPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerPort`](#cdk8s_plus_27.ContainerPort)] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +```python +readiness: Probe +``` + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +```python +resources: ContainerResources +``` + +- *Type:* [`cdk8s_plus_27.ContainerResources`](#cdk8s_plus_27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `security_context`Optional + +```python +security_context: ContainerSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.ContainerSecurityContextProps`](#cdk8s_plus_27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +```python +startup: Probe +``` + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volume_mounts`Optional + +```python +volume_mounts: typing.List[VolumeMount] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.VolumeMount`](#cdk8s_plus_27.VolumeMount)] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `working_dir`Optional + +```python +working_dir: str +``` + +- *Type:* `str` +- *Default:* The container runtime's default. + +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. + +--- + +### ContainerPort + +Represents a network port in a single container. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerPort( + number: typing.Union[int, float], + host_ip: str = None, + host_port: typing.Union[int, float] = None, + name: str = None, + protocol: Protocol = None +) +``` + +##### `number`Required + +```python +number: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +--- + +##### `host_ip`Optional + +```python +host_ip: str +``` + +- *Type:* `str` +- *Default:* 127.0.0.1. + +What host IP to bind the external port to. + +--- + +##### `host_port`Optional + +```python +host_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* auto generated by kubernetes and might change on restarts. + +Number of port to expose on the host. + +If specified, this must be a valid port number, 0 < x < 65536. +Most containers do not need this. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* port is not named. + +If specified, this must be an IANA_SVC_NAME and unique within the pod. + +Each named port in a pod must have a unique name. +Name for the port that can be referred to by services. + +--- + +##### `protocol`Optional + +```python +protocol: Protocol +``` + +- *Type:* [`cdk8s_plus_27.Protocol`](#cdk8s_plus_27.Protocol) +- *Default:* Protocol.TCP + +Protocol for port. + +Must be UDP, TCP, or SCTP. Defaults to "TCP". + +--- + +### ContainerProps + +Properties for creating a container. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerProps( + args: typing.List[str] = None, + command: typing.List[str] = None, + env_from: typing.List[EnvFrom] = None, + env_variables: typing.Mapping[EnvValue] = None, + image_pull_policy: ImagePullPolicy = None, + lifecycle: ContainerLifecycle = None, + liveness: Probe = None, + name: str = None, + port: typing.Union[int, float] = None, + port_number: typing.Union[int, float] = None, + ports: typing.List[ContainerPort] = None, + readiness: Probe = None, + resources: ContainerResources = None, + security_context: ContainerSecurityContextProps = None, + startup: Probe = None, + volume_mounts: typing.List[VolumeMount] = None, + working_dir: str = None, + image: str +) +``` + +##### `args`Optional + +```python +args: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +```python +command: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `env_from`Optional + +```python +env_from: typing.List[EnvFrom] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `env_variables`Optional + +```python +env_variables: typing.Mapping[EnvValue] +``` + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `image_pull_policy`Optional + +```python +image_pull_policy: ImagePullPolicy +``` + +- *Type:* [`cdk8s_plus_27.ImagePullPolicy`](#cdk8s_plus_27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +```python +lifecycle: ContainerLifecycle +``` + +- *Type:* [`cdk8s_plus_27.ContainerLifecycle`](#cdk8s_plus_27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +```python +liveness: Probe +``` + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `port_number`Optional + +```python +port_number: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +```python +ports: typing.List[ContainerPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerPort`](#cdk8s_plus_27.ContainerPort)] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +```python +readiness: Probe +``` + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +```python +resources: ContainerResources +``` + +- *Type:* [`cdk8s_plus_27.ContainerResources`](#cdk8s_plus_27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `security_context`Optional + +```python +security_context: ContainerSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.ContainerSecurityContextProps`](#cdk8s_plus_27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +```python +startup: Probe +``` + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volume_mounts`Optional + +```python +volume_mounts: typing.List[VolumeMount] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.VolumeMount`](#cdk8s_plus_27.VolumeMount)] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `working_dir`Optional + +```python +working_dir: str +``` + +- *Type:* `str` +- *Default:* The container runtime's default. + +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. + +--- + +##### `image`Required + +```python +image: str +``` + +- *Type:* `str` + +Docker image name. + +--- + +### ContainerResources + +CPU and memory compute resources. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerResources( + cpu: CpuResources = None, + ephemeral_storage: EphemeralStorageResources = None, + memory: MemoryResources = None +) +``` + +##### `cpu`Optional + +```python +cpu: CpuResources +``` + +- *Type:* [`cdk8s_plus_27.CpuResources`](#cdk8s_plus_27.CpuResources) + +--- + +##### `ephemeral_storage`Optional + +```python +ephemeral_storage: EphemeralStorageResources +``` + +- *Type:* [`cdk8s_plus_27.EphemeralStorageResources`](#cdk8s_plus_27.EphemeralStorageResources) + +--- + +##### `memory`Optional + +```python +memory: MemoryResources +``` + +- *Type:* [`cdk8s_plus_27.MemoryResources`](#cdk8s_plus_27.MemoryResources) + +--- + +### ContainerSecurityContextProps + +Properties for `ContainerSecurityContext`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerSecurityContextProps( + allow_privilege_escalation: bool = None, + ensure_non_root: bool = None, + group: typing.Union[int, float] = None, + privileged: bool = None, + read_only_root_filesystem: bool = None, + user: typing.Union[int, float] = None +) +``` + +##### `allow_privilege_escalation`Optional + +```python +allow_privilege_escalation: bool +``` + +- *Type:* `bool` +- *Default:* false + +Whether a process can gain more privileges than its parent process. + +--- + +##### `ensure_non_root`Optional + +```python +ensure_non_root: bool +``` + +- *Type:* `bool` +- *Default:* true + +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. + +--- + +##### `group`Optional + +```python +group: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 26000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The GID to run the entrypoint of the container process. + +--- + +##### `privileged`Optional + +```python +privileged: bool +``` + +- *Type:* `bool` +- *Default:* false + +Run container in privileged mode. + +Processes in privileged containers are essentially equivalent to root on the host. + +--- + +##### `read_only_root_filesystem`Optional + +```python +read_only_root_filesystem: bool +``` + +- *Type:* `bool` +- *Default:* true + +Whether this container has a read-only root filesystem. + +--- + +##### `user`Optional + +```python +user: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 25000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The UID to run the entrypoint of the container process. + +--- + +### CpuResources + +CPU request and limit. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.CpuResources( + limit: Cpu = None, + request: Cpu = None +) +``` + +##### `limit`Optional + +```python +limit: Cpu +``` + +- *Type:* [`cdk8s_plus_27.Cpu`](#cdk8s_plus_27.Cpu) + +--- + +##### `request`Optional + +```python +request: Cpu +``` + +- *Type:* [`cdk8s_plus_27.Cpu`](#cdk8s_plus_27.Cpu) + +--- + +### CronJobProps + +Properties for `CronJob`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.CronJobProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + active_deadline: Duration = None, + backoff_limit: typing.Union[int, float] = None, + ttl_after_finished: Duration = None, + schedule: Cron, + concurrency_policy: ConcurrencyPolicy = None, + failed_jobs_retained: typing.Union[int, float] = None, + starting_deadline: Duration = None, + successful_jobs_retained: typing.Union[int, float] = None, + suspend: bool = None, + time_zone: str = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +```python +pod_metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```python +select: bool +``` + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```python +spread: bool +``` + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `active_deadline`Optional + +```python +active_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoff_limit`Optional + +```python +backoff_limit: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttl_after_finished`Optional + +```python +ttl_after_finished: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +##### `schedule`Required + +```python +schedule: Cron +``` + +- *Type:* [`cdk8s.Cron`](#cdk8s.Cron) + +Specifies the time in which the job would run again. + +This is defined as a cron expression in the CronJob resource. + +--- + +##### `concurrency_policy`Optional + +```python +concurrency_policy: ConcurrencyPolicy +``` + +- *Type:* [`cdk8s_plus_27.ConcurrencyPolicy`](#cdk8s_plus_27.ConcurrencyPolicy) +- *Default:* ConcurrencyPolicy.Forbid + +Specifies the concurrency policy for the job. + +--- + +##### `failed_jobs_retained`Optional + +```python +failed_jobs_retained: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 + +Specifies the number of failed jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `starting_deadline`Optional + +```python +starting_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) + +Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. + +This deadline specifies +how much time can pass after a schedule point, for which kubernetes can still start the job. +For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after +the scheduled time. + +Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 +seconds is not allowed, as it may cause your job to never be scheduled. + +In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). +This property also controls what time interval should kubernetes consider when counting for missed schedules. + +For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00, +and its `startingDeadline` field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00, +the job will not start as the number of missed jobs which missed their schedule is greater than 100. +However, if `startingDeadline` is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus +start a new execution at 10:22:00. + +--- + +##### `successful_jobs_retained`Optional + +```python +successful_jobs_retained: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Specifies the number of successful jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `suspend`Optional + +```python +suspend: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specifies if the cron job should be suspended. + +Only applies to future executions, current ones are remained untouched. + +--- + +##### `time_zone`Optional + +```python +time_zone: str +``` + +- *Type:* `str` +- *Default:* Timezone of kube-controller-manager process. + +Specifies the timezone for the job. + +This helps aligining the schedule to follow the specified timezone. + +> {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} for list of valid timezone values. + +--- + +### CsiVolumeOptions + +Options for the CSI driver based volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.CsiVolumeOptions( + attributes: typing.Mapping[str] = None, + fs_type: str = None, + name: str = None, + read_only: bool = None +) +``` + +##### `attributes`Optional + +```python +attributes: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] +- *Default:* undefined + +Any driver-specific attributes to pass to the CSI volume builder. + +--- + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* driver-dependent + +The filesystem type to mount. + +Ex. "ext4", "xfs", "ntfs". If not provided, +the empty value is passed to the associated CSI driver, which will +determine the default filesystem to apply. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Whether the mounted volume should be read-only or not. + +--- + +### DaemonSetProps + +Properties for `DaemonSet`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DaemonSetProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + min_ready_seconds: typing.Union[int, float] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +```python +pod_metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```python +select: bool +``` + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```python +spread: bool +``` + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `min_ready_seconds`Optional + +```python +min_ready_seconds: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 0 + +Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +### DeploymentExposeViaServiceOptions + +Options for `Deployment.exposeViaService`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DeploymentExposeViaServiceOptions( + name: str = None, + ports: typing.List[ServicePort] = None, + service_type: ServiceType = None +) +``` + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +##### `ports`Optional + +```python +ports: typing.List[ServicePort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +##### `service_type`Optional + +```python +service_type: ServiceType +``` + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +### DeploymentProps + +Properties for `Deployment`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DeploymentProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + min_ready: Duration = None, + progress_deadline: Duration = None, + replicas: typing.Union[int, float] = None, + strategy: DeploymentStrategy = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +```python +pod_metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```python +select: bool +``` + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```python +spread: bool +``` + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `min_ready`Optional + +```python +min_ready: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `progress_deadline`Optional + +```python +progress_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(600) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +The deployment controller will continue +to process failed deployments and a condition with a ProgressDeadlineExceeded +reason will be surfaced in the deployment status. + +Note that progress will not be estimated during the time a deployment is paused. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds + +--- + +##### `replicas`Optional + +```python +replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 2 + +Number of desired pods. + +--- + +##### `strategy`Optional + +```python +strategy: DeploymentStrategy +``` + +- *Type:* [`cdk8s_plus_27.DeploymentStrategy`](#cdk8s_plus_27.DeploymentStrategy) +- *Default:* RollingUpdate with maxSurge and maxUnavailable set to 25%. + +Specifies the strategy used to replace old Pods by new ones. + +--- + +### DeploymentStrategyRollingUpdateOptions + +Options for `DeploymentStrategy.rollingUpdate`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DeploymentStrategyRollingUpdateOptions( + max_surge: PercentOrAbsolute = None, + max_unavailable: PercentOrAbsolute = None +) +``` + +##### `max_surge`Optional + +```python +max_surge: PercentOrAbsolute +``` + +- *Type:* [`cdk8s_plus_27.PercentOrAbsolute`](#cdk8s_plus_27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be scheduled above the desired number of pods. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding up. +This can not be 0 if `maxUnavailable` is 0. + +Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update +starts, such that the total number of old and new pods do not exceed 130% of desired pods. +Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that +total number of pods running at any time during the update is at most 130% of desired pods. + +--- + +##### `max_unavailable`Optional + +```python +max_unavailable: PercentOrAbsolute +``` + +- *Type:* [`cdk8s_plus_27.PercentOrAbsolute`](#cdk8s_plus_27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be unavailable during the update. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding down. +This can not be 0 if `maxSurge` is 0. + +Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired +pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can +be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total +number of pods available at all times during the update is at least 70% of desired pods. + +--- + +### DnsOption + +Custom DNS option. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DnsOption( + name: str, + value: str = None +) +``` + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +Option name. + +--- + +##### `value`Optional + +```python +value: str +``` + +- *Type:* `str` +- *Default:* No value. + +Option value. + +--- + +### DockerConfigSecretProps + +Options for `DockerConfigSecret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DockerConfigSecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None, + data: typing.Mapping[typing.Any] +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `data`Required + +```python +data: typing.Mapping[typing.Any] +``` + +- *Type:* typing.Mapping[`typing.Any`] + +JSON content to provide for the `~/.docker/config.json` file. This will be stringified and inserted as stringData. + +> https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file + +--- + +### EmptyDirVolumeOptions + +Options for volumes populated with an empty directory. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EmptyDirVolumeOptions( + medium: EmptyDirMedium = None, + size_limit: Size = None +) +``` + +##### `medium`Optional + +```python +medium: EmptyDirMedium +``` + +- *Type:* [`cdk8s_plus_27.EmptyDirMedium`](#cdk8s_plus_27.EmptyDirMedium) +- *Default:* EmptyDirMedium.DEFAULT + +By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. + +However, you can set the emptyDir.medium field to +`EmptyDirMedium.MEMORY` to tell Kubernetes to mount a tmpfs (RAM-backed +filesystem) for you instead. While tmpfs is very fast, be aware that unlike +disks, tmpfs is cleared on node reboot and any files you write will count +against your Container's memory limit. + +--- + +##### `size_limit`Optional + +```python +size_limit: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* limit is undefined + +Total amount of local storage required for this EmptyDir volume. + +The size +limit is also applicable for memory medium. The maximum usage on memory +medium EmptyDir would be the minimum value between the SizeLimit specified +here and the sum of memory limits of all containers in a pod. + +--- + +### EnvValueFromConfigMapOptions + +Options to specify an envionment variable value from a ConfigMap key. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValueFromConfigMapOptions( + optional: bool = None +) +``` + +##### `optional`Optional + +```python +optional: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify whether the ConfigMap or its key must be defined. + +--- + +### EnvValueFromFieldRefOptions + +Options to specify an environment variable value from a field reference. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValueFromFieldRefOptions( + api_version: str = None, + key: str = None +) +``` + +##### `api_version`Optional + +```python +api_version: str +``` + +- *Type:* `str` + +Version of the schema the FieldPath is written in terms of. + +--- + +##### `key`Optional + +```python +key: str +``` + +- *Type:* `str` + +The key to select the pod label or annotation. + +--- + +### EnvValueFromProcessOptions + +Options to specify an environment variable value from the process environment. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValueFromProcessOptions( + required: bool = None +) +``` + +##### `required`Optional + +```python +required: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify whether the key must exist in the environment. + +If this is set to true, and the key does not exist, an error will thrown. + +--- + +### EnvValueFromResourceOptions + +Options to specify an environment variable value from a resource. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValueFromResourceOptions( + container: Container = None, + divisor: str = None +) +``` + +##### `container`Optional + +```python +container: Container +``` + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +The container to select the value from. + +--- + +##### `divisor`Optional + +```python +divisor: str +``` + +- *Type:* `str` + +The output format of the exposed resource. + +--- + +### EnvValueFromSecretOptions + +Options to specify an environment variable value from a Secret. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValueFromSecretOptions( + optional: bool = None +) +``` + +##### `optional`Optional + +```python +optional: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify whether the Secret or its key must be defined. + +--- + +### EphemeralStorageResources + +Emphemeral storage request and limit. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EphemeralStorageResources( + limit: Size = None, + request: Size = None +) +``` + +##### `limit`Optional + +```python +limit: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +##### `request`Optional + +```python +request: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +### ExposeDeploymentViaIngressOptions + +Options for exposing a deployment via an ingress. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ExposeDeploymentViaIngressOptions( + name: str = None, + ports: typing.List[ServicePort] = None, + service_type: ServiceType = None, + ingress: Ingress = None, + path_type: HttpIngressPathType = None +) +``` + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +##### `ports`Optional + +```python +ports: typing.List[ServicePort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +##### `service_type`Optional + +```python +service_type: ServiceType +``` + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +##### `ingress`Optional + +```python +ingress: Ingress +``` + +- *Type:* [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +##### `path_type`Optional + +```python +path_type: HttpIngressPathType +``` + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +### ExposeServiceViaIngressOptions + +Options for exposing a service using an ingress. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ExposeServiceViaIngressOptions( + ingress: Ingress = None, + path_type: HttpIngressPathType = None +) +``` + +##### `ingress`Optional + +```python +ingress: Ingress +``` + +- *Type:* [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +##### `path_type`Optional + +```python +path_type: HttpIngressPathType +``` + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +### FromServiceAccountNameOptions + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.FromServiceAccountNameOptions( + namespace_name: str = None +) +``` + +##### `namespace_name`Optional + +```python +namespace_name: str +``` + +- *Type:* `str` +- *Default:* "default" + +The name of the namespace the service account belongs to. + +--- + +### GCEPersistentDiskPersistentVolumeProps + +Properties for `GCEPersistentDiskPersistentVolume`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.GCEPersistentDiskPersistentVolumeProps( + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None, + pd_name: str, + fs_type: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```python +claim: IPersistentVolumeClaim +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +```python +mount_options: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +```python +reclaim_policy: PersistentVolumeReclaimPolicy +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +```python +volume_mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `pd_name`Required + +```python +pd_name: str +``` + +- *Type:* `str` + +Unique name of the PD resource in GCE. + +Used to identify the disk in GCE. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +--- + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### GCEPersistentDiskVolumeOptions + +Options of `Volume.fromGcePersistentDisk`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.GCEPersistentDiskVolumeOptions( + fs_type: str = None, + name: str = None, + partition: typing.Union[int, float] = None, + read_only: bool = None +) +``` + +##### `fs_type`Optional + +```python +fs_type: str +``` + +- *Type:* `str` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### HandlerFromHttpGetOptions + +Options for `Handler.fromHttpGet`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HandlerFromHttpGetOptions( + port: typing.Union[int, float] = None +) +``` + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +### HandlerFromTcpSocketOptions + +Options for `Handler.fromTcpSocket`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HandlerFromTcpSocketOptions( + host: str = None, + port: typing.Union[int, float] = None +) +``` + +##### `host`Optional + +```python +host: str +``` + +- *Type:* `str` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + +### HorizontalPodAutoscalerProps + +Properties for HorizontalPodAutoscaler. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HorizontalPodAutoscalerProps( + metadata: ApiObjectMetadata = None, + max_replicas: typing.Union[int, float], + target: IScalable, + metrics: typing.List[Metric] = None, + min_replicas: typing.Union[int, float] = None, + scale_down: ScalingRules = None, + scale_up: ScalingRules = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `max_replicas`Required + +```python +max_replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `target`Required + +```python +target: IScalable +``` + +- *Type:* [`cdk8s_plus_27.IScalable`](#cdk8s_plus_27.IScalable) + +The workload to scale up or down. + +Scalable workload types: + +* Deployment +* StatefulSet + +--- + +##### `metrics`Optional + +```python +metrics: typing.List[Metric] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Metric`](#cdk8s_plus_27.Metric)] +- *Default:* If metrics are not provided, then the target resource +constraints (e.g. cpu limit) will be used as scaling metrics. + +The metric conditions that trigger a scale up or scale down. + +--- + +##### `min_replicas`Optional + +```python +min_replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 + +The minimum number of replicas that can be scaled down to. + +Can be set to 0 if the alpha feature gate `HPAScaleToZero` is enabled and +at least one Object or External metric is configured. + +--- + +##### `scale_down`Optional + +```python +scale_down: ScalingRules +``` + +- *Type:* [`cdk8s_plus_27.ScalingRules`](#cdk8s_plus_27.ScalingRules) +- *Default:* Scale down to minReplica count with a 5 minute stabilization window. + +The scaling behavior when scaling down. + +--- + +##### `scale_up`Optional + +```python +scale_up: ScalingRules +``` + +- *Type:* [`cdk8s_plus_27.ScalingRules`](#cdk8s_plus_27.ScalingRules) +- *Default:* Is the higher of: +* Increase no more than 4 pods per 60 seconds +* Double the number of pods per 60 seconds + +The scaling behavior when scaling up. + +--- + +### HostAlias + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's /etc/hosts file. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HostAlias( + hostnames: typing.List[str], + ip: str +) +``` + +##### `hostnames`Required + +```python +hostnames: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Hostnames for the chosen IP address. + +--- + +##### `ip`Required + +```python +ip: str +``` + +- *Type:* `str` + +IP address of the host file entry. + +--- + +### HostPathVolumeOptions + +Options for a HostPathVolume-based volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HostPathVolumeOptions( + path: str, + type: HostPathVolumeType = None +) +``` + +##### `path`Required + +```python +path: str +``` + +- *Type:* `str` + +The path of the directory on the host. + +--- + +##### `type`Optional + +```python +type: HostPathVolumeType +``` + +- *Type:* [`cdk8s_plus_27.HostPathVolumeType`](#cdk8s_plus_27.HostPathVolumeType) +- *Default:* HostPathVolumeType.DEFAULT + +The expected type of the path found on the host. + +--- + +### HttpGetProbeOptions + +Options for `Probe.fromHttpGet()`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.HttpGetProbeOptions( + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None, + port: typing.Union[int, float] = None, + scheme: ConnectionScheme = None +) +``` + +##### `failure_threshold`Optional + +```python +failure_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initial_delay_seconds`Optional + +```python +initial_delay_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `period_seconds`Optional + +```python +period_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `success_threshold`Optional + +```python +success_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeout_seconds`Optional + +```python +timeout_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +##### `scheme`Optional + +```python +scheme: ConnectionScheme +``` + +- *Type:* [`cdk8s_plus_27.ConnectionScheme`](#cdk8s_plus_27.ConnectionScheme) +- *Default:* ConnectionScheme.HTTP + +Scheme to use for connecting to the host (HTTP or HTTPS). + +--- + +### IngressProps + +Properties for `Ingress`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.IngressProps( + metadata: ApiObjectMetadata = None, + default_backend: IngressBackend = None, + rules: typing.List[IngressRule] = None, + tls: typing.List[IngressTls] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `default_backend`Optional + +```python +default_backend: IngressBackend +``` + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +The default backend services requests that do not match any rule. + +Using this option or the `addDefaultBackend()` method is equivalent to +adding a rule with both `path` and `host` undefined. + +--- + +##### `rules`Optional + +```python +rules: typing.List[IngressRule] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.IngressRule`](#cdk8s_plus_27.IngressRule)] + +Routing rules for this ingress. + +Each rule must define an `IngressBackend` that will receive the requests +that match this rule. If both `host` and `path` are not specifiec, this +backend will be used as the default backend of the ingress. + +You can also add rules later using `addRule()`, `addHostRule()`, +`addDefaultBackend()` and `addHostDefaultBackend()`. + +--- + +##### `tls`Optional + +```python +tls: typing.List[IngressTls] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.IngressTls`](#cdk8s_plus_27.IngressTls)] + +TLS settings for this ingress. + +Using this option tells the ingress controller to expose a TLS endpoint. +Currently the Ingress only supports a single TLS port, 443. If multiple +members of this list specify different hosts, they will be multiplexed on +the same port according to the hostname specified through the SNI TLS +extension, if the ingress controller fulfilling the ingress supports SNI. + +--- + +### IngressRule + +Represents the rules mapping the paths under a specified host to the related backend services. + +Incoming requests are first evaluated for a host match, +then routed to the backend associated with the matching path. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.IngressRule( + backend: IngressBackend, + host: str = None, + path: str = None, + path_type: HttpIngressPathType = None +) +``` + +##### `backend`Required + +```python +backend: IngressBackend +``` + +- *Type:* [`cdk8s_plus_27.IngressBackend`](#cdk8s_plus_27.IngressBackend) + +Backend defines the referenced service endpoint to which the traffic will be forwarded to. + +--- + +##### `host`Optional + +```python +host: str +``` + +- *Type:* `str` +- *Default:* If the host is unspecified, the Ingress routes all traffic based +on the specified IngressRuleValue. + +Host is the fully qualified domain name of a network host, as defined by RFC 3986. + +Note the following deviations from the "host" part of the URI as +defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue +can only apply to the IP in the Spec of the parent Ingress. 2. The `:` +delimiter is not respected because ports are not allowed. Currently the +port of an Ingress is implicitly :80 for http and :443 for https. Both +these may change in the future. Incoming requests are matched against the +host before the IngressRuleValue. + +--- + +##### `path`Optional + +```python +path: str +``` + +- *Type:* `str` +- *Default:* If unspecified, the path defaults to a catch all sending traffic +to the backend. + +Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/'. + +--- + +##### `path_type`Optional + +```python +path_type: HttpIngressPathType +``` + +- *Type:* [`cdk8s_plus_27.HttpIngressPathType`](#cdk8s_plus_27.HttpIngressPathType) + +Specify how the path is matched against request paths. + +By default, path +types will be matched by prefix. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +--- + +### IngressTls + +Represents the TLS configuration mapping that is passed to the ingress controller for SSL termination. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.IngressTls( + hosts: typing.List[str] = None, + secret: ISecret = None +) +``` + +##### `hosts`Optional + +```python +hosts: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* If unspecified, it defaults to the wildcard host setting for +the loadbalancer controller fulfilling this Ingress. + +Hosts are a list of hosts included in the TLS certificate. + +The values in +this list must match the name/s used in the TLS Secret. + +--- + +##### `secret`Optional + +```python +secret: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* If unspecified, it allows SSL routing based on SNI hostname. + +Secret is the secret that contains the certificate and key used to terminate SSL traffic on 443. + +If the SNI host in a listener conflicts with +the "Host" header field used by an IngressRule, the SNI host is used for +termination and value of the Host header is used for routing. + +--- + +### JobProps + +Properties for `Job`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.JobProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + active_deadline: Duration = None, + backoff_limit: typing.Union[int, float] = None, + ttl_after_finished: Duration = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +```python +pod_metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```python +select: bool +``` + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```python +spread: bool +``` + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `active_deadline`Optional + +```python +active_deadline: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoff_limit`Optional + +```python +backoff_limit: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttl_after_finished`Optional + +```python +ttl_after_finished: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +### LabelSelectorOptions + +Options for `LabelSelector.of`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelSelectorOptions( + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None +) +``` + +##### `expressions`Optional + +```python +expressions: typing.List[LabelExpression] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] + +Expression based label matchers. + +--- + +##### `labels`Optional + +```python +labels: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +Strict label matchers. + +--- + +### LabelSelectorRequirement + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelSelectorRequirement( + key: str, + operator: str, + values: typing.List[str] = None +) +``` + +##### `key`Required + +```python +key: str +``` + +- *Type:* `str` + +The label key that the selector applies to. + +--- + +##### `operator`Required + +```python +operator: str +``` + +- *Type:* `str` + +Represents a key's relationship to a set of values. + +--- + +##### `values`Optional + +```python +values: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +An array of string values. + +If the operator is In or NotIn, the values array +must be non-empty. If the operator is Exists or DoesNotExist, +the values array must be empty. This array is replaced during a strategic merge patch. + +--- + +### MemoryResources + +Memory request and limit. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MemoryResources( + limit: Size = None, + request: Size = None +) +``` + +##### `limit`Optional + +```python +limit: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +##### `request`Optional + +```python +request: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +### MetricContainerResourceOptions + +Options for `Metric.containerResource()`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MetricContainerResourceOptions( + container: Container, + target: MetricTarget +) +``` + +##### `container`Required + +```python +container: Container +``` + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +Container where the metric can be found. + +--- + +##### `target`Required + +```python +target: MetricTarget +``` + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +### MetricObjectOptions + +Options for `Metric.object()`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MetricObjectOptions( + name: str, + target: MetricTarget, + label_selector: LabelSelector = None, + object: IResource +) +``` + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The name of the metric to scale on. + +--- + +##### `target`Required + +```python +target: MetricTarget +``` + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +##### `label_selector`Optional + +```python +label_selector: LabelSelector +``` + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +##### `object`Required + +```python +object: IResource +``` + +- *Type:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +Resource where the metric can be found. + +--- + +### MetricOptions + +Base options for a Metric. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MetricOptions( + name: str, + target: MetricTarget, + label_selector: LabelSelector = None +) +``` + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The name of the metric to scale on. + +--- + +##### `target`Required + +```python +target: MetricTarget +``` + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +##### `label_selector`Optional + +```python +label_selector: LabelSelector +``` + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +### MountOptions + +Options for mounts. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MountOptions( + propagation: MountPropagation = None, + read_only: bool = None, + sub_path: str = None, + sub_path_expr: str = None +) +``` + +##### `propagation`Optional + +```python +propagation: MountPropagation +``` + +- *Type:* [`cdk8s_plus_27.MountPropagation`](#cdk8s_plus_27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +##### `sub_path`Optional + +```python +sub_path: str +``` + +- *Type:* `str` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +##### `sub_path_expr`Optional + +```python +sub_path_expr: str +``` + +- *Type:* `str` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + +### NamespaceProps + +Properties for `Namespace`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NamespaceProps( + metadata: ApiObjectMetadata = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +### NamespaceSelectorConfig + +Configuration for selecting namespaces. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NamespaceSelectorConfig( + label_selector: LabelSelector = None, + names: typing.List[str] = None +) +``` + +##### `label_selector`Optional + +```python +label_selector: LabelSelector +``` + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) + +A selector to select namespaces by labels. + +--- + +##### `names`Optional + +```python +names: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +A list of names to select namespaces by names. + +--- + +### NamespacesSelectOptions + +Options for `Namespaces.select`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NamespacesSelectOptions( + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None, + names: typing.List[str] = None +) +``` + +##### `expressions`Optional + +```python +expressions: typing.List[LabelExpression] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] +- *Default:* no selector requirements. + +Namespaces must satisfy these selectors. + +The selectors query labels, just like the `labels` property, but they +provide a more advanced matching mechanism. + +--- + +##### `labels`Optional + +```python +labels: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] +- *Default:* no strict labels requirements. + +Labels the namespaces must have. + +This is equivalent to using an 'Is' selector. + +--- + +##### `names`Optional + +```python +names: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* no name requirements. + +Namespaces names must be one of these. + +--- + +### NetworkPolicyAddEgressRuleOptions + +Options for `NetworkPolicy.addEgressRule`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyAddEgressRuleOptions( + ports: typing.List[NetworkPolicyPort] = None +) +``` + +##### `ports`Optional + +```python +ports: typing.List[NetworkPolicyPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports the rule should allow outgoing traffic to. + +--- + +### NetworkPolicyPeerConfig + +Configuration for network peers. + +A peer can either by an ip block, or a selection of pods, not both. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPeerConfig( + ip_block: NetworkPolicyIpBlock = None, + pod_selector: PodSelectorConfig = None +) +``` + +##### `ip_block`Optional + +```python +ip_block: NetworkPolicyIpBlock +``` + +- *Type:* [`cdk8s_plus_27.NetworkPolicyIpBlock`](#cdk8s_plus_27.NetworkPolicyIpBlock) + +The ip block this peer represents. + +--- + +##### `pod_selector`Optional + +```python +pod_selector: PodSelectorConfig +``` + +- *Type:* [`cdk8s_plus_27.PodSelectorConfig`](#cdk8s_plus_27.PodSelectorConfig) + +The pod selector this peer represents. + +--- + +### NetworkPolicyPortProps + +Properties for `NetworkPolicyPort`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPortProps( + end_port: typing.Union[int, float] = None, + port: typing.Union[int, float] = None, + protocol: NetworkProtocol = None +) +``` + +##### `end_port`Optional + +```python +end_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* not a port range. + +End port (relative to `port`). + +Only applies if `port` is defined. +Use this to specify a port range, rather that a specific one. + +--- + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* all ports are allowed. + +Specific port number. + +--- + +##### `protocol`Optional + +```python +protocol: NetworkProtocol +``` + +- *Type:* [`cdk8s_plus_27.NetworkProtocol`](#cdk8s_plus_27.NetworkProtocol) +- *Default:* NetworkProtocol.TCP + +Protocol. + +--- + +### NetworkPolicyProps + +Properties for `NetworkPolicy`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyProps( + metadata: ApiObjectMetadata = None, + egress: NetworkPolicyTraffic = None, + ingress: NetworkPolicyTraffic = None, + selector: IPodSelector = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `egress`Optional + +```python +egress: NetworkPolicyTraffic +``` + +- *Type:* [`cdk8s_plus_27.NetworkPolicyTraffic`](#cdk8s_plus_27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change egress behavior of the pods it selects. + +Egress traffic configuration. + +--- + +##### `ingress`Optional + +```python +ingress: NetworkPolicyTraffic +``` + +- *Type:* [`cdk8s_plus_27.NetworkPolicyTraffic`](#cdk8s_plus_27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change ingress behavior of the pods it selects. + +Ingress traffic configuration. + +--- + +##### `selector`Optional + +```python +selector: IPodSelector +``` + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) +- *Default:* will select all pods in the namespace of the policy. + +Which pods does this policy object applies to. + +This can either be a single pod / workload, or a grouping of pods selected +via the `Pods.select` function. Rules is applied to any pods selected by this property. +Multiple network policies can select the same set of pods. +In this case, the rules for each are combined additively. + +Note that + +--- + +### NetworkPolicyRule + +Describes a rule allowing traffic from / to pods matched by a network policy selector. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyRule( + peer: INetworkPolicyPeer, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +##### `peer`Required + +```python +peer: INetworkPolicyPeer +``` + +- *Type:* [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +Peer this rule interacts with. + +--- + +##### `ports`Optional + +```python +ports: typing.List[NetworkPolicyPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] +- *Default:* traffic is allowed on all ports. + +The ports of the rule. + +--- + +### NetworkPolicyTraffic + +Describes how the network policy should configure egress / ingress traffic. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyTraffic( + default: NetworkPolicyTrafficDefault = None, + rules: typing.List[NetworkPolicyRule] = None +) +``` + +##### `default`Optional + +```python +default: NetworkPolicyTrafficDefault +``` + +- *Type:* [`cdk8s_plus_27.NetworkPolicyTrafficDefault`](#cdk8s_plus_27.NetworkPolicyTrafficDefault) +- *Default:* unset, the policy does not change the behavior. + +Specifies the default behavior of the policy when no rules are defined. + +--- + +##### `rules`Optional + +```python +rules: typing.List[NetworkPolicyRule] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyRule`](#cdk8s_plus_27.NetworkPolicyRule)] +- *Default:* no rules + +List of rules to be applied to the selected pods. + +If empty, the behavior of the policy is dictated by the `default` property. + +--- + +### NfsVolumeOptions + +Options for the NFS based volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NfsVolumeOptions( + path: str, + server: str, + read_only: bool = None +) +``` + +##### `path`Required + +```python +path: str +``` + +- *Type:* `str` + +Path that is exported by the NFS server. + +--- + +##### `server`Required + +```python +server: str +``` + +- *Type:* `str` + +Server is the hostname or IP address of the NFS server. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, will force the NFS export to be mounted with read-only permissions. + +--- + +### NodeTaintQueryOptions + +Options for `NodeTaintQuery`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeTaintQueryOptions( + effect: TaintEffect = None, + evict_after: Duration = None +) +``` + +##### `effect`Optional + +```python +effect: TaintEffect +``` + +- *Type:* [`cdk8s_plus_27.TaintEffect`](#cdk8s_plus_27.TaintEffect) +- *Default:* all effects are matched. + +The taint effect to match. + +--- + +##### `evict_after`Optional + +```python +evict_after: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* bound forever. + +How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. + +Only applies for the `NO_EXECUTE` effect. + +--- + +### PathMapping + +Maps a string key to a path within a volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PathMapping( + path: str, + mode: typing.Union[int, float] = None +) +``` + +##### `path`Required + +```python +path: str +``` + +- *Type:* `str` + +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`Optional + +```python +mode: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +Optional: 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. + +--- + +### PersistentVolumeClaimProps + +Properties for `PersistentVolumeClaim`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolumeClaimProps( + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + storage: Size = None, + storage_class_name: str = None, + volume: IPersistentVolume = None, + volume_mode: PersistentVolumeMode = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes requirement. + +Contains the access modes the volume should support. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No storage requirement. + +Minimum storage size the volume should have. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` +- *Default:* Not set. + +Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. + +* If the admission plugin is turned on, the storage class marked as default will be used. +* If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + +--- + +##### `volume`Optional + +```python +volume: IPersistentVolume +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume) +- *Default:* No specific volume binding. + +The PersistentVolume backing this claim. + +The control plane still checks that storage class, access modes, +and requested storage size on the volume are valid. + +Note that in order to guarantee a proper binding, the volume should +also define a `claimRef` referring to this claim. Otherwise, the volume may be +claimed be other pvc's before it gets a chance to bind to this one. + +If the volume is managed (i.e not imported), you can use `pv.claim()` to easily +create a bi-directional bounded claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding. + +--- + +##### `volume_mode`Optional + +```python +volume_mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +### PersistentVolumeClaimVolumeOptions + +Options for a PersistentVolumeClaim-based volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolumeClaimVolumeOptions( + name: str = None, + read_only: bool = None +) +``` + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* Derived from the PVC name. + +The volume name. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Will force the ReadOnly setting in VolumeMounts. + +--- + +### PersistentVolumeProps + +Properties for `PersistentVolume`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PersistentVolumeProps( + metadata: ApiObjectMetadata = None, + access_modes: typing.List[PersistentVolumeAccessMode] = None, + claim: IPersistentVolumeClaim = None, + mount_options: typing.List[str] = None, + reclaim_policy: PersistentVolumeReclaimPolicy = None, + storage: Size = None, + storage_class_name: str = None, + volume_mode: PersistentVolumeMode = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `access_modes`Optional + +```python +access_modes: typing.List[PersistentVolumeAccessMode] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.PersistentVolumeAccessMode`](#cdk8s_plus_27.PersistentVolumeAccessMode)] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```python +claim: IPersistentVolumeClaim +``` + +- *Type:* [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mount_options`Optional + +```python +mount_options: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaim_policy`Optional + +```python +reclaim_policy: PersistentVolumeReclaimPolicy +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeReclaimPolicy`](#cdk8s_plus_27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```python +storage: Size +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storage_class_name`Optional + +```python +storage_class_name: str +``` + +- *Type:* `str` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volume_mode`Optional + +```python +volume_mode: PersistentVolumeMode +``` + +- *Type:* [`cdk8s_plus_27.PersistentVolumeMode`](#cdk8s_plus_27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +### PodConnectionsAllowFromOptions + +Options for `PodConnections.allowFrom`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodConnectionsAllowFromOptions( + isolation: PodConnectionsIsolation = None, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +##### `isolation`Optional + +```python +isolation: PodConnectionsIsolation +``` + +- *Type:* [`cdk8s_plus_27.PodConnectionsIsolation`](#cdk8s_plus_27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +##### `ports`Optional + +```python +ports: typing.List[NetworkPolicyPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] +- *Default:* The pod ports. + +Ports to allow incoming traffic to. + +--- + +### PodConnectionsAllowToOptions + +Options for `PodConnections.allowTo`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodConnectionsAllowToOptions( + isolation: PodConnectionsIsolation = None, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +##### `isolation`Optional + +```python +isolation: PodConnectionsIsolation +``` + +- *Type:* [`cdk8s_plus_27.PodConnectionsIsolation`](#cdk8s_plus_27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +##### `ports`Optional + +```python +ports: typing.List[NetworkPolicyPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports to allow outgoing traffic to. + +--- + +### PodDnsProps + +Properties for `PodDns`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodDnsProps( + hostname: str = None, + hostname_as_fqd_n: bool = None, + nameservers: typing.List[str] = None, + options: typing.List[DnsOption] = None, + policy: DnsPolicy = None, + searches: typing.List[str] = None, + subdomain: str = None +) +``` + +##### `hostname`Optional + +```python +hostname: str +``` + +- *Type:* `str` +- *Default:* Set to a system-defined value. + +Specifies the hostname of the Pod. + +--- + +##### `hostname_as_fqd_n`Optional + +```python +hostname_as_fqd_n: bool +``` + +- *Type:* `bool` +- *Default:* false + +If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + +In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). +In Windows containers, this means setting the registry value of hostname for the registry +key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. +If a pod does not have FQDN, this has no effect. + +--- + +##### `nameservers`Optional + +```python +nameservers: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +A list of IP addresses that will be used as DNS servers for the Pod. + +There can be at most 3 IP addresses specified. +When the policy is set to "NONE", the list must contain at least one IP address, +otherwise this property is optional. +The servers listed will be combined to the base nameservers generated from +the specified DNS policy with duplicate addresses removed. + +--- + +##### `options`Optional + +```python +options: typing.List[DnsOption] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.DnsOption`](#cdk8s_plus_27.DnsOption)] + +List of objects where each object may have a name property (required) and a value property (optional). + +The contents in this property +will be merged to the options generated from the specified DNS policy. +Duplicate entries are removed. + +--- + +##### `policy`Optional + +```python +policy: DnsPolicy +``` + +- *Type:* [`cdk8s_plus_27.DnsPolicy`](#cdk8s_plus_27.DnsPolicy) +- *Default:* DnsPolicy.CLUSTER_FIRST + +Set DNS policy for the pod. + +If policy is set to `None`, other configuration must be supplied. + +--- + +##### `searches`Optional + +```python +searches: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +A list of DNS search domains for hostname lookup in the Pod. + +When specified, the provided list will be merged into the base +search domain names generated from the chosen DNS policy. +Duplicate domain names are removed. + +Kubernetes allows for at most 6 search domains. + +--- + +##### `subdomain`Optional + +```python +subdomain: str +``` + +- *Type:* `str` +- *Default:* No subdomain. + +If specified, the fully qualified Pod hostname will be "...svc.". + +--- + +### PodProps + +Properties for `Pod`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +### PodsAllOptions + +Options for `Pods.all`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodsAllOptions( + namespaces: Namespaces = None +) +``` + +##### `namespaces`Optional + +```python +namespaces: Namespaces +``` + +- *Type:* [`cdk8s_plus_27.Namespaces`](#cdk8s_plus_27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +### PodSchedulingAttractOptions + +Options for `PodScheduling.attract`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodSchedulingAttractOptions( + weight: typing.Union[int, float] = None +) +``` + +##### `weight`Optional + +```python +weight: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. assignment is assumed to be required (hard). + +Indicates the attraction is optional (soft), with this weight score. + +--- + +### PodSchedulingColocateOptions + +Options for `PodScheduling.colocate`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodSchedulingColocateOptions( + topology: Topology = None, + weight: typing.Union[int, float] = None +) +``` + +##### `topology`Optional + +```python +topology: Topology +``` + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to coloate on. + +--- + +##### `weight`Optional + +```python +weight: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. co-location is assumed to be required (hard). + +Indicates the co-location is optional (soft), with this weight score. + +--- + +### PodSchedulingSeparateOptions + +Options for `PodScheduling.separate`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodSchedulingSeparateOptions( + topology: Topology = None, + weight: typing.Union[int, float] = None +) +``` + +##### `topology`Optional + +```python +topology: Topology +``` + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to separate on. + +--- + +##### `weight`Optional + +```python +weight: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. separation is assumed to be required (hard). + +Indicates the separation is optional (soft), with this weight score. + +--- + +### PodSecurityContextProps + +Properties for `PodSecurityContext`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodSecurityContextProps( + ensure_non_root: bool = None, + fs_group: typing.Union[int, float] = None, + fs_group_change_policy: FsGroupChangePolicy = None, + group: typing.Union[int, float] = None, + sysctls: typing.List[Sysctl] = None, + user: typing.Union[int, float] = None +) +``` + +##### `ensure_non_root`Optional + +```python +ensure_non_root: bool +``` + +- *Type:* `bool` +- *Default:* true + +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. + +--- + +##### `fs_group`Optional + +```python +fs_group: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* Volume ownership is not changed. + +Modify the ownership and permissions of pod volumes to this GID. + +--- + +##### `fs_group_change_policy`Optional + +```python +fs_group_change_policy: FsGroupChangePolicy +``` + +- *Type:* [`cdk8s_plus_27.FsGroupChangePolicy`](#cdk8s_plus_27.FsGroupChangePolicy) +- *Default:* FsGroupChangePolicy.ALWAYS + +Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. + +This field will only apply to volume types which support fsGroup based ownership(and permissions). +It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. + +--- + +##### `group`Optional + +```python +group: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* Group configured by container runtime + +The GID to run the entrypoint of the container process. + +--- + +##### `sysctls`Optional + +```python +sysctls: typing.List[Sysctl] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Sysctl`](#cdk8s_plus_27.Sysctl)] +- *Default:* No sysctls + +Sysctls hold a list of namespaced sysctls used for the pod. + +Pods with unsupported sysctls (by the container runtime) might fail to launch. + +--- + +##### `user`Optional + +```python +user: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* User specified in image metadata + +The UID to run the entrypoint of the container process. + +--- + +### PodSelectorConfig + +Configuration for selecting pods, optionally in particular namespaces. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodSelectorConfig( + label_selector: LabelSelector, + namespaces: NamespaceSelectorConfig = None +) +``` + +##### `label_selector`Required + +```python +label_selector: LabelSelector +``` + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) + +A selector to select pods by labels. + +--- + +##### `namespaces`Optional + +```python +namespaces: NamespaceSelectorConfig +``` + +- *Type:* [`cdk8s_plus_27.NamespaceSelectorConfig`](#cdk8s_plus_27.NamespaceSelectorConfig) + +Configuration for selecting which namepsaces are the pods allowed to be in. + +--- + +### PodsSelectOptions + +Options for `Pods.select`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodsSelectOptions( + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None, + namespaces: Namespaces = None +) +``` + +##### `expressions`Optional + +```python +expressions: typing.List[LabelExpression] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] +- *Default:* no expressions requirements. + +Expressions the pods must satisify. + +--- + +##### `labels`Optional + +```python +labels: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] +- *Default:* no strict labels requirements. + +Labels the pods must have. + +--- + +##### `namespaces`Optional + +```python +namespaces: Namespaces +``` + +- *Type:* [`cdk8s_plus_27.Namespaces`](#cdk8s_plus_27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +### ProbeOptions + +Probe options. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ProbeOptions( + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None +) +``` + +##### `failure_threshold`Optional + +```python +failure_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initial_delay_seconds`Optional + +```python +initial_delay_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `period_seconds`Optional + +```python +period_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `success_threshold`Optional + +```python +success_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeout_seconds`Optional + +```python +timeout_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +### ResourceProps + +Initialization properties for resources. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ResourceProps( + metadata: ApiObjectMetadata = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +### RoleBindingProps + +Properties for `RoleBinding`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.RoleBindingProps( + metadata: ApiObjectMetadata = None, + role: IRole +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +```python +role: IRole +``` + +- *Type:* [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole) + +The role to bind to. + +A RoleBinding can reference a Role or a ClusterRole. + +--- + +### RolePolicyRule + +Policy rule of a `Role. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.RolePolicyRule( + resources: typing.List[IApiResource], + verbs: typing.List[str] +) +``` + +##### `resources`Required + +```python +resources: typing.List[IApiResource] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource)] + +Resources this rule applies to. + +--- + +##### `verbs`Required + +```python +verbs: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Verbs to allow. + +(e.g ['get', 'watch']) + +--- + +### RoleProps + +Properties for `Role`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.RoleProps( + metadata: ApiObjectMetadata = None, + rules: typing.List[RolePolicyRule] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `rules`Optional + +```python +rules: typing.List[RolePolicyRule] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.RolePolicyRule`](#cdk8s_plus_27.RolePolicyRule)] +- *Default:* [] + +A list of rules the role should allow. + +--- + +### ScalingPolicy + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ScalingPolicy( + replicas: Replicas, + duration: Duration = None +) +``` + +##### `replicas`Required + +```python +replicas: Replicas +``` + +- *Type:* [`cdk8s_plus_27.Replicas`](#cdk8s_plus_27.Replicas) + +The type and quantity of replicas to change. + +--- + +##### `duration`Optional + +```python +duration: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* 15 seconds + +The amount of time the scaling policy has to continue scaling before the target metric must be revalidated. + +Must be greater than 0 seconds and no longer than 30 minutes. + +--- + +### ScalingRules + +Defines the scaling behavior for one direction. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ScalingRules( + policies: typing.List[ScalingPolicy] = None, + stabilization_window: Duration = None, + strategy: ScalingStrategy = None +) +``` + +##### `policies`Optional + +```python +policies: typing.List[ScalingPolicy] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ScalingPolicy`](#cdk8s_plus_27.ScalingPolicy)] +- *Default:* * Scale up + * Increase no more than 4 pods per 60 seconds + * Double the number of pods per 60 seconds +* Scale down + * Decrease to minReplica count + +The scaling policies. + +--- + +##### `stabilization_window`Optional + +```python +stabilization_window: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* * On scale down no stabilization is performed. +* On scale up stabilization is performed for 5 minutes. + +Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur. + +Minimum duration is 1 second, max is 1 hour. + +--- + +##### `strategy`Optional + +```python +strategy: ScalingStrategy +``` + +- *Type:* [`cdk8s_plus_27.ScalingStrategy`](#cdk8s_plus_27.ScalingStrategy) +- *Default:* MAX_CHANGE + +The strategy to use when scaling. + +--- + +### ScalingTarget + +Properties used to configure the target of an Autoscaler. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ScalingTarget( + api_version: str, + containers: typing.List[Container], + kind: str, + name: str, + replicas: typing.Union[int, float] = None +) +``` + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `containers`Required + +```python +containers: typing.List[Container] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container)] + +Container definitions associated with the target. + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +##### `replicas`Optional + +```python +replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The fixed number of replicas defined on the target. + +This is used +for validation purposes as Scalable targets should not have a +fixed number of replicas. + +--- + +### SecretProps + +Options for `Secret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.SecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None, + string_data: typing.Mapping[str] = None, + type: str = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `string_data`Optional + +```python +string_data: typing.Mapping[str] +``` + +- *Type:* typing.Mapping[`str`] + +stringData allows specifying non-binary secret data in string form. + +It is +provided as a write-only convenience method. All keys and values are merged +into the data field on write, overwriting any existing values. It is never +output when reading from the API. + +--- + +##### `type`Optional + +```python +type: str +``` + +- *Type:* `str` +- *Default:* undefined - Don't set a type. + +Optional type associated with the secret. + +Used to facilitate programmatic +handling of secret data by various controllers. + +--- + +### SecretValue + +Represents a specific value in JSON secret. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.SecretValue( + key: str, + secret: ISecret +) +``` + +##### `key`Required + +```python +key: str +``` + +- *Type:* `str` + +The JSON key. + +--- + +##### `secret`Required + +```python +secret: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +The secret. + +--- + +### SecretVolumeOptions + +Options for the Secret-based volume. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.SecretVolumeOptions( + default_mode: typing.Union[int, float] = None, + items: typing.Mapping[PathMapping] = None, + name: str = None, + optional: bool = None +) +``` + +##### `default_mode`Optional + +```python +default_mode: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 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. + +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. + +--- + +##### `items`Optional + +```python +items: typing.Mapping[PathMapping] +``` + +- *Type:* typing.Mapping[[`cdk8s_plus_27.PathMapping`](#cdk8s_plus_27.PathMapping)] +- *Default:* no mapping + +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. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` +- *Default:* auto-generated + +The volume name. + +--- + +##### `optional`Optional + +```python +optional: bool +``` + +- *Type:* `bool` +- *Default:* undocumented + +Specify whether the secret or its keys must be defined. + +--- + +### ServiceAccountProps + +Properties for initialization of `ServiceAccount`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceAccountProps( + metadata: ApiObjectMetadata = None, + automount_token: bool = None, + secrets: typing.List[ISecret] = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_token`Optional + +```python +automount_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether pods running as this service account should have an API token automatically mounted. + +Can be overridden at the pod level. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `secrets`Optional + +```python +secrets: typing.List[ISecret] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret)] + +List of secrets allowed to be used by pods running using this ServiceAccount. + +> https://kubernetes.io/docs/concepts/configuration/secret + +--- + +### ServiceAccountTokenSecretProps + +Options for `ServiceAccountTokenSecret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceAccountTokenSecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None, + service_account: IServiceAccount +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `service_account`Required + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) + +The service account to store a secret for. + +--- + +### ServiceBindOptions + +Options for `Service.bind`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceBindOptions( + name: str = None, + node_port: typing.Union[int, float] = None, + protocol: Protocol = None, + target_port: typing.Union[int, float] = None +) +``` + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `node_port`Optional + +```python +node_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```python +protocol: Protocol +``` + +- *Type:* [`cdk8s_plus_27.Protocol`](#cdk8s_plus_27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `target_port`Optional + +```python +target_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +### ServiceIngressBackendOptions + +Options for setting up backends for ingress rules. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceIngressBackendOptions( + port: typing.Union[int, float] = None +) +``` + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* if the service exposes a single port, this port will be used. + +The port to use to access the service. + +* This option will fail if the service does not expose any ports. +* If the service exposes multiple ports, this option must be specified. +* If the service exposes a single port, this option is optional and if + specified, it must be the same port exposed by the service. + +--- + +### ServicePort + +Definition of a service port. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServicePort( + name: str = None, + node_port: typing.Union[int, float] = None, + protocol: Protocol = None, + target_port: typing.Union[int, float] = None, + port: typing.Union[int, float] +) +``` + +##### `name`Optional + +```python +name: str +``` + +- *Type:* `str` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `node_port`Optional + +```python +node_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```python +protocol: Protocol +``` + +- *Type:* [`cdk8s_plus_27.Protocol`](#cdk8s_plus_27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `target_port`Optional + +```python +target_port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `port`Required + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The port number the service will bind to. + +--- + +### ServiceProps + +Properties for `Service`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ServiceProps( + metadata: ApiObjectMetadata = None, + cluster_i_p: str = None, + external_i_ps: typing.List[str] = None, + external_name: str = None, + load_balancer_source_ranges: typing.List[str] = None, + ports: typing.List[ServicePort] = None, + selector: IPodSelector = None, + type: ServiceType = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `cluster_i_p`Optional + +```python +cluster_i_p: str +``` + +- *Type:* `str` +- *Default:* Automatically assigned. + +The IP address of the service and is usually assigned randomly by the master. + +If an address is specified manually and is not in use by others, it +will be allocated to the service; otherwise, creation of the service will +fail. This field can not be changed through updates. Valid values are +"None", empty string (""), or a valid IP address. "None" can be specified +for headless services when proxying is not required. Only applies to types +ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. + +> https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + +--- + +##### `external_i_ps`Optional + +```python +external_i_ps: typing.List[str] +``` + +- *Type:* typing.List[`str`] +- *Default:* No external IPs. + +A list of IP addresses for which nodes in the cluster will also accept traffic for this service. + +These IPs are not managed by Kubernetes. The user +is responsible for ensuring that traffic arrives at a node with this IP. A +common example is external load-balancers that are not part of the +Kubernetes system. + +--- + +##### `external_name`Optional + +```python +external_name: str +``` + +- *Type:* `str` +- *Default:* No external name. + +The externalName to be used when ServiceType.EXTERNAL_NAME is set. + +--- + +##### `load_balancer_source_ranges`Optional + +```python +load_balancer_source_ranges: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + +--- + +##### `ports`Optional + +```python +ports: typing.List[ServicePort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ServicePort`](#cdk8s_plus_27.ServicePort)] +- *Default:* either the selector ports, or none. + +The ports this service binds to. + +If the selector of the service is a managed pod / workload, +its ports will are automatically extracted and used as the default value. +Otherwise, no ports are bound. + +--- + +##### `selector`Optional + +```python +selector: IPodSelector +``` + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) +- *Default:* unset, the service is assumed to have an external process managing +its endpoints, which Kubernetes will not modify. + +Which pods should the service select and route to. + +You can pass one of the following: + +* An instance of `Pod` or any workload resource (e.g `Deployment`, `StatefulSet`, ...) +* Pods selected by the `Pods.select` function. Note that in this case only labels can be specified. + +--- + +##### `type`Optional + +```python +type: ServiceType +``` + +- *Type:* [`cdk8s_plus_27.ServiceType`](#cdk8s_plus_27.ServiceType) +- *Default:* ServiceType.ClusterIP + +Determines how the Service is exposed. + +More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + +--- + +### SshAuthSecretProps + +Options for `SshAuthSecret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.SshAuthSecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None, + ssh_private_key: str +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `ssh_private_key`Required + +```python +ssh_private_key: str +``` + +- *Type:* `str` + +The SSH private key to use. + +--- + +### StatefulSetProps + +Properties for initialization of `StatefulSet`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.StatefulSetProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None, + min_ready: Duration = None, + pod_management_policy: PodManagementPolicy = None, + replicas: typing.Union[int, float] = None, + service: Service = None, + strategy: StatefulSetUpdateStrategy = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +```python +pod_metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```python +select: bool +``` + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```python +spread: bool +``` + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `min_ready`Optional + +```python +min_ready: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `pod_management_policy`Optional + +```python +pod_management_policy: PodManagementPolicy +``` + +- *Type:* [`cdk8s_plus_27.PodManagementPolicy`](#cdk8s_plus_27.PodManagementPolicy) +- *Default:* PodManagementPolicy.ORDERED_READY + +Pod management policy to use for this statefulset. + +--- + +##### `replicas`Optional + +```python +replicas: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 + +Number of desired pods. + +--- + +##### `service`Optional + +```python +service: Service +``` + +- *Type:* [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service) +- *Default:* A new headless service will be created. + +Service to associate with the statefulset. + +--- + +##### `strategy`Optional + +```python +strategy: StatefulSetUpdateStrategy +``` + +- *Type:* [`cdk8s_plus_27.StatefulSetUpdateStrategy`](#cdk8s_plus_27.StatefulSetUpdateStrategy) +- *Default:* RollingUpdate with partition set to 0 + +Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. + +--- + +### StatefulSetUpdateStrategyRollingUpdateOptions + +Options for `StatefulSetUpdateStrategy.rollingUpdate`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.StatefulSetUpdateStrategyRollingUpdateOptions( + partition: typing.Union[int, float] = None +) +``` + +##### `partition`Optional + +```python +partition: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 0 + +If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet's .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version. + +If the partition is greater than replicas, updates to the pod template will not be propagated to Pods. +In most cases you will not need to use a partition, but they are useful if you want to stage an +update, roll out a canary, or perform a phased roll out. + +> https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions + +--- + +### SubjectConfiguration + +Subject contains a reference to the object or user identities a role binding applies to. + +This can either hold a direct API object reference, or a value +for non-objects such as user and group names. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.SubjectConfiguration( + kind: str, + name: str, + api_group: str = None, + namespace: str = None +) +``` + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +Kind of object being referenced. + +Values defined by this API group are +"User", "Group", and "ServiceAccount". If the Authorizer does not +recognized the kind value, the Authorizer should report an error. + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +Name of the object being referenced. + +--- + +##### `api_group`Optional + +```python +api_group: str +``` + +- *Type:* `str` + +APIGroup holds the API group of the referenced subject. + +Defaults to "" for +ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User +and Group subjects. + +--- + +##### `namespace`Optional + +```python +namespace: str +``` + +- *Type:* `str` + +Namespace of the referenced object. + +If the object kind is non-namespace, +such as "User" or "Group", and this value is not empty the Authorizer +should report an error. + +--- + +### Sysctl + +Sysctl defines a kernel parameter to be set. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Sysctl( + name: str, + value: str +) +``` + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +Name of a property to set. + +--- + +##### `value`Required + +```python +value: str +``` + +- *Type:* `str` + +Value of a property to set. + +--- + +### TcpSocketProbeOptions + +Options for `Probe.fromTcpSocket()`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.TcpSocketProbeOptions( + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None, + host: str = None, + port: typing.Union[int, float] = None +) +``` + +##### `failure_threshold`Optional + +```python +failure_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initial_delay_seconds`Optional + +```python +initial_delay_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `period_seconds`Optional + +```python +period_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `success_threshold`Optional + +```python +success_threshold: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeout_seconds`Optional + +```python +timeout_seconds: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `host`Optional + +```python +host: str +``` + +- *Type:* `str` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +##### `port`Optional + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + +### TlsSecretProps + +Options for `TlsSecret`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.TlsSecretProps( + metadata: ApiObjectMetadata = None, + immutable: bool = None, + tls_cert: str, + tls_key: str +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```python +immutable: bool +``` + +- *Type:* `bool` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `tls_cert`Required + +```python +tls_cert: str +``` + +- *Type:* `str` + +The TLS cert. + +--- + +##### `tls_key`Required + +```python +tls_key: str +``` + +- *Type:* `str` + +The TLS key. + +--- + +### VolumeMount + +Mount a volume from the pod to the container. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.VolumeMount( + propagation: MountPropagation = None, + read_only: bool = None, + sub_path: str = None, + sub_path_expr: str = None, + path: str, + volume: Volume +) +``` + +##### `propagation`Optional + +```python +propagation: MountPropagation +``` + +- *Type:* [`cdk8s_plus_27.MountPropagation`](#cdk8s_plus_27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +##### `read_only`Optional + +```python +read_only: bool +``` + +- *Type:* `bool` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +##### `sub_path`Optional + +```python +sub_path: str +``` + +- *Type:* `str` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +##### `sub_path_expr`Optional + +```python +sub_path_expr: str +``` + +- *Type:* `str` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + +##### `path`Required + +```python +path: str +``` + +- *Type:* `str` + +Path within the container at which the volume should be mounted. + +Must not +contain ':'. + +--- + +##### `volume`Required + +```python +volume: Volume +``` + +- *Type:* [`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume) + +The volume to mount. + +--- + +### WorkloadProps + +Properties for `Workload`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.WorkloadProps( + metadata: ApiObjectMetadata = None, + automount_service_account_token: bool = None, + containers: typing.List[ContainerProps] = None, + dns: PodDnsProps = None, + docker_registry_auth: ISecret = None, + host_aliases: typing.List[HostAlias] = None, + host_network: bool = None, + init_containers: typing.List[ContainerProps] = None, + isolate: bool = None, + restart_policy: RestartPolicy = None, + security_context: PodSecurityContextProps = None, + service_account: IServiceAccount = None, + termination_grace_period: Duration = None, + volumes: typing.List[Volume] = None, + pod_metadata: ApiObjectMetadata = None, + select: bool = None, + spread: bool = None +) +``` + +##### `metadata`Optional + +```python +metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automount_service_account_token`Optional + +```python +automount_service_account_token: bool +``` + +- *Type:* `bool` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```python +containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```python +dns: PodDnsProps +``` + +- *Type:* [`cdk8s_plus_27.PodDnsProps`](#cdk8s_plus_27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `docker_registry_auth`Optional + +```python +docker_registry_auth: ISecret +``` + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `host_aliases`Optional + +```python +host_aliases: typing.List[HostAlias] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.HostAlias`](#cdk8s_plus_27.HostAlias)] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `host_network`Optional + +```python +host_network: bool +``` + +- *Type:* `bool` +- *Default:* false + +Host network for the pod. + +--- + +##### `init_containers`Optional + +```python +init_containers: typing.List[ContainerProps] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerProps`](#cdk8s_plus_27.ContainerProps)] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```python +isolate: bool +``` + +- *Type:* `bool` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restart_policy`Optional + +```python +restart_policy: RestartPolicy +``` + +- *Type:* [`cdk8s_plus_27.RestartPolicy`](#cdk8s_plus_27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `security_context`Optional + +```python +security_context: PodSecurityContextProps +``` + +- *Type:* [`cdk8s_plus_27.PodSecurityContextProps`](#cdk8s_plus_27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `service_account`Optional + +```python +service_account: IServiceAccount +``` + +- *Type:* [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `termination_grace_period`Optional + +```python +termination_grace_period: Duration +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```python +volumes: typing.List[Volume] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume)] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `pod_metadata`Optional + +```python +pod_metadata: ApiObjectMetadata +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```python +select: bool +``` + +- *Type:* `bool` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```python +spread: bool +``` + +- *Type:* `bool` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +### WorkloadSchedulingSpreadOptions + +Options for `WorkloadScheduling.spread`. + +#### Initializer + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.WorkloadSchedulingSpreadOptions( + topology: Topology = None, + weight: typing.Union[int, float] = None +) +``` + +##### `topology`Optional + +```python +topology: Topology +``` + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to spread on. + +--- + +##### `weight`Optional + +```python +weight: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. spread is assumed to be required. + +Indicates the spread is optional, with this weight score. + +--- + +## Classes + +### ApiResource + +- *Implements:* [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource), [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +Represents information about an API resource type. + +#### Methods + +##### `as_api_resource` + +```python +def as_api_resource() +``` + +##### `as_non_api_resource` + +```python +def as_non_api_resource() +``` + +#### Static Functions + +##### `custom` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ApiResource.custom( + api_group: str, + resource_type: str +) +``` + +###### `api_group`Required + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +###### `resource_type`Required + +- *Type:* `str` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +#### Properties + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +#### Constants + +##### `API_SERVICES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for APIService. + +--- + +##### `BINDINGS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Binding. + +--- + +##### `CERTIFICATE_SIGNING_REQUESTS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for CertificateSigningRequest. + +--- + +##### `CLUSTER_ROLE_BINDINGS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ClusterRoleBinding. + +--- + +##### `CLUSTER_ROLES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ClusterRole. + +--- + +##### `COMPONENT_STATUSES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ComponentStatus. + +--- + +##### `CONFIG_MAPS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ConfigMap. + +--- + +##### `CONTROLLER_REVISIONS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ControllerRevision. + +--- + +##### `CRON_JOBS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for CronJob. + +--- + +##### `CSI_DRIVERS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for CSIDriver. + +--- + +##### `CSI_NODES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for CSINode. + +--- + +##### `CSI_STORAGE_CAPACITIES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for CSIStorageCapacity. + +--- + +##### `CUSTOM_RESOURCE_DEFINITIONS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for CustomResourceDefinition. + +--- + +##### `DAEMON_SETS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for DaemonSet. + +--- + +##### `DEPLOYMENTS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Deployment. + +--- + +##### `ENDPOINT_SLICES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for EndpointSlice. + +--- + +##### `ENDPOINTS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Endpoints. + +--- + +##### `EVENTS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Event. + +--- + +##### `FLOW_SCHEMAS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for FlowSchema. + +--- + +##### `HORIZONTAL_POD_AUTOSCALERS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for HorizontalPodAutoscaler. + +--- + +##### `INGRESS_CLASSES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for IngressClass. + +--- + +##### `INGRESSES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Ingress. + +--- + +##### `JOBS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Job. + +--- + +##### `LEASES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Lease. + +--- + +##### `LIMIT_RANGES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for LimitRange. + +--- + +##### `LOCAL_SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for LocalSubjectAccessReview. + +--- + +##### `MUTATING_WEBHOOK_CONFIGURATIONS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for MutatingWebhookConfiguration. + +--- + +##### `NAMESPACES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Namespace. + +--- + +##### `NETWORK_POLICIES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for NetworkPolicy. + +--- + +##### `NODES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Node. + +--- + +##### `PERSISTENT_VOLUME_CLAIMS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for PersistentVolumeClaim. + +--- + +##### `PERSISTENT_VOLUMES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for PersistentVolume. + +--- + +##### `POD_DISRUPTION_BUDGETS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for PodDisruptionBudget. + +--- + +##### `POD_TEMPLATES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for PodTemplate. + +--- + +##### `PODS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Pod. + +--- + +##### `PRIORITY_CLASSES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for PriorityClass. + +--- + +##### `PRIORITY_LEVEL_CONFIGURATIONS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for PriorityLevelConfiguration. + +--- + +##### `REPLICA_SETS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ReplicaSet. + +--- + +##### `REPLICATION_CONTROLLERS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ReplicationController. + +--- + +##### `RESOURCE_QUOTAS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ResourceQuota. + +--- + +##### `ROLE_BINDINGS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for RoleBinding. + +--- + +##### `ROLES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Role. + +--- + +##### `RUNTIME_CLASSES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for RuntimeClass. + +--- + +##### `SECRETS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Secret. + +--- + +##### `SELF_SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for SelfSubjectAccessReview. + +--- + +##### `SELF_SUBJECT_RULES_REVIEWS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for SelfSubjectRulesReview. + +--- + +##### `SERVICE_ACCOUNTS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ServiceAccount. + +--- + +##### `SERVICES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for Service. + +--- + +##### `STATEFUL_SETS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for StatefulSet. + +--- + +##### `STORAGE_CLASSES` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for StorageClass. + +--- + +##### `SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for SubjectAccessReview. + +--- + +##### `TOKEN_REVIEWS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for TokenReview. + +--- + +##### `VALIDATING_WEBHOOK_CONFIGURATIONS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for ValidatingWebhookConfiguration. + +--- + +##### `VOLUME_ATTACHMENTS` + +- *Type:* [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource) + +API resource information for VolumeAttachment. + +--- + +### Container + +A single application container that you want to run within a pod. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Container( + args: typing.List[str] = None, + command: typing.List[str] = None, + env_from: typing.List[EnvFrom] = None, + env_variables: typing.Mapping[EnvValue] = None, + image_pull_policy: ImagePullPolicy = None, + lifecycle: ContainerLifecycle = None, + liveness: Probe = None, + name: str = None, + port: typing.Union[int, float] = None, + port_number: typing.Union[int, float] = None, + ports: typing.List[ContainerPort] = None, + readiness: Probe = None, + resources: ContainerResources = None, + security_context: ContainerSecurityContextProps = None, + startup: Probe = None, + volume_mounts: typing.List[VolumeMount] = None, + working_dir: str = None, + image: str +) +``` + +##### `args`Optional + +- *Type:* typing.List[`str`] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +- *Type:* typing.List[`str`] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `env_from`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `env_variables`Optional + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `image_pull_policy`Optional + +- *Type:* [`cdk8s_plus_27.ImagePullPolicy`](#cdk8s_plus_27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +- *Type:* [`cdk8s_plus_27.ContainerLifecycle`](#cdk8s_plus_27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +- *Type:* `str` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +- *Type:* `typing.Union[int, float]` + +--- + +##### `port_number`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerPort`](#cdk8s_plus_27.ContainerPort)] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +- *Type:* [`cdk8s_plus_27.ContainerResources`](#cdk8s_plus_27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `security_context`Optional + +- *Type:* [`cdk8s_plus_27.ContainerSecurityContextProps`](#cdk8s_plus_27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +- *Type:* [`cdk8s_plus_27.Probe`](#cdk8s_plus_27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volume_mounts`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.VolumeMount`](#cdk8s_plus_27.VolumeMount)] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `working_dir`Optional + +- *Type:* `str` +- *Default:* The container runtime's default. + +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. + +--- + +##### `image`Required + +- *Type:* `str` + +Docker image name. + +--- + +#### Methods + +##### `add_port` + +```python +def add_port( + number: typing.Union[int, float], + host_ip: str = None, + host_port: typing.Union[int, float] = None, + name: str = None, + protocol: Protocol = None +) +``` + +###### `number`Required + +- *Type:* `typing.Union[int, float]` + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +--- + +###### `host_ip`Optional + +- *Type:* `str` +- *Default:* 127.0.0.1. + +What host IP to bind the external port to. + +--- + +###### `host_port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* auto generated by kubernetes and might change on restarts. + +Number of port to expose on the host. + +If specified, this must be a valid port number, 0 < x < 65536. +Most containers do not need this. + +--- + +###### `name`Optional + +- *Type:* `str` +- *Default:* port is not named. + +If specified, this must be an IANA_SVC_NAME and unique within the pod. + +Each named port in a pod must have a unique name. +Name for the port that can be referred to by services. + +--- + +###### `protocol`Optional + +- *Type:* [`cdk8s_plus_27.Protocol`](#cdk8s_plus_27.Protocol) +- *Default:* Protocol.TCP + +Protocol for port. + +Must be UDP, TCP, or SCTP. Defaults to "TCP". + +--- + +##### `mount` + +```python +def mount( + path: str, + storage: IStorage, + propagation: MountPropagation = None, + read_only: bool = None, + sub_path: str = None, + sub_path_expr: str = None +) +``` + +###### `path`Required + +- *Type:* `str` + +The desired path in the container. + +--- + +###### `storage`Required + +- *Type:* [`cdk8s_plus_27.IStorage`](#cdk8s_plus_27.IStorage) + +The storage to mount. + +--- + +###### `propagation`Optional + +- *Type:* [`cdk8s_plus_27.MountPropagation`](#cdk8s_plus_27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +###### `read_only`Optional + +- *Type:* `bool` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +###### `sub_path`Optional + +- *Type:* `str` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +###### `sub_path_expr`Optional + +- *Type:* `str` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + + +#### Properties + +##### `env`Required + +```python +env: Env +``` + +- *Type:* [`cdk8s_plus_27.Env`](#cdk8s_plus_27.Env) + +The environment of the container. + +--- + +##### `image`Required + +```python +image: str +``` + +- *Type:* `str` + +The container image. + +--- + +##### `image_pull_policy`Required + +```python +image_pull_policy: ImagePullPolicy +``` + +- *Type:* [`cdk8s_plus_27.ImagePullPolicy`](#cdk8s_plus_27.ImagePullPolicy) + +Image pull policy for this container. + +--- + +##### `mounts`Required + +```python +mounts: typing.List[VolumeMount] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.VolumeMount`](#cdk8s_plus_27.VolumeMount)] + +Volume mounts configured for this container. + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The name of the container. + +--- + +##### `ports`Required + +```python +ports: typing.List[ContainerPort] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.ContainerPort`](#cdk8s_plus_27.ContainerPort)] + +Ports exposed by this containers. + +Returns a copy, use `addPort` to modify. + +--- + +##### `security_context`Required + +```python +security_context: ContainerSecurityContext +``` + +- *Type:* [`cdk8s_plus_27.ContainerSecurityContext`](#cdk8s_plus_27.ContainerSecurityContext) + +The security context of the container. + +--- + +##### `args`Optional + +```python +args: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Arguments to the entrypoint. + +--- + +##### `command`Optional + +```python +command: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Entrypoint array (the command to execute when the container starts). + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```python +port: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `port_number`Optional + +```python +port_number: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +The port number that was configured for this container. + +If undefined, either the container doesn't expose a port, or its +port configuration is stored in the `ports` field. + +--- + +##### `resources`Optional + +```python +resources: ContainerResources +``` + +- *Type:* [`cdk8s_plus_27.ContainerResources`](#cdk8s_plus_27.ContainerResources) + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `working_dir`Optional + +```python +working_dir: str +``` + +- *Type:* `str` + +The working directory inside the container. + +--- + + +### ContainerSecurityContext + +Container security attributes and settings. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ContainerSecurityContext( + allow_privilege_escalation: bool = None, + ensure_non_root: bool = None, + group: typing.Union[int, float] = None, + privileged: bool = None, + read_only_root_filesystem: bool = None, + user: typing.Union[int, float] = None +) +``` + +##### `allow_privilege_escalation`Optional + +- *Type:* `bool` +- *Default:* false + +Whether a process can gain more privileges than its parent process. + +--- + +##### `ensure_non_root`Optional + +- *Type:* `bool` +- *Default:* true + +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. + +--- + +##### `group`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 26000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The GID to run the entrypoint of the container process. + +--- + +##### `privileged`Optional + +- *Type:* `bool` +- *Default:* false + +Run container in privileged mode. + +Processes in privileged containers are essentially equivalent to root on the host. + +--- + +##### `read_only_root_filesystem`Optional + +- *Type:* `bool` +- *Default:* true + +Whether this container has a read-only root filesystem. + +--- + +##### `user`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 25000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The UID to run the entrypoint of the container process. + +--- + + + +#### Properties + +##### `ensure_non_root`Required + +```python +ensure_non_root: bool +``` + +- *Type:* `bool` + +--- + +##### `privileged`Required + +```python +privileged: bool +``` + +- *Type:* `bool` + +--- + +##### `read_only_root_filesystem`Required + +```python +read_only_root_filesystem: bool +``` + +- *Type:* `bool` + +--- + +##### `allow_privilege_escalation`Optional + +```python +allow_privilege_escalation: bool +``` + +- *Type:* `bool` + +--- + +##### `group`Optional + +```python +group: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `user`Optional + +```python +user: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + + +### Cpu + +Represents the amount of CPU. + +The amount can be passed as millis or units. + + +#### Static Functions + +##### `millis` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Cpu.millis( + amount: typing.Union[int, float] +) +``` + +###### `amount`Required + +- *Type:* `typing.Union[int, float]` + +--- + +##### `units` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Cpu.units( + amount: typing.Union[int, float] +) +``` + +###### `amount`Required + +- *Type:* `typing.Union[int, float]` + +--- + +#### Properties + +##### `amount`Required + +```python +amount: str +``` + +- *Type:* `str` + +--- + + +### DeploymentStrategy + +Deployment strategies. + + +#### Static Functions + +##### `recreate` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DeploymentStrategy.recreate() +``` + +##### `rolling_update` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.DeploymentStrategy.rolling_update( + max_surge: PercentOrAbsolute = None, + max_unavailable: PercentOrAbsolute = None +) +``` + +###### `max_surge`Optional + +- *Type:* [`cdk8s_plus_27.PercentOrAbsolute`](#cdk8s_plus_27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be scheduled above the desired number of pods. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding up. +This can not be 0 if `maxUnavailable` is 0. + +Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update +starts, such that the total number of old and new pods do not exceed 130% of desired pods. +Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that +total number of pods running at any time during the update is at most 130% of desired pods. + +--- + +###### `max_unavailable`Optional + +- *Type:* [`cdk8s_plus_27.PercentOrAbsolute`](#cdk8s_plus_27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be unavailable during the update. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding down. +This can not be 0 if `maxSurge` is 0. + +Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired +pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can +be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total +number of pods available at all times during the update is at least 70% of desired pods. + +--- + + + +### Env + +Container environment variables. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Env( + sources: typing.List[EnvFrom], + variables: typing.Mapping[EnvValue] +) +``` + +##### `sources`Required + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] + +--- + +##### `variables`Required + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] + +--- + +#### Methods + +##### `add_variable` + +```python +def add_variable( + name: str, + value: EnvValue +) +``` + +###### `name`Required + +- *Type:* `str` + +--- + +###### `value`Required + +- *Type:* [`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue) + +--- + +##### `copy_from` + +```python +def copy_from( + from: EnvFrom +) +``` + +###### `from`Required + +- *Type:* [`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom) + +--- + +#### Static Functions + +##### `from_config_map` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Env.from_config_map( + config_map: IConfigMap, + prefix: str = None +) +``` + +###### `config_map`Required + +- *Type:* [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap) + +--- + +###### `prefix`Optional + +- *Type:* `str` + +--- + +##### `from_secret` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Env.from_secret( + secr: ISecret +) +``` + +###### `secr`Required + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +--- + +#### Properties + +##### `sources`Required + +```python +sources: typing.List[EnvFrom] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.EnvFrom`](#cdk8s_plus_27.EnvFrom)] + +The list of sources used to populate the container environment, in addition to the `variables`. + +Returns a copy. To add a source use `container.env.copyFrom()`. + +--- + +##### `variables`Required + +```python +variables: typing.Mapping[EnvValue] +``` + +- *Type:* typing.Mapping[[`cdk8s_plus_27.EnvValue`](#cdk8s_plus_27.EnvValue)] + +The environment variables for this container. + +Returns a copy. To add environment variables use `container.env.addVariable()`. + +--- + + +### EnvFrom + +A collection of env variables defined in other resources. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvFrom( + config_map: IConfigMap = None, + prefix: str = None, + sec: ISecret = None +) +``` + +##### `config_map`Optional + +- *Type:* [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap) + +--- + +##### `prefix`Optional + +- *Type:* `str` + +--- + +##### `sec`Optional + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +--- + + + + + +### EnvValue + +Utility class for creating reading env values from various sources. + + +#### Static Functions + +##### `from_config_map` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValue.from_config_map( + config_map: IConfigMap, + key: str, + optional: bool = None +) +``` + +###### `config_map`Required + +- *Type:* [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap) + +The config map. + +--- + +###### `key`Required + +- *Type:* `str` + +The key to extract the value from. + +--- + +###### `optional`Optional + +- *Type:* `bool` +- *Default:* false + +Specify whether the ConfigMap or its key must be defined. + +--- + +##### `from_field_ref` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValue.from_field_ref( + field_path: EnvFieldPaths, + api_version: str = None, + key: str = None +) +``` + +###### `field_path`Required + +- *Type:* [`cdk8s_plus_27.EnvFieldPaths`](#cdk8s_plus_27.EnvFieldPaths) + +: The field reference. + +--- + +###### `api_version`Optional + +- *Type:* `str` + +Version of the schema the FieldPath is written in terms of. + +--- + +###### `key`Optional + +- *Type:* `str` + +The key to select the pod label or annotation. + +--- + +##### `from_process` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValue.from_process( + key: str, + required: bool = None +) +``` + +###### `key`Required + +- *Type:* `str` + +The key to read. + +--- + +###### `required`Optional + +- *Type:* `bool` +- *Default:* false + +Specify whether the key must exist in the environment. + +If this is set to true, and the key does not exist, an error will thrown. + +--- + +##### `from_resource` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValue.from_resource( + resource: ResourceFieldPaths, + container: Container = None, + divisor: str = None +) +``` + +###### `resource`Required + +- *Type:* [`cdk8s_plus_27.ResourceFieldPaths`](#cdk8s_plus_27.ResourceFieldPaths) + +: Resource to select the value from. + +--- + +###### `container`Optional + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +The container to select the value from. + +--- + +###### `divisor`Optional + +- *Type:* `str` + +The output format of the exposed resource. + +--- + +##### `from_secret_value` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValue.from_secret_value( + key: str, + secret: ISecret, + optional: bool = None +) +``` + +###### `key`Required + +- *Type:* `str` + +The JSON key. + +--- + +###### `secret`Required + +- *Type:* [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +The secret. + +--- + +###### `optional`Optional + +- *Type:* `bool` +- *Default:* false + +Specify whether the Secret or its key must be defined. + +--- + +##### `from_value` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.EnvValue.from_value( + value: str +) +``` + +###### `value`Required + +- *Type:* `str` + +The value. + +--- + +#### Properties + +##### `value`Optional + +```python +value: typing.Any +``` + +- *Type:* `typing.Any` + +--- + +##### `value_from`Optional + +```python +value_from: typing.Any +``` + +- *Type:* `typing.Any` + +--- + + +### Handler + +Defines a specific action that should be taken. + + +#### Static Functions + +##### `from_command` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Handler.from_command( + command: typing.List[str] +) +``` + +###### `command`Required + +- *Type:* typing.List[`str`] + +The command to execute. + +--- + +##### `from_http_get` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Handler.from_http_get( + path: str, + port: typing.Union[int, float] = None +) +``` + +###### `path`Required + +- *Type:* `str` + +The URL path to hit. + +--- + +###### `port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +##### `from_tcp_socket` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Handler.from_tcp_socket( + host: str = None, + port: typing.Union[int, float] = None +) +``` + +###### `host`Optional + +- *Type:* `str` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +###### `port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + + + +### IngressBackend + +The backend for an ingress path. + + +#### Static Functions + +##### `from_resource` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.IngressBackend.from_resource( + resource: IResource +) +``` + +###### `resource`Required + +- *Type:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +--- + +##### `from_service` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.IngressBackend.from_service( + serv: Service, + port: typing.Union[int, float] = None +) +``` + +###### `serv`Required + +- *Type:* [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service) + +The service object. + +--- + +###### `port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* if the service exposes a single port, this port will be used. + +The port to use to access the service. + +* This option will fail if the service does not expose any ports. +* If the service exposes multiple ports, this option must be specified. +* If the service exposes a single port, this option is optional and if + specified, it must be the same port exposed by the service. + +--- + + + +### LabeledNode + +A node that is matched by label selectors. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabeledNode( + label_selector: typing.List[NodeLabelQuery] +) +``` + +##### `label_selector`Required + +- *Type:* typing.List[[`cdk8s_plus_27.NodeLabelQuery`](#cdk8s_plus_27.NodeLabelQuery)] + +--- + + + +#### Properties + +##### `label_selector`Required + +```python +label_selector: typing.List[NodeLabelQuery] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NodeLabelQuery`](#cdk8s_plus_27.NodeLabelQuery)] + +--- + + +### LabelExpression + +Represents a query that can be performed against resources with labels. + + +#### Static Functions + +##### `does_not_exist` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelExpression.does_not_exist( + key: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +##### `exists` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelExpression.exists( + key: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +##### `in` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelExpression.in( + key: str, + values: typing.List[str] +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `values`Required + +- *Type:* typing.List[`str`] + +--- + +##### `not_in` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelExpression.not_in( + key: str, + values: typing.List[str] +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `values`Required + +- *Type:* typing.List[`str`] + +--- + +#### Properties + +##### `key`Required + +```python +key: str +``` + +- *Type:* `str` + +--- + +##### `operator`Required + +```python +operator: str +``` + +- *Type:* `str` + +--- + +##### `values`Optional + +```python +values: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +--- + + +### LabelSelector + +Match a resource by labels. + +#### Methods + +##### `is_empty` + +```python +def is_empty() +``` + +#### Static Functions + +##### `of` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.LabelSelector.of( + expressions: typing.List[LabelExpression] = None, + labels: typing.Mapping[str] = None +) +``` + +###### `expressions`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.LabelExpression`](#cdk8s_plus_27.LabelExpression)] + +Expression based label matchers. + +--- + +###### `labels`Optional + +- *Type:* typing.Mapping[`str`] + +Strict label matchers. + +--- + + + +### Metric + +A metric condition that HorizontalPodAutoscaler's scale on. + + +#### Static Functions + +##### `container_cpu` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.container_cpu( + container: Container, + target: MetricTarget +) +``` + +###### `container`Required + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +Container where the metric can be found. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +##### `container_ephemeral_storage` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.container_ephemeral_storage( + container: Container, + target: MetricTarget +) +``` + +###### `container`Required + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +Container where the metric can be found. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +##### `container_memory` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.container_memory( + container: Container, + target: MetricTarget +) +``` + +###### `container`Required + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +Container where the metric can be found. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +##### `container_storage` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.container_storage( + container: Container, + target: MetricTarget +) +``` + +###### `container`Required + +- *Type:* [`cdk8s_plus_27.Container`](#cdk8s_plus_27.Container) + +Container where the metric can be found. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +##### `external` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.external( + name: str, + target: MetricTarget, + label_selector: LabelSelector = None +) +``` + +###### `name`Required + +- *Type:* `str` + +The name of the metric to scale on. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +###### `label_selector`Optional + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +##### `object` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.object( + name: str, + target: MetricTarget, + label_selector: LabelSelector = None, + object: IResource +) +``` + +###### `name`Required + +- *Type:* `str` + +The name of the metric to scale on. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +###### `label_selector`Optional + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +###### `object`Required + +- *Type:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +Resource where the metric can be found. + +--- + +##### `pods` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.pods( + name: str, + target: MetricTarget, + label_selector: LabelSelector = None +) +``` + +###### `name`Required + +- *Type:* `str` + +The name of the metric to scale on. + +--- + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +###### `label_selector`Optional + +- *Type:* [`cdk8s_plus_27.LabelSelector`](#cdk8s_plus_27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +##### `resource_cpu` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.resource_cpu( + target: MetricTarget +) +``` + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +--- + +##### `resource_ephemeral_storage` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.resource_ephemeral_storage( + target: MetricTarget +) +``` + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +--- + +##### `resource_memory` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.resource_memory( + target: MetricTarget +) +``` + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +--- + +##### `resource_storage` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Metric.resource_storage( + target: MetricTarget +) +``` + +###### `target`Required + +- *Type:* [`cdk8s_plus_27.MetricTarget`](#cdk8s_plus_27.MetricTarget) + +--- + +#### Properties + +##### `type`Required + +```python +type: str +``` + +- *Type:* `str` + +--- + + +### MetricTarget + +A metric condition that will trigger scaling behavior when satisfied. + + +#### Static Functions + +##### `average_utilization` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MetricTarget.average_utilization( + average_utilization: typing.Union[int, float] +) +``` + +###### `average_utilization`Required + +- *Type:* `typing.Union[int, float]` + +The percentage of the utilization metric. + +e.g. `50` for 50%. + +--- + +##### `average_value` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MetricTarget.average_value( + average_value: typing.Union[int, float] +) +``` + +###### `average_value`Required + +- *Type:* `typing.Union[int, float]` + +The average metric value. + +--- + +##### `value` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.MetricTarget.value( + value: typing.Union[int, float] +) +``` + +###### `value`Required + +- *Type:* `typing.Union[int, float]` + +The target value. + +--- + + + +### NamedNode + +A node that is matched by its name. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NamedNode( + name: str +) +``` + +##### `name`Required + +- *Type:* `str` + +--- + + + +#### Properties + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +--- + + +### NetworkPolicyPort + +Describes a port to allow traffic on. + + +#### Static Functions + +##### `all_tcp` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.all_tcp() +``` + +##### `all_udp` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.all_udp() +``` + +##### `of` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.of( + end_port: typing.Union[int, float] = None, + port: typing.Union[int, float] = None, + protocol: NetworkProtocol = None +) +``` + +###### `end_port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* not a port range. + +End port (relative to `port`). + +Only applies if `port` is defined. +Use this to specify a port range, rather that a specific one. + +--- + +###### `port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* all ports are allowed. + +Specific port number. + +--- + +###### `protocol`Optional + +- *Type:* [`cdk8s_plus_27.NetworkProtocol`](#cdk8s_plus_27.NetworkProtocol) +- *Default:* NetworkProtocol.TCP + +Protocol. + +--- + +##### `tcp` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.tcp( + port: typing.Union[int, float] +) +``` + +###### `port`Required + +- *Type:* `typing.Union[int, float]` + +--- + +##### `tcp_range` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.tcp_range( + start_port: typing.Union[int, float], + end_port: typing.Union[int, float] +) +``` + +###### `start_port`Required + +- *Type:* `typing.Union[int, float]` + +--- + +###### `end_port`Required + +- *Type:* `typing.Union[int, float]` + +--- + +##### `udp` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.udp( + port: typing.Union[int, float] +) +``` + +###### `port`Required + +- *Type:* `typing.Union[int, float]` + +--- + +##### `udp_range` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NetworkPolicyPort.udp_range( + start_port: typing.Union[int, float], + end_port: typing.Union[int, float] +) +``` + +###### `start_port`Required + +- *Type:* `typing.Union[int, float]` + +--- + +###### `end_port`Required + +- *Type:* `typing.Union[int, float]` + +--- + + + +### Node + +Represents a node in the cluster. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Node() +``` + + +#### Static Functions + +##### `labeled` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Node.labeled( + label_selector: NodeLabelQuery +) +``` + +###### `label_selector`Required + +- *Type:* [`cdk8s_plus_27.NodeLabelQuery`](#cdk8s_plus_27.NodeLabelQuery) + +--- + +##### `named` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Node.named( + node_name: str +) +``` + +###### `node_name`Required + +- *Type:* `str` + +--- + +##### `tainted` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Node.tainted( + taint_selector: NodeTaintQuery +) +``` + +###### `taint_selector`Required + +- *Type:* [`cdk8s_plus_27.NodeTaintQuery`](#cdk8s_plus_27.NodeTaintQuery) + +--- + + + +### NodeLabelQuery + +Represents a query that can be performed against nodes with labels. + + +#### Static Functions + +##### `does_not_exist` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.does_not_exist( + key: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +##### `exists` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.exists( + key: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +##### `gt` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.gt( + key: str, + values: typing.List[str] +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `values`Required + +- *Type:* typing.List[`str`] + +--- + +##### `in` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.in( + key: str, + values: typing.List[str] +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `values`Required + +- *Type:* typing.List[`str`] + +--- + +##### `is` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.is( + key: str, + value: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `value`Required + +- *Type:* `str` + +--- + +##### `lt` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.lt( + key: str, + values: typing.List[str] +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `values`Required + +- *Type:* typing.List[`str`] + +--- + +##### `not_in` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeLabelQuery.not_in( + key: str, + values: typing.List[str] +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `values`Required + +- *Type:* typing.List[`str`] + +--- + + + +### NodeTaintQuery + +Taint queries that can be perfomed against nodes. + + +#### Static Functions + +##### `any` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeTaintQuery.any() +``` + +##### `exists` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeTaintQuery.exists( + key: str, + effect: TaintEffect = None, + evict_after: Duration = None +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `effect`Optional + +- *Type:* [`cdk8s_plus_27.TaintEffect`](#cdk8s_plus_27.TaintEffect) +- *Default:* all effects are matched. + +The taint effect to match. + +--- + +###### `evict_after`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* bound forever. + +How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. + +Only applies for the `NO_EXECUTE` effect. + +--- + +##### `is` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NodeTaintQuery.is( + key: str, + value: str, + effect: TaintEffect = None, + evict_after: Duration = None +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +###### `value`Required + +- *Type:* `str` + +--- + +###### `effect`Optional + +- *Type:* [`cdk8s_plus_27.TaintEffect`](#cdk8s_plus_27.TaintEffect) +- *Default:* all effects are matched. + +The taint effect to match. + +--- + +###### `evict_after`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* bound forever. + +How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. + +Only applies for the `NO_EXECUTE` effect. + +--- + + + +### NonApiResource + +- *Implements:* [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +Factory for creating non api resources. + +#### Methods + +##### `as_api_resource` + +```python +def as_api_resource() +``` + +##### `as_non_api_resource` + +```python +def as_non_api_resource() +``` + +#### Static Functions + +##### `of` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.NonApiResource.of( + url: str +) +``` + +###### `url`Required + +- *Type:* `str` + +--- + + + +### PercentOrAbsolute + +Union like class repsenting either a ration in percents or an absolute number. + +#### Methods + +##### `is_zero` + +```python +def is_zero() +``` + +#### Static Functions + +##### `absolute` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PercentOrAbsolute.absolute( + num: typing.Union[int, float] +) +``` + +###### `num`Required + +- *Type:* `typing.Union[int, float]` + +--- + +##### `percent` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PercentOrAbsolute.percent( + percent: typing.Union[int, float] +) +``` + +###### `percent`Required + +- *Type:* `typing.Union[int, float]` + +--- + +#### Properties + +##### `value`Required + +```python +value: typing.Any +``` + +- *Type:* `typing.Any` + +--- + + +### PodConnections + +Controls network isolation rules for inter-pod communication. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodConnections( + instance: AbstractPod +) +``` + +##### `instance`Required + +- *Type:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod) + +--- + +#### Methods + +##### `allow_from` + +```python +def allow_from( + peer: INetworkPolicyPeer, + isolation: PodConnectionsIsolation = None, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +###### `peer`Required + +- *Type:* [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +--- + +###### `isolation`Optional + +- *Type:* [`cdk8s_plus_27.PodConnectionsIsolation`](#cdk8s_plus_27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] +- *Default:* The pod ports. + +Ports to allow incoming traffic to. + +--- + +##### `allow_to` + +```python +def allow_to( + peer: INetworkPolicyPeer, + isolation: PodConnectionsIsolation = None, + ports: typing.List[NetworkPolicyPort] = None +) +``` + +###### `peer`Required + +- *Type:* [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +--- + +###### `isolation`Optional + +- *Type:* [`cdk8s_plus_27.PodConnectionsIsolation`](#cdk8s_plus_27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +###### `ports`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.NetworkPolicyPort`](#cdk8s_plus_27.NetworkPolicyPort)] +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports to allow outgoing traffic to. + +--- + +##### `isolate` + +```python +def isolate() +``` + + + + +### PodDns + +Holds dns settings of the pod. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodDns( + hostname: str = None, + hostname_as_fqd_n: bool = None, + nameservers: typing.List[str] = None, + options: typing.List[DnsOption] = None, + policy: DnsPolicy = None, + searches: typing.List[str] = None, + subdomain: str = None +) +``` + +##### `hostname`Optional + +- *Type:* `str` +- *Default:* Set to a system-defined value. + +Specifies the hostname of the Pod. + +--- + +##### `hostname_as_fqd_n`Optional + +- *Type:* `bool` +- *Default:* false + +If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + +In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). +In Windows containers, this means setting the registry value of hostname for the registry +key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. +If a pod does not have FQDN, this has no effect. + +--- + +##### `nameservers`Optional + +- *Type:* typing.List[`str`] + +A list of IP addresses that will be used as DNS servers for the Pod. + +There can be at most 3 IP addresses specified. +When the policy is set to "NONE", the list must contain at least one IP address, +otherwise this property is optional. +The servers listed will be combined to the base nameservers generated from +the specified DNS policy with duplicate addresses removed. + +--- + +##### `options`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.DnsOption`](#cdk8s_plus_27.DnsOption)] + +List of objects where each object may have a name property (required) and a value property (optional). + +The contents in this property +will be merged to the options generated from the specified DNS policy. +Duplicate entries are removed. + +--- + +##### `policy`Optional + +- *Type:* [`cdk8s_plus_27.DnsPolicy`](#cdk8s_plus_27.DnsPolicy) +- *Default:* DnsPolicy.CLUSTER_FIRST + +Set DNS policy for the pod. + +If policy is set to `None`, other configuration must be supplied. + +--- + +##### `searches`Optional + +- *Type:* typing.List[`str`] + +A list of DNS search domains for hostname lookup in the Pod. + +When specified, the provided list will be merged into the base +search domain names generated from the chosen DNS policy. +Duplicate domain names are removed. + +Kubernetes allows for at most 6 search domains. + +--- + +##### `subdomain`Optional + +- *Type:* `str` +- *Default:* No subdomain. + +If specified, the fully qualified Pod hostname will be "...svc.". + +--- + +#### Methods + +##### `add_nameserver` + +```python +def add_nameserver( + nameservers: str +) +``` + +###### `nameservers`Required + +- *Type:* `str` + +--- + +##### `add_option` + +```python +def add_option( + name: str, + value: str = None +) +``` + +###### `name`Required + +- *Type:* `str` + +Option name. + +--- + +###### `value`Optional + +- *Type:* `str` +- *Default:* No value. + +Option value. + +--- + +##### `add_search` + +```python +def add_search( + searches: str +) +``` + +###### `searches`Required + +- *Type:* `str` + +--- + + +#### Properties + +##### `hostname_as_fqd_n`Required + +```python +hostname_as_fqd_n: bool +``` + +- *Type:* `bool` + +Whether or not the pods hostname is set to its FQDN. + +--- + +##### `nameservers`Required + +```python +nameservers: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Nameservers defined for this pod. + +--- + +##### `options`Required + +```python +options: typing.List[DnsOption] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.DnsOption`](#cdk8s_plus_27.DnsOption)] + +Custom dns options defined for this pod. + +--- + +##### `policy`Required + +```python +policy: DnsPolicy +``` + +- *Type:* [`cdk8s_plus_27.DnsPolicy`](#cdk8s_plus_27.DnsPolicy) + +The DNS policy of this pod. + +--- + +##### `searches`Required + +```python +searches: typing.List[str] +``` + +- *Type:* typing.List[`str`] + +Search domains defined for this pod. + +--- + +##### `hostname`Optional + +```python +hostname: str +``` + +- *Type:* `str` + +The configured hostname of the pod. + +Undefined means its set to a system-defined value. + +--- + +##### `subdomain`Optional + +```python +subdomain: str +``` + +- *Type:* `str` + +The configured subdomain of the pod. + +--- + + +### PodScheduling + +Controls the pod scheduling strategy. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodScheduling( + instance: AbstractPod +) +``` + +##### `instance`Required + +- *Type:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod) + +--- + +#### Methods + +##### `assign` + +```python +def assign( + node: NamedNode +) +``` + +###### `node`Required + +- *Type:* [`cdk8s_plus_27.NamedNode`](#cdk8s_plus_27.NamedNode) + +--- + +##### `attract` + +```python +def attract( + node: LabeledNode, + weight: typing.Union[int, float] = None +) +``` + +###### `node`Required + +- *Type:* [`cdk8s_plus_27.LabeledNode`](#cdk8s_plus_27.LabeledNode) + +--- + +###### `weight`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. assignment is assumed to be required (hard). + +Indicates the attraction is optional (soft), with this weight score. + +--- + +##### `colocate` + +```python +def colocate( + selector: IPodSelector, + topology: Topology = None, + weight: typing.Union[int, float] = None +) +``` + +###### `selector`Required + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) + +--- + +###### `topology`Optional + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to coloate on. + +--- + +###### `weight`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. co-location is assumed to be required (hard). + +Indicates the co-location is optional (soft), with this weight score. + +--- + +##### `separate` + +```python +def separate( + selector: IPodSelector, + topology: Topology = None, + weight: typing.Union[int, float] = None +) +``` + +###### `selector`Required + +- *Type:* [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) + +--- + +###### `topology`Optional + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to separate on. + +--- + +###### `weight`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. separation is assumed to be required (hard). + +Indicates the separation is optional (soft), with this weight score. + +--- + +##### `tolerate` + +```python +def tolerate( + node: TaintedNode +) +``` + +###### `node`Required + +- *Type:* [`cdk8s_plus_27.TaintedNode`](#cdk8s_plus_27.TaintedNode) + +--- + + + + +### PodSecurityContext + +Holds pod-level security attributes and common container settings. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.PodSecurityContext( + ensure_non_root: bool = None, + fs_group: typing.Union[int, float] = None, + fs_group_change_policy: FsGroupChangePolicy = None, + group: typing.Union[int, float] = None, + sysctls: typing.List[Sysctl] = None, + user: typing.Union[int, float] = None +) +``` + +##### `ensure_non_root`Optional + +- *Type:* `bool` +- *Default:* true + +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. + +--- + +##### `fs_group`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* Volume ownership is not changed. + +Modify the ownership and permissions of pod volumes to this GID. + +--- + +##### `fs_group_change_policy`Optional + +- *Type:* [`cdk8s_plus_27.FsGroupChangePolicy`](#cdk8s_plus_27.FsGroupChangePolicy) +- *Default:* FsGroupChangePolicy.ALWAYS + +Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. + +This field will only apply to volume types which support fsGroup based ownership(and permissions). +It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. + +--- + +##### `group`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* Group configured by container runtime + +The GID to run the entrypoint of the container process. + +--- + +##### `sysctls`Optional + +- *Type:* typing.List[[`cdk8s_plus_27.Sysctl`](#cdk8s_plus_27.Sysctl)] +- *Default:* No sysctls + +Sysctls hold a list of namespaced sysctls used for the pod. + +Pods with unsupported sysctls (by the container runtime) might fail to launch. + +--- + +##### `user`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* User specified in image metadata + +The UID to run the entrypoint of the container process. + +--- + + + +#### Properties + +##### `ensure_non_root`Required + +```python +ensure_non_root: bool +``` + +- *Type:* `bool` + +--- + +##### `fs_group_change_policy`Required + +```python +fs_group_change_policy: FsGroupChangePolicy +``` + +- *Type:* [`cdk8s_plus_27.FsGroupChangePolicy`](#cdk8s_plus_27.FsGroupChangePolicy) + +--- + +##### `sysctls`Required + +```python +sysctls: typing.List[Sysctl] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.Sysctl`](#cdk8s_plus_27.Sysctl)] + +--- + +##### `fs_group`Optional + +```python +fs_group: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `group`Optional + +```python +group: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + +##### `user`Optional + +```python +user: typing.Union[int, float] +``` + +- *Type:* `typing.Union[int, float]` + +--- + + +### Probe + +Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. + + +#### Static Functions + +##### `from_command` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Probe.from_command( + command: typing.List[str], + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None +) +``` + +###### `command`Required + +- *Type:* typing.List[`str`] + +The command to execute. + +--- + +###### `failure_threshold`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +###### `initial_delay_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +###### `period_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +###### `success_threshold`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +###### `timeout_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `from_http_get` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Probe.from_http_get( + path: str, + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None, + port: typing.Union[int, float] = None, + scheme: ConnectionScheme = None +) +``` + +###### `path`Required + +- *Type:* `str` + +The URL path to hit. + +--- + +###### `failure_threshold`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +###### `initial_delay_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +###### `period_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +###### `success_threshold`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +###### `timeout_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +###### `port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +###### `scheme`Optional + +- *Type:* [`cdk8s_plus_27.ConnectionScheme`](#cdk8s_plus_27.ConnectionScheme) +- *Default:* ConnectionScheme.HTTP + +Scheme to use for connecting to the host (HTTP or HTTPS). + +--- + +##### `from_tcp_socket` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Probe.from_tcp_socket( + failure_threshold: typing.Union[int, float] = None, + initial_delay_seconds: Duration = None, + period_seconds: Duration = None, + success_threshold: typing.Union[int, float] = None, + timeout_seconds: Duration = None, + host: str = None, + port: typing.Union[int, float] = None +) +``` + +###### `failure_threshold`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +###### `initial_delay_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +###### `period_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +###### `success_threshold`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +###### `timeout_seconds`Optional + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +###### `host`Optional + +- *Type:* `str` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +###### `port`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + + + +### Replicas + +The amount of replicas that will change. + + +#### Static Functions + +##### `absolute` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Replicas.absolute( + value: typing.Union[int, float] +) +``` + +###### `value`Required + +- *Type:* `typing.Union[int, float]` + +The amount of change to apply. + +Must be greater than 0. + +--- + +##### `percent` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Replicas.percent( + value: typing.Union[int, float] +) +``` + +###### `value`Required + +- *Type:* `typing.Union[int, float]` + +The percentage of change to apply. + +Must be greater than 0. + +--- + + + +### ResourcePermissions + +Controls permissions for operations on resources. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.ResourcePermissions( + instance: Resource +) +``` + +##### `instance`Required + +- *Type:* [`cdk8s_plus_27.Resource`](#cdk8s_plus_27.Resource) + +--- + +#### Methods + +##### `grant_read` + +```python +def grant_read( + subjects: ISubject +) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +--- + +##### `grant_read_write` + +```python +def grant_read_write( + subjects: ISubject +) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +--- + + + + +### StatefulSetUpdateStrategy + +StatefulSet update strategies. + + +#### Static Functions + +##### `on_delete` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.StatefulSetUpdateStrategy.on_delete() +``` + +##### `rolling_update` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.StatefulSetUpdateStrategy.rolling_update( + partition: typing.Union[int, float] = None +) +``` + +###### `partition`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* 0 + +If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet's .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version. + +If the partition is greater than replicas, updates to the pod template will not be propagated to Pods. +In most cases you will not need to use a partition, but they are useful if you want to stage an +update, roll out a canary, or perform a phased roll out. + +> https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions + +--- + + + +### TaintedNode + +A node that is matched by taint selectors. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.TaintedNode( + taint_selector: typing.List[NodeTaintQuery] +) +``` + +##### `taint_selector`Required + +- *Type:* typing.List[[`cdk8s_plus_27.NodeTaintQuery`](#cdk8s_plus_27.NodeTaintQuery)] + +--- + + + +#### Properties + +##### `taint_selector`Required + +```python +taint_selector: typing.List[NodeTaintQuery] +``` + +- *Type:* typing.List[[`cdk8s_plus_27.NodeTaintQuery`](#cdk8s_plus_27.NodeTaintQuery)] + +--- + + +### Topology + +Available topology domains. + + +#### Static Functions + +##### `custom` + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.Topology.custom( + key: str +) +``` + +###### `key`Required + +- *Type:* `str` + +--- + +#### Properties + +##### `key`Required + +```python +key: str +``` + +- *Type:* `str` + +--- + +#### Constants + +##### `HOSTNAME` + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) + +A hostname represents a single node in the cluster. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetesiohostname + +--- + +##### `REGION` + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) + +A region represents a larger domain, made up of one or more zones. + +It is uncommon +for Kubernetes clusters to span multiple regions. While the exact definition of a +zone or region is left to infrastructure implementations, common properties of a region +include higher network latency between them than within them, non-zero cost for network +traffic between them, and failure independence from other zones or regions. + +For example, nodes within a region might share power infrastructure (e.g. a UPS or generator), but +nodes in different regions typically would not. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesioregion + +--- + +##### `ZONE` + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) + +A zone represents a logical failure domain. + +It is common for Kubernetes clusters to +span multiple zones for increased availability. While the exact definition of a zone is +left to infrastructure implementations, common properties of a zone include very low +network latency within a zone, no-cost network traffic within a zone, and failure +independence from other zones. For example, nodes within a zone might share a network +switch, but nodes in different zones should not. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesiozone + +--- + +### WorkloadScheduling + +Controls the pod scheduling strategy of this workload. + +It offers some additional API's on top of the core pod scheduling. + +#### Initializers + +```python +import cdk8s_plus_27 + +cdk8s_plus_27.WorkloadScheduling( + instance: AbstractPod +) +``` + +##### `instance`Required + +- *Type:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod) + +--- + +#### Methods + +##### `spread` + +```python +def spread( + topology: Topology = None, + weight: typing.Union[int, float] = None +) +``` + +###### `topology`Optional + +- *Type:* [`cdk8s_plus_27.Topology`](#cdk8s_plus_27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to spread on. + +--- + +###### `weight`Optional + +- *Type:* `typing.Union[int, float]` +- *Default:* no weight. spread is assumed to be required. + +Indicates the spread is optional, with this weight score. + +--- + + + + +## Protocols + +### IApiEndpoint + +- *Implemented By:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod), [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource), [`cdk8s_plus_27.AwsElasticBlockStorePersistentVolume`](#cdk8s_plus_27.AwsElasticBlockStorePersistentVolume), [`cdk8s_plus_27.AzureDiskPersistentVolume`](#cdk8s_plus_27.AzureDiskPersistentVolume), [`cdk8s_plus_27.BasicAuthSecret`](#cdk8s_plus_27.BasicAuthSecret), [`cdk8s_plus_27.ClusterRole`](#cdk8s_plus_27.ClusterRole), [`cdk8s_plus_27.ClusterRoleBinding`](#cdk8s_plus_27.ClusterRoleBinding), [`cdk8s_plus_27.ConfigMap`](#cdk8s_plus_27.ConfigMap), [`cdk8s_plus_27.CronJob`](#cdk8s_plus_27.CronJob), [`cdk8s_plus_27.DaemonSet`](#cdk8s_plus_27.DaemonSet), [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.DockerConfigSecret`](#cdk8s_plus_27.DockerConfigSecret), [`cdk8s_plus_27.GCEPersistentDiskPersistentVolume`](#cdk8s_plus_27.GCEPersistentDiskPersistentVolume), [`cdk8s_plus_27.HorizontalPodAutoscaler`](#cdk8s_plus_27.HorizontalPodAutoscaler), [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress), [`cdk8s_plus_27.Job`](#cdk8s_plus_27.Job), [`cdk8s_plus_27.Namespace`](#cdk8s_plus_27.Namespace), [`cdk8s_plus_27.NetworkPolicy`](#cdk8s_plus_27.NetworkPolicy), [`cdk8s_plus_27.NonApiResource`](#cdk8s_plus_27.NonApiResource), [`cdk8s_plus_27.PersistentVolume`](#cdk8s_plus_27.PersistentVolume), [`cdk8s_plus_27.PersistentVolumeClaim`](#cdk8s_plus_27.PersistentVolumeClaim), [`cdk8s_plus_27.Pod`](#cdk8s_plus_27.Pod), [`cdk8s_plus_27.Resource`](#cdk8s_plus_27.Resource), [`cdk8s_plus_27.Role`](#cdk8s_plus_27.Role), [`cdk8s_plus_27.RoleBinding`](#cdk8s_plus_27.RoleBinding), [`cdk8s_plus_27.Secret`](#cdk8s_plus_27.Secret), [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service), [`cdk8s_plus_27.ServiceAccount`](#cdk8s_plus_27.ServiceAccount), [`cdk8s_plus_27.ServiceAccountTokenSecret`](#cdk8s_plus_27.ServiceAccountTokenSecret), [`cdk8s_plus_27.SshAuthSecret`](#cdk8s_plus_27.SshAuthSecret), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.TlsSecret`](#cdk8s_plus_27.TlsSecret), [`cdk8s_plus_27.Workload`](#cdk8s_plus_27.Workload), [`cdk8s_plus_27.IApiEndpoint`](#cdk8s_plus_27.IApiEndpoint) + +An API Endpoint can either be a resource descriptor (e.g /pods) or a non resource url (e.g /healthz). It must be one or the other, and not both. + +#### Methods + +##### `as_api_resource` + +```python +def as_api_resource() +``` + +##### `as_non_api_resource` + +```python +def as_non_api_resource() +``` + + +### IApiResource + +- *Implemented By:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod), [`cdk8s_plus_27.ApiResource`](#cdk8s_plus_27.ApiResource), [`cdk8s_plus_27.AwsElasticBlockStorePersistentVolume`](#cdk8s_plus_27.AwsElasticBlockStorePersistentVolume), [`cdk8s_plus_27.AzureDiskPersistentVolume`](#cdk8s_plus_27.AzureDiskPersistentVolume), [`cdk8s_plus_27.BasicAuthSecret`](#cdk8s_plus_27.BasicAuthSecret), [`cdk8s_plus_27.ClusterRole`](#cdk8s_plus_27.ClusterRole), [`cdk8s_plus_27.ClusterRoleBinding`](#cdk8s_plus_27.ClusterRoleBinding), [`cdk8s_plus_27.ConfigMap`](#cdk8s_plus_27.ConfigMap), [`cdk8s_plus_27.CronJob`](#cdk8s_plus_27.CronJob), [`cdk8s_plus_27.DaemonSet`](#cdk8s_plus_27.DaemonSet), [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.DockerConfigSecret`](#cdk8s_plus_27.DockerConfigSecret), [`cdk8s_plus_27.GCEPersistentDiskPersistentVolume`](#cdk8s_plus_27.GCEPersistentDiskPersistentVolume), [`cdk8s_plus_27.HorizontalPodAutoscaler`](#cdk8s_plus_27.HorizontalPodAutoscaler), [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress), [`cdk8s_plus_27.Job`](#cdk8s_plus_27.Job), [`cdk8s_plus_27.Namespace`](#cdk8s_plus_27.Namespace), [`cdk8s_plus_27.NetworkPolicy`](#cdk8s_plus_27.NetworkPolicy), [`cdk8s_plus_27.PersistentVolume`](#cdk8s_plus_27.PersistentVolume), [`cdk8s_plus_27.PersistentVolumeClaim`](#cdk8s_plus_27.PersistentVolumeClaim), [`cdk8s_plus_27.Pod`](#cdk8s_plus_27.Pod), [`cdk8s_plus_27.Resource`](#cdk8s_plus_27.Resource), [`cdk8s_plus_27.Role`](#cdk8s_plus_27.Role), [`cdk8s_plus_27.RoleBinding`](#cdk8s_plus_27.RoleBinding), [`cdk8s_plus_27.Secret`](#cdk8s_plus_27.Secret), [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service), [`cdk8s_plus_27.ServiceAccount`](#cdk8s_plus_27.ServiceAccount), [`cdk8s_plus_27.ServiceAccountTokenSecret`](#cdk8s_plus_27.ServiceAccountTokenSecret), [`cdk8s_plus_27.SshAuthSecret`](#cdk8s_plus_27.SshAuthSecret), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.TlsSecret`](#cdk8s_plus_27.TlsSecret), [`cdk8s_plus_27.Workload`](#cdk8s_plus_27.Workload), [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource), [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole), [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap), [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume), [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim), [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource), [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole), [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret), [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) + +Represents a resource or collection of resources. + + +#### Properties + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +### IClusterRole + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +- *Implemented By:* [`cdk8s_plus_27.ClusterRole`](#cdk8s_plus_27.ClusterRole), [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole) + +Represents a cluster-level role. + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IConfigMap + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +- *Implemented By:* [`cdk8s_plus_27.ConfigMap`](#cdk8s_plus_27.ConfigMap), [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap) + +Represents a config map. + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### INamespaceSelector + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s_plus_27.Namespace`](#cdk8s_plus_27.Namespace), [`cdk8s_plus_27.Namespaces`](#cdk8s_plus_27.Namespaces), [`cdk8s_plus_27.INamespaceSelector`](#cdk8s_plus_27.INamespaceSelector) + +Represents an object that can select namespaces. + +#### Methods + +##### `to_namespace_selector_config` + +```python +def to_namespace_selector_config() +``` + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### INetworkPolicyPeer + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod), [`cdk8s_plus_27.CronJob`](#cdk8s_plus_27.CronJob), [`cdk8s_plus_27.DaemonSet`](#cdk8s_plus_27.DaemonSet), [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.Job`](#cdk8s_plus_27.Job), [`cdk8s_plus_27.Namespace`](#cdk8s_plus_27.Namespace), [`cdk8s_plus_27.Namespaces`](#cdk8s_plus_27.Namespaces), [`cdk8s_plus_27.NetworkPolicyIpBlock`](#cdk8s_plus_27.NetworkPolicyIpBlock), [`cdk8s_plus_27.Pod`](#cdk8s_plus_27.Pod), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.Workload`](#cdk8s_plus_27.Workload), [`cdk8s_plus_27.INetworkPolicyPeer`](#cdk8s_plus_27.INetworkPolicyPeer) + +Describes a peer to allow traffic to/from. + +#### Methods + +##### `to_network_policy_peer_config` + +```python +def to_network_policy_peer_config() +``` + +##### `to_pod_selector` + +```python +def to_pod_selector() +``` + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### IPersistentVolume + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +- *Implemented By:* [`cdk8s_plus_27.AwsElasticBlockStorePersistentVolume`](#cdk8s_plus_27.AwsElasticBlockStorePersistentVolume), [`cdk8s_plus_27.AzureDiskPersistentVolume`](#cdk8s_plus_27.AzureDiskPersistentVolume), [`cdk8s_plus_27.GCEPersistentDiskPersistentVolume`](#cdk8s_plus_27.GCEPersistentDiskPersistentVolume), [`cdk8s_plus_27.PersistentVolume`](#cdk8s_plus_27.PersistentVolume), [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume) + +Contract of a `PersistentVolumeClaim`. + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IPersistentVolumeClaim + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +- *Implemented By:* [`cdk8s_plus_27.PersistentVolumeClaim`](#cdk8s_plus_27.PersistentVolumeClaim), [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim) + +Contract of a `PersistentVolumeClaim`. + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IPodSelector + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod), [`cdk8s_plus_27.CronJob`](#cdk8s_plus_27.CronJob), [`cdk8s_plus_27.DaemonSet`](#cdk8s_plus_27.DaemonSet), [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.Job`](#cdk8s_plus_27.Job), [`cdk8s_plus_27.Pod`](#cdk8s_plus_27.Pod), [`cdk8s_plus_27.Pods`](#cdk8s_plus_27.Pods), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.Workload`](#cdk8s_plus_27.Workload), [`cdk8s_plus_27.IPodSelector`](#cdk8s_plus_27.IPodSelector) + +Represents an object that can select pods. + +#### Methods + +##### `to_pod_selector_config` + +```python +def to_pod_selector_config() +``` + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### IResource + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct), [`cdk8s_plus_27.IApiResource`](#cdk8s_plus_27.IApiResource) + +- *Implemented By:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod), [`cdk8s_plus_27.AwsElasticBlockStorePersistentVolume`](#cdk8s_plus_27.AwsElasticBlockStorePersistentVolume), [`cdk8s_plus_27.AzureDiskPersistentVolume`](#cdk8s_plus_27.AzureDiskPersistentVolume), [`cdk8s_plus_27.BasicAuthSecret`](#cdk8s_plus_27.BasicAuthSecret), [`cdk8s_plus_27.ClusterRole`](#cdk8s_plus_27.ClusterRole), [`cdk8s_plus_27.ClusterRoleBinding`](#cdk8s_plus_27.ClusterRoleBinding), [`cdk8s_plus_27.ConfigMap`](#cdk8s_plus_27.ConfigMap), [`cdk8s_plus_27.CronJob`](#cdk8s_plus_27.CronJob), [`cdk8s_plus_27.DaemonSet`](#cdk8s_plus_27.DaemonSet), [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.DockerConfigSecret`](#cdk8s_plus_27.DockerConfigSecret), [`cdk8s_plus_27.GCEPersistentDiskPersistentVolume`](#cdk8s_plus_27.GCEPersistentDiskPersistentVolume), [`cdk8s_plus_27.HorizontalPodAutoscaler`](#cdk8s_plus_27.HorizontalPodAutoscaler), [`cdk8s_plus_27.Ingress`](#cdk8s_plus_27.Ingress), [`cdk8s_plus_27.Job`](#cdk8s_plus_27.Job), [`cdk8s_plus_27.Namespace`](#cdk8s_plus_27.Namespace), [`cdk8s_plus_27.NetworkPolicy`](#cdk8s_plus_27.NetworkPolicy), [`cdk8s_plus_27.PersistentVolume`](#cdk8s_plus_27.PersistentVolume), [`cdk8s_plus_27.PersistentVolumeClaim`](#cdk8s_plus_27.PersistentVolumeClaim), [`cdk8s_plus_27.Pod`](#cdk8s_plus_27.Pod), [`cdk8s_plus_27.Resource`](#cdk8s_plus_27.Resource), [`cdk8s_plus_27.Role`](#cdk8s_plus_27.Role), [`cdk8s_plus_27.RoleBinding`](#cdk8s_plus_27.RoleBinding), [`cdk8s_plus_27.Secret`](#cdk8s_plus_27.Secret), [`cdk8s_plus_27.Service`](#cdk8s_plus_27.Service), [`cdk8s_plus_27.ServiceAccount`](#cdk8s_plus_27.ServiceAccount), [`cdk8s_plus_27.ServiceAccountTokenSecret`](#cdk8s_plus_27.ServiceAccountTokenSecret), [`cdk8s_plus_27.SshAuthSecret`](#cdk8s_plus_27.SshAuthSecret), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.TlsSecret`](#cdk8s_plus_27.TlsSecret), [`cdk8s_plus_27.Workload`](#cdk8s_plus_27.Workload), [`cdk8s_plus_27.IClusterRole`](#cdk8s_plus_27.IClusterRole), [`cdk8s_plus_27.IConfigMap`](#cdk8s_plus_27.IConfigMap), [`cdk8s_plus_27.IPersistentVolume`](#cdk8s_plus_27.IPersistentVolume), [`cdk8s_plus_27.IPersistentVolumeClaim`](#cdk8s_plus_27.IPersistentVolumeClaim), [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource), [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole), [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret), [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) + +Represents a resource. + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IRole + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +- *Implemented By:* [`cdk8s_plus_27.ClusterRole`](#cdk8s_plus_27.ClusterRole), [`cdk8s_plus_27.Role`](#cdk8s_plus_27.Role), [`cdk8s_plus_27.IRole`](#cdk8s_plus_27.IRole) + +A reference to any Role or ClusterRole. + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IScalable + +- *Implemented By:* [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.IScalable`](#cdk8s_plus_27.IScalable) + +Represents a scalable workload. + +#### Methods + +##### `mark_has_autoscaler` + +```python +def mark_has_autoscaler() +``` + +##### `to_scaling_target` + +```python +def to_scaling_target() +``` + +#### Properties + +##### `has_autoscaler`Required + +```python +has_autoscaler: bool +``` + +- *Type:* `bool` + +If this is a target of an autoscaler. + +--- + +### ISecret + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource) + +- *Implemented By:* [`cdk8s_plus_27.BasicAuthSecret`](#cdk8s_plus_27.BasicAuthSecret), [`cdk8s_plus_27.DockerConfigSecret`](#cdk8s_plus_27.DockerConfigSecret), [`cdk8s_plus_27.Secret`](#cdk8s_plus_27.Secret), [`cdk8s_plus_27.ServiceAccountTokenSecret`](#cdk8s_plus_27.ServiceAccountTokenSecret), [`cdk8s_plus_27.SshAuthSecret`](#cdk8s_plus_27.SshAuthSecret), [`cdk8s_plus_27.TlsSecret`](#cdk8s_plus_27.TlsSecret), [`cdk8s_plus_27.ISecret`](#cdk8s_plus_27.ISecret) + +#### Methods + +##### `env_value` + +```python +def env_value( + key: str, + optional: bool = None +) +``` + +###### `key`Required + +- *Type:* `str` + +Secret's key. + +--- + +###### `optional`Optional + +- *Type:* `bool` +- *Default:* false + +Specify whether the Secret or its key must be defined. + +--- + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IServiceAccount + +- *Extends:* [`cdk8s_plus_27.IResource`](#cdk8s_plus_27.IResource), [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +- *Implemented By:* [`cdk8s_plus_27.ServiceAccount`](#cdk8s_plus_27.ServiceAccount), [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount) + + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `api_group`Required + +```python +api_group: str +``` + +- *Type:* `str` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resource_type`Required + +```python +resource_type: str +``` + +- *Type:* `str` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resource_name`Optional + +```python +resource_name: str +``` + +- *Type:* `str` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `api_version`Required + +```python +api_version: str +``` + +- *Type:* `str` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```python +kind: str +``` + +- *Type:* `str` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```python +name: str +``` + +- *Type:* `str` + +The Kubernetes name of this resource. + +--- + +### IStorage + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s_plus_27.AwsElasticBlockStorePersistentVolume`](#cdk8s_plus_27.AwsElasticBlockStorePersistentVolume), [`cdk8s_plus_27.AzureDiskPersistentVolume`](#cdk8s_plus_27.AzureDiskPersistentVolume), [`cdk8s_plus_27.GCEPersistentDiskPersistentVolume`](#cdk8s_plus_27.GCEPersistentDiskPersistentVolume), [`cdk8s_plus_27.PersistentVolume`](#cdk8s_plus_27.PersistentVolume), [`cdk8s_plus_27.Volume`](#cdk8s_plus_27.Volume), [`cdk8s_plus_27.IStorage`](#cdk8s_plus_27.IStorage) + +Represents a piece of storage in the cluster. + +#### Methods + +##### `as_volume` + +```python +def as_volume() +``` + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### ISubject + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s_plus_27.AbstractPod`](#cdk8s_plus_27.AbstractPod), [`cdk8s_plus_27.CronJob`](#cdk8s_plus_27.CronJob), [`cdk8s_plus_27.DaemonSet`](#cdk8s_plus_27.DaemonSet), [`cdk8s_plus_27.Deployment`](#cdk8s_plus_27.Deployment), [`cdk8s_plus_27.Group`](#cdk8s_plus_27.Group), [`cdk8s_plus_27.Job`](#cdk8s_plus_27.Job), [`cdk8s_plus_27.Pod`](#cdk8s_plus_27.Pod), [`cdk8s_plus_27.ServiceAccount`](#cdk8s_plus_27.ServiceAccount), [`cdk8s_plus_27.StatefulSet`](#cdk8s_plus_27.StatefulSet), [`cdk8s_plus_27.User`](#cdk8s_plus_27.User), [`cdk8s_plus_27.Workload`](#cdk8s_plus_27.Workload), [`cdk8s_plus_27.IServiceAccount`](#cdk8s_plus_27.IServiceAccount), [`cdk8s_plus_27.ISubject`](#cdk8s_plus_27.ISubject) + +Represents an object that can be used as a role binding subject. + +#### Methods + +##### `to_subject_configuration` + +```python +def to_subject_configuration() +``` + +#### Properties + +##### `node`Required + +```python +node: Node +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +## Enums + +### AzureDiskPersistentVolumeCachingMode + +Azure disk caching modes. + +#### `NONE` + +None. + +--- + + +#### `READ_ONLY` + +ReadOnly. + +--- + + +#### `READ_WRITE` + +ReadWrite. + +--- + + +### AzureDiskPersistentVolumeKind + +Azure Disk kinds. + +#### `SHARED` + +Multiple blob disks per storage account. + +--- + + +#### `DEDICATED` + +Single blob disk per storage account. + +--- + + +#### `MANAGED` + +Azure managed data disk. + +--- + + +### ConcurrencyPolicy + +Concurrency policy for CronJobs. + +#### `ALLOW` + +This policy allows to run job concurrently. + +--- + + +#### `FORBID` + +This policy does not allow to run job concurrently. + +It does not let a new job to be scheduled if the previous one is not finished yet. + +--- + + +#### `REPLACE` + +This policy replaces the currently running job if a new job is being scheduled. + +--- + + +### ConnectionScheme + +#### `HTTP` + +Use HTTP request for connecting to host. + +--- + + +#### `HTTPS` + +Use HTTPS request for connecting to host. + +--- + + +### DnsPolicy + +Pod DNS policies. + +#### `CLUSTER_FIRST` + +Any DNS query that does not match the configured cluster domain suffix, such as "www.kubernetes.io", is forwarded to the upstream nameserver inherited from the node. Cluster administrators may have extra stub-domain and upstream DNS servers configured. + +--- + + +#### `CLUSTER_FIRST_WITH_HOST_NET` + +For Pods running with hostNetwork, you should explicitly set its DNS policy "ClusterFirstWithHostNet". + +--- + + +#### `DEFAULT` + +The Pod inherits the name resolution configuration from the node that the pods run on. + +--- + + +#### `NONE` + +It allows a Pod to ignore DNS settings from the Kubernetes environment. + +All DNS settings are supposed to be provided using the dnsConfig +field in the Pod Spec. + +--- + + +### EmptyDirMedium + +The medium on which to store the volume. + +#### `DEFAULT` + +The default volume of the backing node. + +--- + + +#### `MEMORY` + +Mount a tmpfs (RAM-backed filesystem) for you instead. + +While tmpfs is very +fast, be aware that unlike disks, tmpfs is cleared on node reboot and any +files you write will count against your Container's memory limit. + +--- + + +### EnvFieldPaths + +#### `POD_NAME` + +The name of the pod. + +--- + + +#### `POD_NAMESPACE` + +The namespace of the pod. + +--- + + +#### `POD_UID` + +The uid of the pod. + +--- + + +#### `POD_LABEL` + +The labels of the pod. + +--- + + +#### `POD_ANNOTATION` + +The annotations of the pod. + +--- + + +#### `POD_IP` + +The ipAddress of the pod. + +--- + + +#### `SERVICE_ACCOUNT_NAME` + +The service account name of the pod. + +--- + + +#### `NODE_NAME` + +The name of the node. + +--- + + +#### `NODE_IP` + +The ipAddress of the node. + +--- + + +#### `POD_IPS` + +The ipAddresess of the pod. + +--- + + +### FsGroupChangePolicy + +#### `ON_ROOT_MISMATCH` + +Only change permissions and ownership if permission and ownership of root directory does not match with expected permissions of the volume. + +This could help shorten the time it takes to change ownership and permission of a volume + +--- + + +#### `ALWAYS` + +Always change permission and ownership of the volume when volume is mounted. + +--- + + +### HostPathVolumeType + +Host path types. + +#### `DEFAULT` + +Empty string (default) is for backward compatibility, which means that no checks will be performed before mounting the hostPath volume. + +--- + + +#### `DIRECTORY_OR_CREATE` + +If nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Kubelet. + +--- + + +#### `DIRECTORY` + +A directory must exist at the given path. + +--- + + +#### `FILE_OR_CREATE` + +If nothing exists at the given path, an empty file will be created there as needed with permission set to 0644, having the same group and ownership with Kubelet. + +--- + + +#### `FILE` + +A file must exist at the given path. + +--- + + +#### `SOCKET` + +A UNIX socket must exist at the given path. + +--- + + +#### `CHAR_DEVICE` + +A character device must exist at the given path. + +--- + + +#### `BLOCK_DEVICE` + +A block device must exist at the given path. + +--- + + +### HttpIngressPathType + +Specify how the path is matched against request paths. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +#### `PREFIX` + +Matches the URL path exactly. + +--- + + +#### `EXACT` + +Matches based on a URL path prefix split by '/'. + +--- + + +#### `IMPLEMENTATION_SPECIFIC` + +Matching is specified by the underlying IngressClass. + +--- + + +### ImagePullPolicy + +#### `ALWAYS` + +Every time the kubelet launches a container, the kubelet queries the container image registry to resolve the name to an image digest. + +If the kubelet has a container image with that exact +digest cached locally, the kubelet uses its cached image; otherwise, the kubelet downloads +(pulls) the image with the resolved digest, and uses that image to launch the container. + +Default is Always if ImagePullPolicy is omitted and either the image tag is :latest or +the image tag is omitted. + +--- + + +#### `IF_NOT_PRESENT` + +The image is pulled only if it is not already present locally. + +Default is IfNotPresent if ImagePullPolicy is omitted and the image tag is present but +not :latest + +--- + + +#### `NEVER` + +The image is assumed to exist locally. + +No attempt is made to pull the image. + +--- + + +### MountPropagation + +#### `NONE` + +This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host. + +In similar +fashion, no mounts created by the Container will be visible on the host. + +This is the default mode. + +This mode is equal to `private` mount propagation as described in the Linux +kernel documentation + +--- + + +#### `HOST_TO_CONTAINER` + +This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories. + +In other words, if the host mounts anything inside the volume mount, the +Container will see it mounted there. + +Similarly, if any Pod with Bidirectional mount propagation to the same +volume mounts anything there, the Container with HostToContainer mount +propagation will see it. + +This mode is equal to `rslave` mount propagation as described in the Linux +kernel documentation + +--- + + +#### `BIDIRECTIONAL` + +This volume mount behaves the same the HostToContainer mount. + +In addition, +all volume mounts created by the Container will be propagated back to the +host and to all Containers of all Pods that use the same volume + +A typical use case for this mode is a Pod with a FlexVolume or CSI driver +or a Pod that needs to mount something on the host using a hostPath volume. + +This mode is equal to `rshared` mount propagation as described in the Linux +kernel documentation + +Caution: Bidirectional mount propagation can be dangerous. It can damage +the host operating system and therefore it is allowed only in privileged +Containers. Familiarity with Linux kernel behavior is strongly recommended. +In addition, any volume mounts created by Containers in Pods must be +destroyed (unmounted) by the Containers on termination. + +--- + + +### NetworkPolicyTrafficDefault + +Default behaviors of network traffic in policies. + +#### `DENY` + +The policy denies all traffic. + +Since rules are additive, additional rules or policies can allow +specific traffic. + +--- + + +#### `ALLOW` + +The policy allows all traffic (either ingress or egress). + +Since rules are additive, no additional rule or policies can +subsequently deny the traffic. + +--- + + +### NetworkProtocol + +Network protocols. + +#### `TCP` + +TCP. + +--- + + +#### `UDP` + +UDP. + +--- + + +#### `SCTP` + +SCTP. + +--- + + +### PersistentVolumeAccessMode + +Access Modes. + +#### `READ_WRITE_ONCE` + +The volume can be mounted as read-write by a single node. + +ReadWriteOnce access mode still can allow multiple pods to access +the volume when the pods are running on the same node. + +--- + + +#### `READ_ONLY_MANY` + +The volume can be mounted as read-only by many nodes. + +--- + + +#### `READ_WRITE_MANY` + +The volume can be mounted as read-write by many nodes. + +--- + + +#### `READ_WRITE_ONCE_POD` + +The volume can be mounted as read-write by a single Pod. + +Use ReadWriteOncePod access mode if you want to ensure that +only one pod across whole cluster can read that PVC or write to it. +This is only supported for CSI volumes and Kubernetes version 1.22+. + +--- + + +### PersistentVolumeMode + +Volume Modes. + +#### `FILE_SYSTEM` + +Volume is ounted into Pods into a directory. + +If the volume is backed by a block device and the device is empty, +Kubernetes creates a filesystem on the device before mounting it +for the first time. + +--- + + +#### `BLOCK` + +Use a volume as a raw block device. + +Such volume is presented into a Pod as a block device, +without any filesystem on it. This mode is useful to provide a Pod the fastest possible way +to access a volume, without any filesystem layer between the Pod +and the volume. On the other hand, the application running in +the Pod must know how to handle a raw block device + +--- + + +### PersistentVolumeReclaimPolicy + +Reclaim Policies. + +#### `RETAIN` + +The Retain reclaim policy allows for manual reclamation of the resource. + +When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the +volume is considered "released". But it is not yet available for another claim +because the previous claimant's data remains on the volume. +An administrator can manually reclaim the volume with the following steps: + +1. Delete the PersistentVolume. The associated storage asset in external + infrastructure (such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume) still exists after the PV is deleted. +2. Manually clean up the data on the associated storage asset accordingly. +3. Manually delete the associated storage asset. + +If you want to reuse the same storage asset, create a new PersistentVolume +with the same storage asset definition. + +--- + + +#### `DELETE` + +For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure, such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume. + +Volumes that were dynamically provisioned inherit the reclaim policy of their StorageClass, which defaults to Delete. +The administrator should configure the StorageClass according to users' expectations; otherwise, +the PV must be edited or patched after it is created + +--- + + +### PodConnectionsIsolation + +Isolation determines which policies are created when allowing connections from a a pod / workload to peers. + +#### `POD` + +Only creates network policies that select the pod. + +--- + + +#### `PEER` + +Only creates network policies that select the peer. + +--- + + +### PodManagementPolicy + +Controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. + +The default policy is `OrderedReady`, where pods are created in increasing order +(pod-0, then pod-1, etc) and the controller will wait until each pod is ready before +continuing. When scaling down, the pods are removed in the opposite order. + +The alternative policy is `Parallel` which will create pods in parallel to match the +desired scale without waiting, and on scale down will delete all pods at once. + +#### `ORDERED_READY` + +--- + + +#### `PARALLEL` + +--- + + +### Protocol + +Network protocols. + +#### `TCP` + +TCP. + +--- + + +#### `UDP` + +UDP. + +--- + + +#### `SCTP` + +SCTP. + +--- + + +### ResourceFieldPaths + +#### `CPU_LIMIT` + +CPU limit of the container. + +--- + + +#### `MEMORY_LIMIT` + +Memory limit of the container. + +--- + + +#### `CPU_REQUEST` + +CPU request of the container. + +--- + + +#### `MEMORY_REQUEST` + +Memory request of the container. + +--- + + +#### `STORAGE_LIMIT` + +Ephemeral storage limit of the container. + +--- + + +#### `STORAGE_REQUEST` + +Ephemeral storage request of the container. + +--- + + +### RestartPolicy + +Restart policy for all containers within the pod. + +#### `ALWAYS` + +Always restart the pod after it exits. + +--- + + +#### `ON_FAILURE` + +Only restart if the pod exits with a non-zero exit code. + +--- + + +#### `NEVER` + +Never restart the pod. + +--- + + +### ScalingStrategy + +#### `MAX_CHANGE` + +Use the policy that provisions the most changes. + +--- + + +#### `MIN_CHANGE` + +Use the policy that provisions the least amount of changes. + +--- + + +#### ~~`DISABLED`~~ + +- *Deprecated:* - Omit the ScalingRule instead + +Disables scaling in this direction. + +--- + + +### ServiceType + +For some parts of your application (for example, frontends) you may want to expose a Service onto an external IP address, that's outside of your cluster. + +Kubernetes ServiceTypes allow you to specify what kind of Service you want. +The default is ClusterIP. + +#### `CLUSTER_IP` + +Exposes the Service on a cluster-internal IP. + +Choosing this value makes the Service only reachable from within the cluster. +This is the default ServiceType + +--- + + +#### `NODE_PORT` + +Exposes the Service on each Node's IP at a static port (the NodePort). + +A ClusterIP Service, to which the NodePort Service routes, is automatically created. +You'll be able to contact the NodePort Service, from outside the cluster, +by requesting :. + +--- + + +#### `LOAD_BALANCER` + +Exposes the Service externally using a cloud provider's load balancer. + +NodePort and ClusterIP Services, to which the external load balancer routes, +are automatically created. + +--- + + +#### `EXTERNAL_NAME` + +Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up. + +> Note: You need either kube-dns version 1.7 or CoreDNS version 0.0.8 or higher to use the ExternalName type. + +--- + + +### TaintEffect + +Taint effects. + +#### `NO_SCHEDULE` + +This means that no pod will be able to schedule onto the node unless it has a matching toleration. + +--- + + +#### `PREFER_NO_SCHEDULE` + +This is a "preference" or "soft" version of `NO_SCHEDULE` -- the system will try to avoid placing a pod that does not tolerate the taint on the node, but it is not required. + +--- + + +#### `NO_EXECUTE` + +This affects pods that are already running on the node as follows:. + +* Pods that do not tolerate the taint are evicted immediately. +* Pods that tolerate the taint without specifying `duration` remain bound forever. +* Pods that tolerate the taint with a specified `duration` remain bound for + the specified amount of time. + +--- + diff --git a/docs/reference/cdk8s-plus-27/typescript.md b/docs/reference/cdk8s-plus-27/typescript.md new file mode 100644 index 0000000000..cf72550f41 --- /dev/null +++ b/docs/reference/cdk8s-plus-27/typescript.md @@ -0,0 +1,19015 @@ +# cdk8s-plus-27 (TypeScript) + +## Constructs + +### AbstractPod + +- *Implements:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector), [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer), [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +#### Initializers + +```typescript +import { AbstractPod } from 'cdk8s-plus-27' + +new AbstractPod(scope: Construct, id: string, props?: AbstractPodProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.AbstractPodProps`](#cdk8s-plus-27.AbstractPodProps) + +--- + +#### Methods + +##### `addContainer` + +```typescript +public addContainer(cont: ContainerProps) +``` + +###### `cont`Required + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps) + +--- + +##### `addHostAlias` + +```typescript +public addHostAlias(hostAlias: HostAlias) +``` + +###### `hostAlias`Required + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias) + +--- + +##### `addInitContainer` + +```typescript +public addInitContainer(cont: ContainerProps) +``` + +###### `cont`Required + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps) + +--- + +##### `addVolume` + +```typescript +public addVolume(vol: Volume) +``` + +###### `vol`Required + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume) + +--- + +##### `attachContainer` + +```typescript +public attachContainer(cont: Container) +``` + +###### `cont`Required + +- *Type:* [`cdk8s-plus-27.Container`](#cdk8s-plus-27.Container) + +--- + +##### `toNetworkPolicyPeerConfig` + +```typescript +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```typescript +public toPodSelector() +``` + +##### `toPodSelectorConfig` + +```typescript +public toPodSelectorConfig() +``` + +##### `toSubjectConfiguration` + +```typescript +public toSubjectConfiguration() +``` + + +#### Properties + +##### `automountServiceAccountToken`Required + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `containers`Required + +```typescript +public readonly containers: Container[]; +``` + +- *Type:* [`cdk8s-plus-27.Container`](#cdk8s-plus-27.Container)[] + +--- + +##### `dns`Required + +```typescript +public readonly dns: PodDns; +``` + +- *Type:* [`cdk8s-plus-27.PodDns`](#cdk8s-plus-27.PodDns) + +--- + +##### `hostAliases`Required + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +--- + +##### `initContainers`Required + +```typescript +public readonly initContainers: Container[]; +``` + +- *Type:* [`cdk8s-plus-27.Container`](#cdk8s-plus-27.Container)[] + +--- + +##### `podMetadata`Required + +```typescript +public readonly podMetadata: ApiObjectMetadataDefinition; +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `securityContext`Required + +```typescript +public readonly securityContext: PodSecurityContext; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContext`](#cdk8s-plus-27.PodSecurityContext) + +--- + +##### `volumes`Required + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +--- + + +### AwsElasticBlockStorePersistentVolume + +Represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +#### Initializers + +```typescript +import { AwsElasticBlockStorePersistentVolume } from 'cdk8s-plus-27' + +new AwsElasticBlockStorePersistentVolume(scope: Construct, id: string, props: AwsElasticBlockStorePersistentVolumeProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.AwsElasticBlockStorePersistentVolumeProps`](#cdk8s-plus-27.AwsElasticBlockStorePersistentVolumeProps) + +--- + + + +#### Properties + +##### `fsType`Required + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` + +File system type of this volume. + +--- + +##### `readOnly`Required + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` + +Whether or not it is mounted as a read-only volume. + +--- + +##### `volumeId`Required + +```typescript +public readonly volumeId: string; +``` + +- *Type:* `string` + +Volume id of this volume. + +--- + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` + +Partition of this volume. + +--- + + +### AzureDiskPersistentVolume + +AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + +#### Initializers + +```typescript +import { AzureDiskPersistentVolume } from 'cdk8s-plus-27' + +new AzureDiskPersistentVolume(scope: Construct, id: string, props: AzureDiskPersistentVolumeProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeProps`](#cdk8s-plus-27.AzureDiskPersistentVolumeProps) + +--- + + + +#### Properties + +##### `azureKind`Required + +```typescript +public readonly azureKind: AzureDiskPersistentVolumeKind; +``` + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeKind`](#cdk8s-plus-27.AzureDiskPersistentVolumeKind) + +Azure kind of this volume. + +--- + +##### `cachingMode`Required + +```typescript +public readonly cachingMode: AzureDiskPersistentVolumeCachingMode; +``` + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeCachingMode`](#cdk8s-plus-27.AzureDiskPersistentVolumeCachingMode) + +Caching mode of this volume. + +--- + +##### `diskName`Required + +```typescript +public readonly diskName: string; +``` + +- *Type:* `string` + +Disk name of this volume. + +--- + +##### `diskUri`Required + +```typescript +public readonly diskUri: string; +``` + +- *Type:* `string` + +Disk URI of this volume. + +--- + +##### `fsType`Required + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` + +File system type of this volume. + +--- + +##### `readOnly`Required + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` + +Whether or not it is mounted as a read-only volume. + +--- + + +### BasicAuthSecret + +Create a secret for basic authentication. + +> https://kubernetes.io/docs/concepts/configuration/secret/#basic-authentication-secret + +#### Initializers + +```typescript +import { BasicAuthSecret } from 'cdk8s-plus-27' + +new BasicAuthSecret(scope: Construct, id: string, props: BasicAuthSecretProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.BasicAuthSecretProps`](#cdk8s-plus-27.BasicAuthSecretProps) + +--- + + + + + +### ClusterRole + +- *Implements:* [`cdk8s-plus-27.IClusterRole`](#cdk8s-plus-27.IClusterRole), [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole) + +ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. + +#### Initializers + +```typescript +import { ClusterRole } from 'cdk8s-plus-27' + +new ClusterRole(scope: Construct, id: string, props?: ClusterRoleProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.ClusterRoleProps`](#cdk8s-plus-27.ClusterRoleProps) + +--- + +#### Methods + +##### `aggregate` + +```typescript +public aggregate(key: string, value: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `value`Required + +- *Type:* `string` + +--- + +##### `allow` + +```typescript +public allow(verbs: string[], endpoints: IApiEndpoint) +``` + +###### `verbs`Required + +- *Type:* `string`[] + +--- + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The endpoints(s) to apply to. + +--- + +##### `allowCreate` + +```typescript +public allowCreate(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowDelete` + +```typescript +public allowDelete(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowDeleteCollection` + +```typescript +public allowDeleteCollection(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowGet` + +```typescript +public allowGet(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowList` + +```typescript +public allowList(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowPatch` + +```typescript +public allowPatch(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowRead` + +```typescript +public allowRead(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowReadWrite` + +```typescript +public allowReadWrite(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowUpdate` + +```typescript +public allowUpdate(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `allowWatch` + +```typescript +public allowWatch(endpoints: IApiEndpoint) +``` + +###### `endpoints`Required + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +The resource(s) to apply to. + +--- + +##### `bind` + +```typescript +public bind(subjects: ISubject) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +a list of subjects to bind to. + +--- + +##### `bindInNamespace` + +```typescript +public bindInNamespace(namespace: string, subjects: ISubject) +``` + +###### `namespace`Required + +- *Type:* `string` + +the namespace to limit permissions to. + +--- + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +a list of subjects to bind to. + +--- + +##### `combine` + +```typescript +public combine(rol: ClusterRole) +``` + +###### `rol`Required + +- *Type:* [`cdk8s-plus-27.ClusterRole`](#cdk8s-plus-27.ClusterRole) + +--- + +#### Static Functions + +##### `fromClusterRoleName` + +```typescript +import { ClusterRole } from 'cdk8s-plus-27' + +ClusterRole.fromClusterRoleName(scope: Construct, id: string, name: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `rules`Required + +```typescript +public readonly rules: ClusterRolePolicyRule[]; +``` + +- *Type:* [`cdk8s-plus-27.ClusterRolePolicyRule`](#cdk8s-plus-27.ClusterRolePolicyRule)[] + +Rules associaated with this Role. + +Returns a copy, use `allow` to add rules. + +--- + + +### ClusterRoleBinding + +A ClusterRoleBinding grants permissions cluster-wide to a user or set of users. + +#### Initializers + +```typescript +import { ClusterRoleBinding } from 'cdk8s-plus-27' + +new ClusterRoleBinding(scope: Construct, id: string, props: ClusterRoleBindingProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.ClusterRoleBindingProps`](#cdk8s-plus-27.ClusterRoleBindingProps) + +--- + +#### Methods + +##### `addSubjects` + +```typescript +public addSubjects(subjects: ISubject) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +The subjects to add. + +--- + + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `role`Required + +```typescript +public readonly role: IClusterRole; +``` + +- *Type:* [`cdk8s-plus-27.IClusterRole`](#cdk8s-plus-27.IClusterRole) + +--- + +##### `subjects`Required + +```typescript +public readonly subjects: ISubject[]; +``` + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject)[] + +--- + + +### ConfigMap + +- *Implements:* [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap) + +ConfigMap holds configuration data for pods to consume. + +#### Initializers + +```typescript +import { ConfigMap } from 'cdk8s-plus-27' + +new ConfigMap(scope: Construct, id: string, props?: ConfigMapProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.ConfigMapProps`](#cdk8s-plus-27.ConfigMapProps) + +--- + +#### Methods + +##### `addBinaryData` + +```typescript +public addBinaryData(key: string, value: string) +``` + +###### `key`Required + +- *Type:* `string` + +The key. + +--- + +###### `value`Required + +- *Type:* `string` + +The value. + +--- + +##### `addData` + +```typescript +public addData(key: string, value: string) +``` + +###### `key`Required + +- *Type:* `string` + +The key. + +--- + +###### `value`Required + +- *Type:* `string` + +The value. + +--- + +##### `addDirectory` + +```typescript +public addDirectory(localDir: string, options?: AddDirectoryOptions) +``` + +###### `localDir`Required + +- *Type:* `string` + +A path to a local directory. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.AddDirectoryOptions`](#cdk8s-plus-27.AddDirectoryOptions) + +Options. + +--- + +##### `addFile` + +```typescript +public addFile(localFile: string, key?: string) +``` + +###### `localFile`Required + +- *Type:* `string` + +The path to the local file. + +--- + +###### `key`Optional + +- *Type:* `string` + +The ConfigMap key (default to the file name). + +--- + +#### Static Functions + +##### `fromConfigMapName` + +```typescript +import { ConfigMap } from 'cdk8s-plus-27' + +ConfigMap.fromConfigMapName(scope: Construct, id: string, name: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `binaryData`Required + +```typescript +public readonly binaryData: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +The binary data associated with this config map. + +Returns a copy. To add data records, use `addBinaryData()` or `addData()`. + +--- + +##### `data`Required + +```typescript +public readonly data: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +The data associated with this config map. + +Returns an copy. To add data records, use `addData()` or `addBinaryData()`. + +--- + +##### `immutable`Required + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` + +Whether or not this config map is immutable. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### CronJob + +A CronJob is responsible for creating a Job and scheduling it based on provided cron schedule. + +This helps running Jobs in a recurring manner. + +#### Initializers + +```typescript +import { CronJob } from 'cdk8s-plus-27' + +new CronJob(scope: Construct, id: string, props: CronJobProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.CronJobProps`](#cdk8s-plus-27.CronJobProps) + +--- + + + +#### Properties + +##### `concurrencyPolicy`Required + +```typescript +public readonly concurrencyPolicy: string; +``` + +- *Type:* `string` + +The policy used by this cron job to determine the concurrency mode in which to schedule jobs. + +--- + +##### `failedJobsRetained`Required + +```typescript +public readonly failedJobsRetained: number; +``` + +- *Type:* `number` + +The number of failed jobs retained by this cron job. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +Represents the resource type. + +--- + +##### `schedule`Required + +```typescript +public readonly schedule: Cron; +``` + +- *Type:* [`cdk8s.Cron`](#cdk8s.Cron) + +The schedule this cron job is scheduled to run in. + +--- + +##### `startingDeadline`Required + +```typescript +public readonly startingDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +The time by which the running cron job needs to schedule the next job execution. + +The job is considered as failed if it misses this deadline. + +--- + +##### `successfulJobsRetained`Required + +```typescript +public readonly successfulJobsRetained: number; +``` + +- *Type:* `number` + +The number of successful jobs retained by this cron job. + +--- + +##### `suspend`Required + +```typescript +public readonly suspend: boolean; +``` + +- *Type:* `boolean` + +Whether or not the cron job is currently suspended or not. + +--- + +##### `timeZone`Optional + +```typescript +public readonly timeZone: string; +``` + +- *Type:* `string` + +The timezone which this cron job would follow to schedule jobs. + +--- + + +### DaemonSet + +A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. + +As nodes are added to the cluster, Pods are added to them. +As nodes are removed from the cluster, those Pods are garbage collected. +Deleting a DaemonSet will clean up the Pods it created. + +Some typical uses of a DaemonSet are: + +- running a cluster storage daemon on every node +- running a logs collection daemon on every node +- running a node monitoring daemon on every node + +In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon. +A more complex setup might use multiple DaemonSets for a single type of daemon, +but with different flags and/or different memory and cpu requests for different hardware types. + +#### Initializers + +```typescript +import { DaemonSet } from 'cdk8s-plus-27' + +new DaemonSet(scope: Construct, id: string, props?: DaemonSetProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.DaemonSetProps`](#cdk8s-plus-27.DaemonSetProps) + +--- + + + +#### Properties + +##### `minReadySeconds`Required + +```typescript +public readonly minReadySeconds: number; +``` + +- *Type:* `number` + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Deployment + +- *Implements:* [`cdk8s-plus-27.IScalable`](#cdk8s-plus-27.IScalable) + +A Deployment provides declarative updates for Pods and ReplicaSets. + +You describe a desired state in a Deployment, and the Deployment Controller changes the actual +state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove +existing Deployments and adopt all their resources with new Deployments. + +> Note: Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below. + +Use Case + +The following are typical use cases for Deployments: + +- Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. + Check the status of the rollout to see if it succeeds or not. +- Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. + A new ReplicaSet is created and the Deployment manages moving the Pods from the old ReplicaSet to the new one at a controlled rate. + Each new ReplicaSet updates the revision of the Deployment. +- Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. + Each rollback updates the revision of the Deployment. +- Scale up the Deployment to facilitate more load. +- Pause the Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout. +- Use the status of the Deployment as an indicator that a rollout has stuck. +- Clean up older ReplicaSets that you don't need anymore. + +#### Initializers + +```typescript +import { Deployment } from 'cdk8s-plus-27' + +new Deployment(scope: Construct, id: string, props?: DeploymentProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.DeploymentProps`](#cdk8s-plus-27.DeploymentProps) + +--- + +#### Methods + +##### `exposeViaIngress` + +```typescript +public exposeViaIngress(path: string, options?: ExposeDeploymentViaIngressOptions) +``` + +###### `path`Required + +- *Type:* `string` + +The ingress path to register under. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.ExposeDeploymentViaIngressOptions`](#cdk8s-plus-27.ExposeDeploymentViaIngressOptions) + +Additional options. + +--- + +##### `exposeViaService` + +```typescript +public exposeViaService(options?: DeploymentExposeViaServiceOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.DeploymentExposeViaServiceOptions`](#cdk8s-plus-27.DeploymentExposeViaServiceOptions) + +Options to determine details of the service and port exposed. + +--- + +##### `markHasAutoscaler` + +```typescript +public markHasAutoscaler() +``` + +##### `toScalingTarget` + +```typescript +public toScalingTarget() +``` + + +#### Properties + +##### `minReady`Required + +```typescript +public readonly minReady: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +##### `progressDeadline`Required + +```typescript +public readonly progressDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `strategy`Required + +```typescript +public readonly strategy: DeploymentStrategy; +``` + +- *Type:* [`cdk8s-plus-27.DeploymentStrategy`](#cdk8s-plus-27.DeploymentStrategy) + +--- + +##### `replicas`Optional + +```typescript +public readonly replicas: number; +``` + +- *Type:* `number` + +Number of desired pods. + +--- + +##### `hasAutoscaler`Required + +```typescript +public readonly hasAutoscaler: boolean; +``` + +- *Type:* `boolean` + +If this is a target of an autoscaler. + +--- + + +### DockerConfigSecret + +Create a secret for storing credentials for accessing a container image registry. + +> https://kubernetes.io/docs/concepts/configuration/secret/#docker-config-secrets + +#### Initializers + +```typescript +import { DockerConfigSecret } from 'cdk8s-plus-27' + +new DockerConfigSecret(scope: Construct, id: string, props: DockerConfigSecretProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.DockerConfigSecretProps`](#cdk8s-plus-27.DockerConfigSecretProps) + +--- + + + + + +### GCEPersistentDiskPersistentVolume + +GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + +Provisioned by an admin. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +#### Initializers + +```typescript +import { GCEPersistentDiskPersistentVolume } from 'cdk8s-plus-27' + +new GCEPersistentDiskPersistentVolume(scope: Construct, id: string, props: GCEPersistentDiskPersistentVolumeProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.GCEPersistentDiskPersistentVolumeProps`](#cdk8s-plus-27.GCEPersistentDiskPersistentVolumeProps) + +--- + + + +#### Properties + +##### `fsType`Required + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` + +File system type of this volume. + +--- + +##### `pdName`Required + +```typescript +public readonly pdName: string; +``` + +- *Type:* `string` + +PD resource in GCE of this volume. + +--- + +##### `readOnly`Required + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` + +Whether or not it is mounted as a read-only volume. + +--- + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` + +Partition of this volume. + +--- + + +### Group + +- *Implements:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +Represents a group. + +#### Methods + +##### `toSubjectConfiguration` + +```typescript +public toSubjectConfiguration() +``` + +#### Static Functions + +##### `fromName` + +```typescript +import { Group } from 'cdk8s-plus-27' + +Group.fromName(scope: Construct, id: string, name: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +--- + +##### `apiGroup`Optional + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +--- + + +### HorizontalPodAutoscaler + +A HorizontalPodAutoscaler scales a workload up or down in response to a metric change. + +This allows your services to scale up when demand is high and scale down +when they are no longer needed. + + +Typical use cases for HorizontalPodAutoscaler: + +* When Memory usage is above 70%, scale up the number of replicas to meet the demand. +* When CPU usage is below 30%, scale down the number of replicas to save resources. +* When a service is experiencing a spike in traffic, scale up the number of replicas + to meet the demand. Then, when the traffic subsides, scale down the number of + replicas to save resources. + +The autoscaler uses the following algorithm to determine the number of replicas to scale: + +`desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]` + +HorizontalPodAutoscaler's can be used to with any `Scalable` workload: +* Deployment +* StatefulSet + +**Targets that already have a replica count defined:** + +Remove any replica counts from the target resource before associating with a +HorizontalPodAutoscaler. If this isn't done, then any time a change to that object is applied, +Kubernetes will scale the current number of Pods to the value of the target.replicas key. This +may not be desired and could lead to unexpected behavior. + +> https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#implicit-maintenance-mode-deactivation + +#### Initializers + +```typescript +import { HorizontalPodAutoscaler } from 'cdk8s-plus-27' + +new HorizontalPodAutoscaler(scope: Construct, id: string, props: HorizontalPodAutoscalerProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.HorizontalPodAutoscalerProps`](#cdk8s-plus-27.HorizontalPodAutoscalerProps) + +--- + + + +#### Properties + +##### `maxReplicas`Required + +```typescript +public readonly maxReplicas: number; +``` + +- *Type:* `number` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `minReplicas`Required + +```typescript +public readonly minReplicas: number; +``` + +- *Type:* `number` + +The minimum number of replicas that can be scaled down to. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `scaleDown`Required + +```typescript +public readonly scaleDown: ScalingRules; +``` + +- *Type:* [`cdk8s-plus-27.ScalingRules`](#cdk8s-plus-27.ScalingRules) + +The scaling behavior when scaling down. + +--- + +##### `scaleUp`Required + +```typescript +public readonly scaleUp: ScalingRules; +``` + +- *Type:* [`cdk8s-plus-27.ScalingRules`](#cdk8s-plus-27.ScalingRules) + +The scaling behavior when scaling up. + +--- + +##### `target`Required + +```typescript +public readonly target: IScalable; +``` + +- *Type:* [`cdk8s-plus-27.IScalable`](#cdk8s-plus-27.IScalable) + +The workload to scale up or down. + +--- + +##### `metrics`Optional + +```typescript +public readonly metrics: Metric[]; +``` + +- *Type:* [`cdk8s-plus-27.Metric`](#cdk8s-plus-27.Metric)[] + +The metric conditions that trigger a scale up or scale down. + +--- + + +### Ingress + +Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. + +An Ingress can be configured to give services +externally-reachable urls, load balance traffic, terminate SSL, offer name +based virtual hosting etc. + +#### Initializers + +```typescript +import { Ingress } from 'cdk8s-plus-27' + +new Ingress(scope: Construct, id: string, props?: IngressProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.IngressProps`](#cdk8s-plus-27.IngressProps) + +--- + +#### Methods + +##### `addDefaultBackend` + +```typescript +public addDefaultBackend(backend: IngressBackend) +``` + +###### `backend`Required + +- *Type:* [`cdk8s-plus-27.IngressBackend`](#cdk8s-plus-27.IngressBackend) + +The backend to use for requests that do not match any rule. + +--- + +##### `addHostDefaultBackend` + +```typescript +public addHostDefaultBackend(host: string, backend: IngressBackend) +``` + +###### `host`Required + +- *Type:* `string` + +The host name to match. + +--- + +###### `backend`Required + +- *Type:* [`cdk8s-plus-27.IngressBackend`](#cdk8s-plus-27.IngressBackend) + +The backend to route to. + +--- + +##### `addHostRule` + +```typescript +public addHostRule(host: string, path: string, backend: IngressBackend, pathType?: HttpIngressPathType) +``` + +###### `host`Required + +- *Type:* `string` + +The host name. + +--- + +###### `path`Required + +- *Type:* `string` + +The HTTP path. + +--- + +###### `backend`Required + +- *Type:* [`cdk8s-plus-27.IngressBackend`](#cdk8s-plus-27.IngressBackend) + +The backend to route requests to. + +--- + +###### `pathType`Optional + +- *Type:* [`cdk8s-plus-27.HttpIngressPathType`](#cdk8s-plus-27.HttpIngressPathType) + +How the path is matched against request paths. + +--- + +##### `addRule` + +```typescript +public addRule(path: string, backend: IngressBackend, pathType?: HttpIngressPathType) +``` + +###### `path`Required + +- *Type:* `string` + +The HTTP path. + +--- + +###### `backend`Required + +- *Type:* [`cdk8s-plus-27.IngressBackend`](#cdk8s-plus-27.IngressBackend) + +The backend to route requests to. + +--- + +###### `pathType`Optional + +- *Type:* [`cdk8s-plus-27.HttpIngressPathType`](#cdk8s-plus-27.HttpIngressPathType) + +How the path is matched against request paths. + +--- + +##### `addRules` + +```typescript +public addRules(rules: IngressRule) +``` + +###### `rules`Required + +- *Type:* [`cdk8s-plus-27.IngressRule`](#cdk8s-plus-27.IngressRule) + +The rules to add. + +--- + +##### `addTls` + +```typescript +public addTls(tls: IngressTls[]) +``` + +###### `tls`Required + +- *Type:* [`cdk8s-plus-27.IngressTls`](#cdk8s-plus-27.IngressTls)[] + +--- + + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Job + +A Job creates one or more Pods and ensures that a specified number of them successfully terminate. + +As pods successfully complete, +the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. +Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. +The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). +You can also use a Job to run multiple Pods in parallel. + +#### Initializers + +```typescript +import { Job } from 'cdk8s-plus-27' + +new Job(scope: Construct, id: string, props?: JobProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.JobProps`](#cdk8s-plus-27.JobProps) + +--- + + + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `activeDeadline`Optional + +```typescript +public readonly activeDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +Duration before job is terminated. + +If undefined, there is no deadline. + +--- + +##### `backoffLimit`Optional + +```typescript +public readonly backoffLimit: number; +``` + +- *Type:* `number` + +Number of retries before marking failed. + +--- + +##### `ttlAfterFinished`Optional + +```typescript +public readonly ttlAfterFinished: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +TTL before the job is deleted after it is finished. + +--- + + +### Namespace + +- *Implements:* [`cdk8s-plus-27.INamespaceSelector`](#cdk8s-plus-27.INamespaceSelector), [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +In Kubernetes, namespaces provides a mechanism for isolating groups of resources within a single cluster. + +Names of resources need to be unique within a namespace, but not across namespaces. +Namespace-based scoping is applicable only for namespaced objects (e.g. Deployments, Services, etc) and +not for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc). + +#### Initializers + +```typescript +import { Namespace } from 'cdk8s-plus-27' + +new Namespace(scope: Construct, id: string, props?: NamespaceProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.NamespaceProps`](#cdk8s-plus-27.NamespaceProps) + +--- + +#### Methods + +##### `toNamespaceSelectorConfig` + +```typescript +public toNamespaceSelectorConfig() +``` + +##### `toNetworkPolicyPeerConfig` + +```typescript +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```typescript +public toPodSelector() +``` + + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +#### Constants + +##### `NAME_LABEL` + +- *Type:* `string` + +> https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling + +--- + +### Namespaces + +- *Implements:* [`cdk8s-plus-27.INamespaceSelector`](#cdk8s-plus-27.INamespaceSelector), [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +Represents a group of namespaces. + +#### Initializers + +```typescript +import { Namespaces } from 'cdk8s-plus-27' + +new Namespaces(scope: Construct, id: string, expressions?: LabelExpression[], names?: string[], labels?: {[ key: string ]: string}) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `expressions`Optional + +- *Type:* [`cdk8s-plus-27.LabelExpression`](#cdk8s-plus-27.LabelExpression)[] + +--- + +##### `names`Optional + +- *Type:* `string`[] + +--- + +##### `labels`Optional + +- *Type:* {[ key: string ]: `string`} + +--- + +#### Methods + +##### `toNamespaceSelectorConfig` + +```typescript +public toNamespaceSelectorConfig() +``` + +##### `toNetworkPolicyPeerConfig` + +```typescript +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```typescript +public toPodSelector() +``` + +#### Static Functions + +##### `all` + +```typescript +import { Namespaces } from 'cdk8s-plus-27' + +Namespaces.all(scope: Construct, id: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +##### `select` + +```typescript +import { Namespaces } from 'cdk8s-plus-27' + +Namespaces.select(scope: Construct, id: string, options: NamespacesSelectOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.NamespacesSelectOptions`](#cdk8s-plus-27.NamespacesSelectOptions) + +--- + + + +### NetworkPolicy + +Control traffic flow at the IP address or port level (OSI layer 3 or 4), network policies are an application-centric construct which allow you to specify how a pod is allowed to communicate with various network peers. + +Outgoing traffic is allowed if there are no network policies selecting + the pod (and cluster policy otherwise allows the traffic), + OR if the traffic matches at least one egress rule across all of the + network policies that select the pod. + +- Incoming traffic is allowed to a pod if there are no network policies + selecting the pod (and cluster policy otherwise allows the traffic), + OR if the traffic source is the pod's local node, + OR if the traffic matches at least one ingress rule across all of + the network policies that select the pod. + +Network policies do not conflict; they are additive. +If any policy or policies apply to a given pod for a given +direction, the connections allowed in that direction from +that pod is the union of what the applicable policies allow. +Thus, order of evaluation does not affect the policy result. + +For a connection from a source pod to a destination pod to be allowed, +both the egress policy on the source pod and the ingress policy on the +destination pod need to allow the connection. +If either side does not allow the connection, it will not happen. + +> https://kubernetes.io/docs/concepts/services-networking/network-policies/#networkpolicy-resource + +#### Initializers + +```typescript +import { NetworkPolicy } from 'cdk8s-plus-27' + +new NetworkPolicy(scope: Construct, id: string, props?: NetworkPolicyProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.NetworkPolicyProps`](#cdk8s-plus-27.NetworkPolicyProps) + +--- + +#### Methods + +##### `addEgressRule` + +```typescript +public addEgressRule(peer: INetworkPolicyPeer, ports?: NetworkPolicyPort[]) +``` + +###### `peer`Required + +- *Type:* [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +--- + +###### `ports`Optional + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPort`](#cdk8s-plus-27.NetworkPolicyPort)[] + +--- + +##### `addIngressRule` + +```typescript +public addIngressRule(peer: INetworkPolicyPeer, ports?: NetworkPolicyPort[]) +``` + +###### `peer`Required + +- *Type:* [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +--- + +###### `ports`Optional + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPort`](#cdk8s-plus-27.NetworkPolicyPort)[] + +--- + + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### NetworkPolicyIpBlock + +- *Implements:* [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +Describes a particular CIDR (Ex. + +"192.168.1.1/24","2001:db9::/64") that is +allowed to the pods matched by a network policy selector. +The except entry describes CIDRs that should not be included within this rule. + +#### Methods + +##### `toNetworkPolicyPeerConfig` + +```typescript +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```typescript +public toPodSelector() +``` + +#### Static Functions + +##### `anyIpv4` + +```typescript +import { NetworkPolicyIpBlock } from 'cdk8s-plus-27' + +NetworkPolicyIpBlock.anyIpv4(scope: Construct, id: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +##### `anyIpv6` + +```typescript +import { NetworkPolicyIpBlock } from 'cdk8s-plus-27' + +NetworkPolicyIpBlock.anyIpv6(scope: Construct, id: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +##### `ipv4` + +```typescript +import { NetworkPolicyIpBlock } from 'cdk8s-plus-27' + +NetworkPolicyIpBlock.ipv4(scope: Construct, id: string, cidrIp: string, except?: string[]) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `cidrIp`Required + +- *Type:* `string` + +--- + +###### `except`Optional + +- *Type:* `string`[] + +--- + +##### `ipv6` + +```typescript +import { NetworkPolicyIpBlock } from 'cdk8s-plus-27' + +NetworkPolicyIpBlock.ipv6(scope: Construct, id: string, cidrIp: string, except?: string[]) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `cidrIp`Required + +- *Type:* `string` + +--- + +###### `except`Optional + +- *Type:* `string`[] + +--- + +#### Properties + +##### `cidr`Required + +```typescript +public readonly cidr: string; +``` + +- *Type:* `string` + +A string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". + +--- + +##### `except`Optional + +```typescript +public readonly except: string[]; +``` + +- *Type:* `string`[] + +A slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". Except values will be rejected if they are outside the CIDR range. + +--- + + +### PersistentVolume + +- *Implements:* [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume), [`cdk8s-plus-27.IStorage`](#cdk8s-plus-27.IStorage) + +A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes. + +It is a resource in the cluster just like a node is a cluster resource. +PVs are volume plugins like Volumes, but have a lifecycle independent of any +individual Pod that uses the PV. This API object captures the details of the +implementation of the storage, be that NFS, iSCSI, or a +cloud-provider-specific storage system. + +#### Initializers + +```typescript +import { PersistentVolume } from 'cdk8s-plus-27' + +new PersistentVolume(scope: Construct, id: string, props?: PersistentVolumeProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.PersistentVolumeProps`](#cdk8s-plus-27.PersistentVolumeProps) + +--- + +#### Methods + +##### `asVolume` + +```typescript +public asVolume() +``` + +##### `bind` + +```typescript +public bind(claim: IPersistentVolumeClaim) +``` + +###### `claim`Required + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) + +The PVC to bind to. + +--- + +##### `reserve` + +```typescript +public reserve() +``` + +#### Static Functions + +##### `fromPersistentVolumeName` + +```typescript +import { PersistentVolume } from 'cdk8s-plus-27' + +PersistentVolume.fromPersistentVolumeName(scope: Construct, id: string, volumeName: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `volumeName`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `mode`Required + +```typescript +public readonly mode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) + +Volume mode of this volume. + +--- + +##### `reclaimPolicy`Required + +```typescript +public readonly reclaimPolicy: PersistentVolumeReclaimPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeReclaimPolicy`](#cdk8s-plus-27.PersistentVolumeReclaimPolicy) + +Reclaim policy of this volume. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] + +Access modes requirement of this claim. + +--- + +##### `claim`Optional + +```typescript +public readonly claim: IPersistentVolumeClaim; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) + +PVC this volume is bound to. + +Undefined means this volume is not yet +claimed by any PVC. + +--- + +##### `mountOptions`Optional + +```typescript +public readonly mountOptions: string[]; +``` + +- *Type:* `string`[] + +Mount options of this volume. + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +Storage size of this volume. + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` + +Storage class this volume belongs to. + +--- + + +### PersistentVolumeClaim + +- *Implements:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) + +A PersistentVolumeClaim (PVC) is a request for storage by a user. + +It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. +Pods can request specific levels of resources (CPU and Memory). +Claims can request specific size and access modes + +#### Initializers + +```typescript +import { PersistentVolumeClaim } from 'cdk8s-plus-27' + +new PersistentVolumeClaim(scope: Construct, id: string, props?: PersistentVolumeClaimProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.PersistentVolumeClaimProps`](#cdk8s-plus-27.PersistentVolumeClaimProps) + +--- + +#### Methods + +##### `bind` + +```typescript +public bind(vol: IPersistentVolume) +``` + +###### `vol`Required + +- *Type:* [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume) + +The PV to bind to. + +--- + +#### Static Functions + +##### `fromClaimName` + +```typescript +import { PersistentVolumeClaim } from 'cdk8s-plus-27' + +PersistentVolumeClaim.fromClaimName(scope: Construct, id: string, claimName: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `claimName`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `volumeMode`Required + +```typescript +public readonly volumeMode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) + +Volume mode requirement of this claim. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] + +Access modes requirement of this claim. + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +Storage requirement of this claim. + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` + +Storage class requirment of this claim. + +--- + +##### `volume`Optional + +```typescript +public readonly volume: IPersistentVolume; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume) + +PV this claim is bound to. + +Undefined means the claim is not bound +to any specific volume. + +--- + + +### Pod + +Pod is a collection of containers that can run on a host. + +This resource is +created by clients and scheduled onto hosts. + +#### Initializers + +```typescript +import { Pod } from 'cdk8s-plus-27' + +new Pod(scope: Construct, id: string, props?: PodProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.PodProps`](#cdk8s-plus-27.PodProps) + +--- + + + +#### Properties + +##### `connections`Required + +```typescript +public readonly connections: PodConnections; +``` + +- *Type:* [`cdk8s-plus-27.PodConnections`](#cdk8s-plus-27.PodConnections) + +--- + +##### `podMetadata`Required + +```typescript +public readonly podMetadata: ApiObjectMetadataDefinition; +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `scheduling`Required + +```typescript +public readonly scheduling: PodScheduling; +``` + +- *Type:* [`cdk8s-plus-27.PodScheduling`](#cdk8s-plus-27.PodScheduling) + +--- + +#### Constants + +##### `ADDRESS_LABEL` + +- *Type:* `string` + +This label is autoamtically added by cdk8s to any pod. + +It provides +a unique and stable identifier for the pod. + +--- + +### Pods + +- *Implements:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) + +Represents a group of pods. + +#### Initializers + +```typescript +import { Pods } from 'cdk8s-plus-27' + +new Pods(scope: Construct, id: string, expressions?: LabelExpression[], labels?: {[ key: string ]: string}, namespaces?: INamespaceSelector) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `expressions`Optional + +- *Type:* [`cdk8s-plus-27.LabelExpression`](#cdk8s-plus-27.LabelExpression)[] + +--- + +##### `labels`Optional + +- *Type:* {[ key: string ]: `string`} + +--- + +##### `namespaces`Optional + +- *Type:* [`cdk8s-plus-27.INamespaceSelector`](#cdk8s-plus-27.INamespaceSelector) + +--- + +#### Methods + +##### `toNetworkPolicyPeerConfig` + +```typescript +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```typescript +public toPodSelector() +``` + +##### `toPodSelectorConfig` + +```typescript +public toPodSelectorConfig() +``` + +#### Static Functions + +##### `all` + +```typescript +import { Pods } from 'cdk8s-plus-27' + +Pods.all(scope: Construct, id: string, options?: PodsAllOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PodsAllOptions`](#cdk8s-plus-27.PodsAllOptions) + +--- + +##### `select` + +```typescript +import { Pods } from 'cdk8s-plus-27' + +Pods.select(scope: Construct, id: string, options: PodsSelectOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.PodsSelectOptions`](#cdk8s-plus-27.PodsSelectOptions) + +--- + + + +### Resource + +- *Implements:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource), [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource), [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +Base class for all Kubernetes objects in stdk8s. + +Represents a single +resource. + +#### Initializers + +```typescript +import { Resource } from 'cdk8s-plus-27' + +new Resource(scope: Construct, id: string) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +#### Methods + +##### `asApiResource` + +```typescript +public asApiResource() +``` + +##### `asNonApiResource` + +```typescript +public asNonApiResource() +``` + + +#### Properties + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. "authorization.k8s.io"). + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `metadata`Required + +```typescript +public readonly metadata: ApiObjectMetadataDefinition; +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of this API object. + +--- + +##### `permissions`Required + +```typescript +public readonly permissions: ResourcePermissions; +``` + +- *Type:* [`cdk8s-plus-27.ResourcePermissions`](#cdk8s-plus-27.ResourcePermissions) + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + + +### Role + +- *Implements:* [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole) + +Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. + +#### Initializers + +```typescript +import { Role } from 'cdk8s-plus-27' + +new Role(scope: Construct, id: string, props?: RoleProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.RoleProps`](#cdk8s-plus-27.RoleProps) + +--- + +#### Methods + +##### `allow` + +```typescript +public allow(verbs: string[], resources: IApiResource) +``` + +###### `verbs`Required + +- *Type:* `string`[] + +--- + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowCreate` + +```typescript +public allowCreate(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowDelete` + +```typescript +public allowDelete(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowDeleteCollection` + +```typescript +public allowDeleteCollection(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowGet` + +```typescript +public allowGet(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowList` + +```typescript +public allowList(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowPatch` + +```typescript +public allowPatch(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowRead` + +```typescript +public allowRead(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowReadWrite` + +```typescript +public allowReadWrite(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowUpdate` + +```typescript +public allowUpdate(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `allowWatch` + +```typescript +public allowWatch(resources: IApiResource) +``` + +###### `resources`Required + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +The resource(s) to apply to. + +--- + +##### `bind` + +```typescript +public bind(subjects: ISubject) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +a list of subjects to bind to. + +--- + +#### Static Functions + +##### `fromRoleName` + +```typescript +import { Role } from 'cdk8s-plus-27' + +Role.fromRoleName(scope: Construct, id: string, name: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `rules`Required + +```typescript +public readonly rules: RolePolicyRule[]; +``` + +- *Type:* [`cdk8s-plus-27.RolePolicyRule`](#cdk8s-plus-27.RolePolicyRule)[] + +Rules associaated with this Role. + +Returns a copy, use `allow` to add rules. + +--- + + +### RoleBinding + +A RoleBinding grants permissions within a specific namespace to a user or set of users. + +#### Initializers + +```typescript +import { RoleBinding } from 'cdk8s-plus-27' + +new RoleBinding(scope: Construct, id: string, props: RoleBindingProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.RoleBindingProps`](#cdk8s-plus-27.RoleBindingProps) + +--- + +#### Methods + +##### `addSubjects` + +```typescript +public addSubjects(subjects: ISubject) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +The subjects to add. + +--- + + +#### Properties + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `role`Required + +```typescript +public readonly role: IRole; +``` + +- *Type:* [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole) + +--- + +##### `subjects`Required + +```typescript +public readonly subjects: ISubject[]; +``` + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject)[] + +--- + + +### Secret + +- *Implements:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys. + +Storing confidential information in a +Secret is safer and more flexible than putting it verbatim in a Pod +definition or in a container image. + +> https://kubernetes.io/docs/concepts/configuration/secret + +#### Initializers + +```typescript +import { Secret } from 'cdk8s-plus-27' + +new Secret(scope: Construct, id: string, props?: SecretProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.SecretProps`](#cdk8s-plus-27.SecretProps) + +--- + +#### Methods + +##### `addStringData` + +```typescript +public addStringData(key: string, value: string) +``` + +###### `key`Required + +- *Type:* `string` + +Key. + +--- + +###### `value`Required + +- *Type:* `string` + +Value. + +--- + +##### `envValue` + +```typescript +public envValue(key: string, options?: EnvValueFromSecretOptions) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromSecretOptions`](#cdk8s-plus-27.EnvValueFromSecretOptions) + +--- + +##### `getStringData` + +```typescript +public getStringData(key: string) +``` + +###### `key`Required + +- *Type:* `string` + +Key. + +--- + +#### Static Functions + +##### `fromSecretName` + +```typescript +import { Secret } from 'cdk8s-plus-27' + +Secret.fromSecretName(scope: Construct, id: string, name: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `immutable`Required + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` + +Whether or not the secret is immutable. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + + +### Service + +An abstract way to expose an application running on a set of Pods as a network service. + +With Kubernetes you don't need to modify your application to use an unfamiliar service discovery mechanism. +Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them. + +For example, consider a stateless image-processing backend which is running with 3 replicas. Those replicas are fungible—frontends do not care which backend they use. +While the actual Pods that compose the backend set may change, the frontend clients should not need to be aware of that, +nor should they need to keep track of the set of backends themselves. +The Service abstraction enables this decoupling. + +If you're able to use Kubernetes APIs for service discovery in your application, you can query the API server for Endpoints, +that get updated whenever the set of Pods in a Service changes. For non-native applications, Kubernetes offers ways to place a network port +or load balancer in between your application and the backend Pods. + +#### Initializers + +```typescript +import { Service } from 'cdk8s-plus-27' + +new Service(scope: Construct, id: string, props?: ServiceProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.ServiceProps`](#cdk8s-plus-27.ServiceProps) + +--- + +#### Methods + +##### `bind` + +```typescript +public bind(port: number, options?: ServiceBindOptions) +``` + +###### `port`Required + +- *Type:* `number` + +The port definition. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.ServiceBindOptions`](#cdk8s-plus-27.ServiceBindOptions) + +--- + +##### `exposeViaIngress` + +```typescript +public exposeViaIngress(path: string, options?: ExposeServiceViaIngressOptions) +``` + +###### `path`Required + +- *Type:* `string` + +The path to expose the service under. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.ExposeServiceViaIngressOptions`](#cdk8s-plus-27.ExposeServiceViaIngressOptions) + +Additional options. + +--- + +##### `select` + +```typescript +public select(selector: IPodSelector) +``` + +###### `selector`Required + +- *Type:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) + +--- + +##### `selectLabel` + +```typescript +public selectLabel(key: string, value: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `value`Required + +- *Type:* `string` + +--- + + +#### Properties + +##### `port`Required + +```typescript +public readonly port: number; +``` + +- *Type:* `number` + +Return the first port of the service. + +--- + +##### `ports`Required + +```typescript +public readonly ports: ServicePort[]; +``` + +- *Type:* [`cdk8s-plus-27.ServicePort`](#cdk8s-plus-27.ServicePort)[] + +Ports for this service. + +Use `bind()` to bind additional service ports. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `type`Required + +```typescript +public readonly type: ServiceType; +``` + +- *Type:* [`cdk8s-plus-27.ServiceType`](#cdk8s-plus-27.ServiceType) + +Determines how the Service is exposed. + +--- + +##### `clusterIP`Optional + +```typescript +public readonly clusterIP: string; +``` + +- *Type:* `string` + +The IP address of the service and is usually assigned randomly by the master. + +--- + +##### `externalName`Optional + +```typescript +public readonly externalName: string; +``` + +- *Type:* `string` + +The externalName to be used for EXTERNAL_NAME types. + +--- + + +### ServiceAccount + +- *Implements:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount), [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account + +#### Initializers + +```typescript +import { ServiceAccount } from 'cdk8s-plus-27' + +new ServiceAccount(scope: Construct, id: string, props?: ServiceAccountProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.ServiceAccountProps`](#cdk8s-plus-27.ServiceAccountProps) + +--- + +#### Methods + +##### `addSecret` + +```typescript +public addSecret(secr: ISecret) +``` + +###### `secr`Required + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +The secret. + +--- + +##### `toSubjectConfiguration` + +```typescript +public toSubjectConfiguration() +``` + +#### Static Functions + +##### `fromServiceAccountName` + +```typescript +import { ServiceAccount } from 'cdk8s-plus-27' + +ServiceAccount.fromServiceAccountName(scope: Construct, id: string, name: string, options?: FromServiceAccountNameOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +The name of the service account resource. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.FromServiceAccountNameOptions`](#cdk8s-plus-27.FromServiceAccountNameOptions) + +additional options. + +--- + +#### Properties + +##### `automountToken`Required + +```typescript +public readonly automountToken: boolean; +``` + +- *Type:* `boolean` + +Whether or not a token is automatically mounted for this service account. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `secrets`Required + +```typescript +public readonly secrets: ISecret[]; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret)[] + +List of secrets allowed to be used by pods running using this service account. + +Returns a copy. To add a secret, use `addSecret()`. + +--- + + +### ServiceAccountTokenSecret + +Create a secret for a service account token. + +> https://kubernetes.io/docs/concepts/configuration/secret/#service-account-token-secrets + +#### Initializers + +```typescript +import { ServiceAccountTokenSecret } from 'cdk8s-plus-27' + +new ServiceAccountTokenSecret(scope: Construct, id: string, props: ServiceAccountTokenSecretProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.ServiceAccountTokenSecretProps`](#cdk8s-plus-27.ServiceAccountTokenSecretProps) + +--- + + + + + +### SshAuthSecret + +Create a secret for ssh authentication. + +> https://kubernetes.io/docs/concepts/configuration/secret/#ssh-authentication-secrets + +#### Initializers + +```typescript +import { SshAuthSecret } from 'cdk8s-plus-27' + +new SshAuthSecret(scope: Construct, id: string, props: SshAuthSecretProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.SshAuthSecretProps`](#cdk8s-plus-27.SshAuthSecretProps) + +--- + + + + + +### StatefulSet + +- *Implements:* [`cdk8s-plus-27.IScalable`](#cdk8s-plus-27.IScalable) + +StatefulSet is the workload API object used to manage stateful applications. + +Manages the deployment and scaling of a set of Pods, and provides guarantees +about the ordering and uniqueness of these Pods. + +Like a Deployment, a StatefulSet manages Pods that are based on an identical +container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity +for each of their Pods. These pods are created from the same spec, but are not +interchangeable: each has a persistent identifier that it maintains across any +rescheduling. + +If you want to use storage volumes to provide persistence for your workload, you +can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet +are susceptible to failure, the persistent Pod identifiers make it easier to match existing +volumes to the new Pods that replace any that have failed. + +Using StatefulSets +------------------ +StatefulSets are valuable for applications that require one or more of the following. + +- Stable, unique network identifiers. +- Stable, persistent storage. +- Ordered, graceful deployment and scaling. +- Ordered, automated rolling updates. + +#### Initializers + +```typescript +import { StatefulSet } from 'cdk8s-plus-27' + +new StatefulSet(scope: Construct, id: string, props: StatefulSetProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.StatefulSetProps`](#cdk8s-plus-27.StatefulSetProps) + +--- + +#### Methods + +##### `markHasAutoscaler` + +```typescript +public markHasAutoscaler() +``` + +##### `toScalingTarget` + +```typescript +public toScalingTarget() +``` + + +#### Properties + +##### `minReady`Required + +```typescript +public readonly minReady: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +##### `podManagementPolicy`Required + +```typescript +public readonly podManagementPolicy: PodManagementPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PodManagementPolicy`](#cdk8s-plus-27.PodManagementPolicy) + +Management policy to use for the set. + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +--- + +##### `service`Required + +```typescript +public readonly service: Service; +``` + +- *Type:* [`cdk8s-plus-27.Service`](#cdk8s-plus-27.Service) + +--- + +##### `strategy`Required + +```typescript +public readonly strategy: StatefulSetUpdateStrategy; +``` + +- *Type:* [`cdk8s-plus-27.StatefulSetUpdateStrategy`](#cdk8s-plus-27.StatefulSetUpdateStrategy) + +The update startegy of this stateful set. + +--- + +##### `replicas`Optional + +```typescript +public readonly replicas: number; +``` + +- *Type:* `number` + +Number of desired pods. + +--- + +##### `hasAutoscaler`Required + +```typescript +public readonly hasAutoscaler: boolean; +``` + +- *Type:* `boolean` + +If this is a target of an autoscaler. + +--- + + +### TlsSecret + +Create a secret for storing a TLS certificate and its associated key. + +> https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets + +#### Initializers + +```typescript +import { TlsSecret } from 'cdk8s-plus-27' + +new TlsSecret(scope: Construct, id: string, props: TlsSecretProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.TlsSecretProps`](#cdk8s-plus-27.TlsSecretProps) + +--- + + + + + +### User + +- *Implements:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +Represents a user. + +#### Methods + +##### `toSubjectConfiguration` + +```typescript +public toSubjectConfiguration() +``` + +#### Static Functions + +##### `fromName` + +```typescript +import { User } from 'cdk8s-plus-27' + +User.fromName(scope: Construct, id: string, name: string) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +--- + +##### `apiGroup`Optional + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +--- + + +### Volume + +- *Implements:* [`cdk8s-plus-27.IStorage`](#cdk8s-plus-27.IStorage) + +Volume represents a named volume in a pod that may be accessed by any container in the pod. + +Docker also has a concept of volumes, though it is somewhat looser and less +managed. In Docker, a volume is simply a directory on disk or in another +Container. Lifetimes are not managed and until very recently there were only +local-disk-backed volumes. Docker now provides volume drivers, but the +functionality is very limited for now (e.g. as of Docker 1.7 only one volume +driver is allowed per Container and there is no way to pass parameters to +volumes). + +A Kubernetes volume, on the other hand, has an explicit lifetime - the same +as the Pod that encloses it. Consequently, a volume outlives any Containers +that run within the Pod, and data is preserved across Container restarts. Of +course, when a Pod ceases to exist, the volume will cease to exist, too. +Perhaps more importantly than this, Kubernetes supports many types of +volumes, and a Pod can use any number of them simultaneously. + +At its core, a volume is just a directory, possibly with some data in it, +which is accessible to the Containers in a Pod. How that directory comes to +be, the medium that backs it, and the contents of it are determined by the +particular volume type used. + +To use a volume, a Pod specifies what volumes to provide for the Pod (the +.spec.volumes field) and where to mount those into Containers (the +.spec.containers[*].volumeMounts field). + +A process in a container sees a filesystem view composed from their Docker +image and volumes. The Docker image is at the root of the filesystem +hierarchy, and any volumes are mounted at the specified paths within the +image. Volumes can not mount onto other volumes + +#### Methods + +##### `asVolume` + +```typescript +public asVolume() +``` + +#### Static Functions + +##### `fromAwsElasticBlockStore` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromAwsElasticBlockStore(scope: Construct, id: string, volumeId: string, options?: AwsElasticBlockStoreVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `volumeId`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.AwsElasticBlockStoreVolumeOptions`](#cdk8s-plus-27.AwsElasticBlockStoreVolumeOptions) + +--- + +##### `fromAzureDisk` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromAzureDisk(scope: Construct, id: string, diskName: string, diskUri: string, options?: AzureDiskVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `diskName`Required + +- *Type:* `string` + +--- + +###### `diskUri`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.AzureDiskVolumeOptions`](#cdk8s-plus-27.AzureDiskVolumeOptions) + +--- + +##### `fromConfigMap` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromConfigMap(scope: Construct, id: string, configMap: IConfigMap, options?: ConfigMapVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `configMap`Required + +- *Type:* [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap) + +The config map to use to populate the volume. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.ConfigMapVolumeOptions`](#cdk8s-plus-27.ConfigMapVolumeOptions) + +Options. + +--- + +##### `fromCsi` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromCsi(scope: Construct, id: string, driver: string, options?: CsiVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `driver`Required + +- *Type:* `string` + +The name of the CSI driver to use to populate the volume. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.CsiVolumeOptions`](#cdk8s-plus-27.CsiVolumeOptions) + +Options for the CSI volume, including driver-specific ones. + +--- + +##### `fromEmptyDir` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromEmptyDir(scope: Construct, id: string, name: string, options?: EmptyDirVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EmptyDirVolumeOptions`](#cdk8s-plus-27.EmptyDirVolumeOptions) + +Additional options. + +--- + +##### `fromGcePersistentDisk` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromGcePersistentDisk(scope: Construct, id: string, pdName: string, options?: GCEPersistentDiskVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `pdName`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.GCEPersistentDiskVolumeOptions`](#cdk8s-plus-27.GCEPersistentDiskVolumeOptions) + +--- + +##### `fromHostPath` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromHostPath(scope: Construct, id: string, name: string, options: HostPathVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.HostPathVolumeOptions`](#cdk8s-plus-27.HostPathVolumeOptions) + +--- + +##### `fromNfs` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromNfs(scope: Construct, id: string, name: string, options: NfsVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `name`Required + +- *Type:* `string` + +--- + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.NfsVolumeOptions`](#cdk8s-plus-27.NfsVolumeOptions) + +--- + +##### `fromPersistentVolumeClaim` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromPersistentVolumeClaim(scope: Construct, id: string, claim: IPersistentVolumeClaim, options?: PersistentVolumeClaimVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `claim`Required + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PersistentVolumeClaimVolumeOptions`](#cdk8s-plus-27.PersistentVolumeClaimVolumeOptions) + +--- + +##### `fromSecret` + +```typescript +import { Volume } from 'cdk8s-plus-27' + +Volume.fromSecret(scope: Construct, id: string, secr: ISecret, options?: SecretVolumeOptions) +``` + +###### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +###### `id`Required + +- *Type:* `string` + +--- + +###### `secr`Required + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +The secret to use to populate the volume. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.SecretVolumeOptions`](#cdk8s-plus-27.SecretVolumeOptions) + +Options. + +--- + +#### Properties + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +--- + + +### Workload + +A workload is an application running on Kubernetes. + +Whether your workload is a single +component or several that work together, on Kubernetes you run it inside a set of pods. +In Kubernetes, a Pod represents a set of running containers on your cluster. + +#### Initializers + +```typescript +import { Workload } from 'cdk8s-plus-27' + +new Workload(scope: Construct, id: string, props: WorkloadProps) +``` + +##### `scope`Required + +- *Type:* [`constructs.Construct`](#constructs.Construct) + +--- + +##### `id`Required + +- *Type:* `string` + +--- + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.WorkloadProps`](#cdk8s-plus-27.WorkloadProps) + +--- + +#### Methods + +##### `select` + +```typescript +public select(selectors: LabelSelector) +``` + +###### `selectors`Required + +- *Type:* [`cdk8s-plus-27.LabelSelector`](#cdk8s-plus-27.LabelSelector) + +--- + + +#### Properties + +##### `connections`Required + +```typescript +public readonly connections: PodConnections; +``` + +- *Type:* [`cdk8s-plus-27.PodConnections`](#cdk8s-plus-27.PodConnections) + +--- + +##### `matchExpressions`Required + +```typescript +public readonly matchExpressions: LabelSelectorRequirement[]; +``` + +- *Type:* [`cdk8s-plus-27.LabelSelectorRequirement`](#cdk8s-plus-27.LabelSelectorRequirement)[] + +The expression matchers this workload will use in order to select pods. + +Returns a a copy. Use `select()` to add expression matchers. + +--- + +##### `matchLabels`Required + +```typescript +public readonly matchLabels: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +The label matchers this workload will use in order to select pods. + +Returns a a copy. Use `select()` to add label matchers. + +--- + +##### `podMetadata`Required + +```typescript +public readonly podMetadata: ApiObjectMetadataDefinition; +``` + +- *Type:* [`cdk8s.ApiObjectMetadataDefinition`](#cdk8s.ApiObjectMetadataDefinition) + +The metadata of pods in this workload. + +--- + +##### `scheduling`Required + +```typescript +public readonly scheduling: WorkloadScheduling; +``` + +- *Type:* [`cdk8s-plus-27.WorkloadScheduling`](#cdk8s-plus-27.WorkloadScheduling) + +--- + + +## Structs + +### AbstractPodProps + +Properties for `AbstractPod`. + +#### Initializer + +```typescript +import { AbstractPodProps } from 'cdk8s-plus-27' + +const abstractPodProps: AbstractPodProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +### AddDeploymentOptions + +Options to add a deployment to a service. + +#### Initializer + +```typescript +import { AddDeploymentOptions } from 'cdk8s-plus-27' + +const addDeploymentOptions: AddDeploymentOptions = { ... } +``` + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `nodePort`Optional + +```typescript +public readonly nodePort: number; +``` + +- *Type:* `number` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```typescript +public readonly protocol: Protocol; +``` + +- *Type:* [`cdk8s-plus-27.Protocol`](#cdk8s-plus-27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `targetPort`Optional + +```typescript +public readonly targetPort: number; +``` + +- *Type:* `number` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* Copied from the first container of the deployment. + +The port number the service will bind to. + +--- + +### AddDirectoryOptions + +Options for `configmap.addDirectory()`. + +#### Initializer + +```typescript +import { AddDirectoryOptions } from 'cdk8s-plus-27' + +const addDirectoryOptions: AddDirectoryOptions = { ... } +``` + +##### `exclude`Optional + +```typescript +public readonly exclude: string[]; +``` + +- *Type:* `string`[] +- *Default:* include all files + +Glob patterns to exclude when adding files. + +--- + +##### `keyPrefix`Optional + +```typescript +public readonly keyPrefix: string; +``` + +- *Type:* `string` +- *Default:* "" + +A prefix to add to all keys in the config map. + +--- + +### ApiResourceOptions + +Options for `ApiResource`. + +#### Initializer + +```typescript +import { ApiResourceOptions } from 'cdk8s-plus-27' + +const apiResourceOptions: ApiResourceOptions = { ... } +``` + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +### AwsElasticBlockStorePersistentVolumeProps + +Properties for `AwsElasticBlockStorePersistentVolume`. + +#### Initializer + +```typescript +import { AwsElasticBlockStorePersistentVolumeProps } from 'cdk8s-plus-27' + +const awsElasticBlockStorePersistentVolumeProps: AwsElasticBlockStorePersistentVolumeProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```typescript +public readonly claim: IPersistentVolumeClaim; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```typescript +public readonly mountOptions: string[]; +``` + +- *Type:* `string`[] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```typescript +public readonly reclaimPolicy: PersistentVolumeReclaimPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeReclaimPolicy`](#cdk8s-plus-27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```typescript +public readonly volumeMode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `volumeId`Required + +```typescript +public readonly volumeId: string; +``` + +- *Type:* `string` + +Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + +More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### AwsElasticBlockStoreVolumeOptions + +Options of `Volume.fromAwsElasticBlockStore`. + +#### Initializer + +```typescript +import { AwsElasticBlockStoreVolumeOptions } from 'cdk8s-plus-27' + +const awsElasticBlockStoreVolumeOptions: AwsElasticBlockStoreVolumeOptions = { ... } +``` + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto-generated + +The volume name. + +--- + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### AzureDiskPersistentVolumeProps + +Properties for `AzureDiskPersistentVolume`. + +#### Initializer + +```typescript +import { AzureDiskPersistentVolumeProps } from 'cdk8s-plus-27' + +const azureDiskPersistentVolumeProps: AzureDiskPersistentVolumeProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```typescript +public readonly claim: IPersistentVolumeClaim; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```typescript +public readonly mountOptions: string[]; +``` + +- *Type:* `string`[] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```typescript +public readonly reclaimPolicy: PersistentVolumeReclaimPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeReclaimPolicy`](#cdk8s-plus-27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```typescript +public readonly volumeMode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `diskName`Required + +```typescript +public readonly diskName: string; +``` + +- *Type:* `string` + +The Name of the data disk in the blob storage. + +--- + +##### `diskUri`Required + +```typescript +public readonly diskUri: string; +``` + +- *Type:* `string` + +The URI the data disk in the blob storage. + +--- + +##### `cachingMode`Optional + +```typescript +public readonly cachingMode: AzureDiskPersistentVolumeCachingMode; +``` + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeCachingMode`](#cdk8s-plus-27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +```typescript +public readonly kind: AzureDiskPersistentVolumeKind; +``` + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeKind`](#cdk8s-plus-27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +### AzureDiskVolumeOptions + +Options of `Volume.fromAzureDisk`. + +#### Initializer + +```typescript +import { AzureDiskVolumeOptions } from 'cdk8s-plus-27' + +const azureDiskVolumeOptions: AzureDiskVolumeOptions = { ... } +``` + +##### `cachingMode`Optional + +```typescript +public readonly cachingMode: AzureDiskPersistentVolumeCachingMode; +``` + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeCachingMode`](#cdk8s-plus-27.AzureDiskPersistentVolumeCachingMode) +- *Default:* AzureDiskPersistentVolumeCachingMode.NONE. + +Host Caching mode. + +--- + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* 'ext4' + +Filesystem type to mount. + +Must be a filesystem type supported by the host operating system. + +--- + +##### `kind`Optional + +```typescript +public readonly kind: AzureDiskPersistentVolumeKind; +``` + +- *Type:* [`cdk8s-plus-27.AzureDiskPersistentVolumeKind`](#cdk8s-plus-27.AzureDiskPersistentVolumeKind) +- *Default:* AzureDiskPersistentVolumeKind.SHARED + +Kind of disk. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto-generated + +The volume name. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Force the ReadOnly setting in VolumeMounts. + +--- + +### BasicAuthSecretProps + +Options for `BasicAuthSecret`. + +#### Initializer + +```typescript +import { BasicAuthSecretProps } from 'cdk8s-plus-27' + +const basicAuthSecretProps: BasicAuthSecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `password`Required + +```typescript +public readonly password: string; +``` + +- *Type:* `string` + +The password or token for authentication. + +--- + +##### `username`Required + +```typescript +public readonly username: string; +``` + +- *Type:* `string` + +The user name for authentication. + +--- + +### ClusterRoleBindingProps + +Properties for `ClusterRoleBinding`. + +#### Initializer + +```typescript +import { ClusterRoleBindingProps } from 'cdk8s-plus-27' + +const clusterRoleBindingProps: ClusterRoleBindingProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +```typescript +public readonly role: IClusterRole; +``` + +- *Type:* [`cdk8s-plus-27.IClusterRole`](#cdk8s-plus-27.IClusterRole) + +The role to bind to. + +--- + +### ClusterRolePolicyRule + +Policy rule of a `ClusterRole. + +#### Initializer + +```typescript +import { ClusterRolePolicyRule } from 'cdk8s-plus-27' + +const clusterRolePolicyRule: ClusterRolePolicyRule = { ... } +``` + +##### `endpoints`Required + +```typescript +public readonly endpoints: IApiEndpoint[]; +``` + +- *Type:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint)[] + +Endpoints this rule applies to. + +Can be either api resources +or non api resources. + +--- + +##### `verbs`Required + +```typescript +public readonly verbs: string[]; +``` + +- *Type:* `string`[] + +Verbs to allow. + +(e.g ['get', 'watch']) + +--- + +### ClusterRoleProps + +Properties for `ClusterRole`. + +#### Initializer + +```typescript +import { ClusterRoleProps } from 'cdk8s-plus-27' + +const clusterRoleProps: ClusterRoleProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `aggregationLabels`Optional + +```typescript +public readonly aggregationLabels: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole's rules. + +--- + +##### `rules`Optional + +```typescript +public readonly rules: ClusterRolePolicyRule[]; +``` + +- *Type:* [`cdk8s-plus-27.ClusterRolePolicyRule`](#cdk8s-plus-27.ClusterRolePolicyRule)[] +- *Default:* [] + +A list of rules the role should allow. + +--- + +### CommandProbeOptions + +Options for `Probe.fromCommand()`. + +#### Initializer + +```typescript +import { CommandProbeOptions } from 'cdk8s-plus-27' + +const commandProbeOptions: CommandProbeOptions = { ... } +``` + +##### `failureThreshold`Optional + +```typescript +public readonly failureThreshold: number; +``` + +- *Type:* `number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```typescript +public readonly initialDelaySeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```typescript +public readonly periodSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```typescript +public readonly successThreshold: number; +``` + +- *Type:* `number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```typescript +public readonly timeoutSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +### CommonSecretProps + +Common properties for `Secret`. + +#### Initializer + +```typescript +import { CommonSecretProps } from 'cdk8s-plus-27' + +const commonSecretProps: CommonSecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +### ConfigMapProps + +Properties for initialization of `ConfigMap`. + +#### Initializer + +```typescript +import { ConfigMapProps } from 'cdk8s-plus-27' + +const configMapProps: ConfigMapProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `binaryData`Optional + +```typescript +public readonly binaryData: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +BinaryData contains the binary data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. +BinaryData can contain byte sequences that are not in the UTF-8 range. The +keys stored in BinaryData must not overlap with the ones in the Data field, +this is enforced during validation process. + +You can also add binary data using `configMap.addBinaryData()`. + +--- + +##### `data`Optional + +```typescript +public readonly data: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +Data contains the configuration data. + +Each key must consist of alphanumeric characters, '-', '_' or '.'. Values +with non-UTF-8 byte sequences must use the BinaryData field. The keys +stored in Data must not overlap with the keys in the BinaryData field, this +is enforced during validation process. + +You can also add data using `configMap.addData()`. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +### ConfigMapVolumeOptions + +Options for the ConfigMap-based volume. + +#### Initializer + +```typescript +import { ConfigMapVolumeOptions } from 'cdk8s-plus-27' + +const configMapVolumeOptions: ConfigMapVolumeOptions = { ... } +``` + +##### `defaultMode`Optional + +```typescript +public readonly defaultMode: number; +``` + +- *Type:* `number` +- *Default:* 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. + +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. + +--- + +##### `items`Optional + +```typescript +public readonly items: {[ key: string ]: PathMapping}; +``` + +- *Type:* {[ key: string ]: [`cdk8s-plus-27.PathMapping`](#cdk8s-plus-27.PathMapping)} +- *Default:* no mapping + +If unspecified, each key-value pair in the Data field of the referenced ConfigMap 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 ConfigMap, the volume setup will +error unless it is marked optional. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto-generated + +The volume name. + +--- + +##### `optional`Optional + +```typescript +public readonly optional: boolean; +``` + +- *Type:* `boolean` +- *Default:* undocumented + +Specify whether the ConfigMap or its keys must be defined. + +--- + +### ContainerLifecycle + +Container lifecycle properties. + +#### Initializer + +```typescript +import { ContainerLifecycle } from 'cdk8s-plus-27' + +const containerLifecycle: ContainerLifecycle = { ... } +``` + +##### `postStart`Optional + +```typescript +public readonly postStart: Handler; +``` + +- *Type:* [`cdk8s-plus-27.Handler`](#cdk8s-plus-27.Handler) +- *Default:* No post start handler. + +This hook is executed immediately after a container is created. + +However, +there is no guarantee that the hook will execute before the container ENTRYPOINT. + +--- + +##### `preStop`Optional + +```typescript +public readonly preStop: Handler; +``` + +- *Type:* [`cdk8s-plus-27.Handler`](#cdk8s-plus-27.Handler) +- *Default:* No pre stop handler. + +This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others. + +A call to the PreStop hook fails if the container is already in a terminated or completed state +and the hook must complete before the TERM signal to stop the container can be sent. +The Pod's termination grace period countdown begins before the PreStop hook is executed, +so regardless of the outcome of the handler, the container will eventually terminate +within the Pod's termination grace period. No parameters are passed to the handler. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination + +--- + +### ContainerOpts + +Optional properties of a container. + +#### Initializer + +```typescript +import { ContainerOpts } from 'cdk8s-plus-27' + +const containerOpts: ContainerOpts = { ... } +``` + +##### `args`Optional + +```typescript +public readonly args: string[]; +``` + +- *Type:* `string`[] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +```typescript +public readonly command: string[]; +``` + +- *Type:* `string`[] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `envFrom`Optional + +```typescript +public readonly envFrom: EnvFrom[]; +``` + +- *Type:* [`cdk8s-plus-27.EnvFrom`](#cdk8s-plus-27.EnvFrom)[] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `envVariables`Optional + +```typescript +public readonly envVariables: {[ key: string ]: EnvValue}; +``` + +- *Type:* {[ key: string ]: [`cdk8s-plus-27.EnvValue`](#cdk8s-plus-27.EnvValue)} +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `imagePullPolicy`Optional + +```typescript +public readonly imagePullPolicy: ImagePullPolicy; +``` + +- *Type:* [`cdk8s-plus-27.ImagePullPolicy`](#cdk8s-plus-27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +```typescript +public readonly lifecycle: ContainerLifecycle; +``` + +- *Type:* [`cdk8s-plus-27.ContainerLifecycle`](#cdk8s-plus-27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +```typescript +public readonly liveness: Probe; +``` + +- *Type:* [`cdk8s-plus-27.Probe`](#cdk8s-plus-27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```typescript +public readonly port: number; +``` + +- *Type:* `number` + +--- + +##### `portNumber`Optional + +```typescript +public readonly portNumber: number; +``` + +- *Type:* `number` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: ContainerPort[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerPort`](#cdk8s-plus-27.ContainerPort)[] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +```typescript +public readonly readiness: Probe; +``` + +- *Type:* [`cdk8s-plus-27.Probe`](#cdk8s-plus-27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +```typescript +public readonly resources: ContainerResources; +``` + +- *Type:* [`cdk8s-plus-27.ContainerResources`](#cdk8s-plus-27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: ContainerSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.ContainerSecurityContextProps`](#cdk8s-plus-27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +```typescript +public readonly startup: Probe; +``` + +- *Type:* [`cdk8s-plus-27.Probe`](#cdk8s-plus-27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volumeMounts`Optional + +```typescript +public readonly volumeMounts: VolumeMount[]; +``` + +- *Type:* [`cdk8s-plus-27.VolumeMount`](#cdk8s-plus-27.VolumeMount)[] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `workingDir`Optional + +```typescript +public readonly workingDir: string; +``` + +- *Type:* `string` +- *Default:* The container runtime's default. + +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. + +--- + +### ContainerPort + +Represents a network port in a single container. + +#### Initializer + +```typescript +import { ContainerPort } from 'cdk8s-plus-27' + +const containerPort: ContainerPort = { ... } +``` + +##### `number`Required + +```typescript +public readonly number: number; +``` + +- *Type:* `number` + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +--- + +##### `hostIp`Optional + +```typescript +public readonly hostIp: string; +``` + +- *Type:* `string` +- *Default:* 127.0.0.1. + +What host IP to bind the external port to. + +--- + +##### `hostPort`Optional + +```typescript +public readonly hostPort: number; +``` + +- *Type:* `number` +- *Default:* auto generated by kubernetes and might change on restarts. + +Number of port to expose on the host. + +If specified, this must be a valid port number, 0 < x < 65536. +Most containers do not need this. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* port is not named. + +If specified, this must be an IANA_SVC_NAME and unique within the pod. + +Each named port in a pod must have a unique name. +Name for the port that can be referred to by services. + +--- + +##### `protocol`Optional + +```typescript +public readonly protocol: Protocol; +``` + +- *Type:* [`cdk8s-plus-27.Protocol`](#cdk8s-plus-27.Protocol) +- *Default:* Protocol.TCP + +Protocol for port. + +Must be UDP, TCP, or SCTP. Defaults to "TCP". + +--- + +### ContainerProps + +Properties for creating a container. + +#### Initializer + +```typescript +import { ContainerProps } from 'cdk8s-plus-27' + +const containerProps: ContainerProps = { ... } +``` + +##### `args`Optional + +```typescript +public readonly args: string[]; +``` + +- *Type:* `string`[] +- *Default:* [] + +Arguments to the entrypoint. The docker image's CMD is used if `command` 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. + +Cannot be updated. + +> https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `command`Optional + +```typescript +public readonly command: string[]; +``` + +- *Type:* `string`[] +- *Default:* The docker image's ENTRYPOINT. + +Entrypoint array. + +Not executed within a shell. The docker image's ENTRYPOINT 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. Cannot be updated. +More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +--- + +##### `envFrom`Optional + +```typescript +public readonly envFrom: EnvFrom[]; +``` + +- *Type:* [`cdk8s-plus-27.EnvFrom`](#cdk8s-plus-27.EnvFrom)[] +- *Default:* No sources. + +List of sources to populate environment variables in the container. + +When a key exists in multiple sources, the value associated with +the last source will take precedence. Values defined by the `envVariables` property +with a duplicate key will take precedence. + +--- + +##### `envVariables`Optional + +```typescript +public readonly envVariables: {[ key: string ]: EnvValue}; +``` + +- *Type:* {[ key: string ]: [`cdk8s-plus-27.EnvValue`](#cdk8s-plus-27.EnvValue)} +- *Default:* No environment variables. + +Environment variables to set in the container. + +--- + +##### `imagePullPolicy`Optional + +```typescript +public readonly imagePullPolicy: ImagePullPolicy; +``` + +- *Type:* [`cdk8s-plus-27.ImagePullPolicy`](#cdk8s-plus-27.ImagePullPolicy) +- *Default:* ImagePullPolicy.ALWAYS + +Image pull policy for this container. + +--- + +##### `lifecycle`Optional + +```typescript +public readonly lifecycle: ContainerLifecycle; +``` + +- *Type:* [`cdk8s-plus-27.ContainerLifecycle`](#cdk8s-plus-27.ContainerLifecycle) + +Describes actions that the management system should take in response to container lifecycle events. + +--- + +##### `liveness`Optional + +```typescript +public readonly liveness: Probe; +``` + +- *Type:* [`cdk8s-plus-27.Probe`](#cdk8s-plus-27.Probe) +- *Default:* no liveness probe is defined + +Periodic probe of container liveness. + +Container will be restarted if the probe fails. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* 'main' + +Name of the container specified as a DNS_LABEL. + +Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```typescript +public readonly port: number; +``` + +- *Type:* `number` + +--- + +##### `portNumber`Optional + +```typescript +public readonly portNumber: number; +``` + +- *Type:* `number` +- *Default:* Only the ports mentiond in the `ports` property are exposed. + +Number of port to expose on the pod's IP address. + +This must be a valid port number, 0 < x < 65536. + +This is a convinience property if all you need a single TCP numbered port. +In case more advanced configuartion is required, use the `ports` property. + +This port is added to the list of ports mentioned in the `ports` property. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: ContainerPort[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerPort`](#cdk8s-plus-27.ContainerPort)[] +- *Default:* Only the port mentioned in the `portNumber` property is exposed. + +List of ports to expose from this container. + +--- + +##### `readiness`Optional + +```typescript +public readonly readiness: Probe; +``` + +- *Type:* [`cdk8s-plus-27.Probe`](#cdk8s-plus-27.Probe) +- *Default:* no readiness probe is defined + +Determines when the container is ready to serve traffic. + +--- + +##### `resources`Optional + +```typescript +public readonly resources: ContainerResources; +``` + +- *Type:* [`cdk8s-plus-27.ContainerResources`](#cdk8s-plus-27.ContainerResources) +- *Default:* cpu: + request: 1000 millis + limit: 1500 millis + memory: + request: 512 mebibytes + limit: 2048 mebibytes + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: ContainerSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.ContainerSecurityContextProps`](#cdk8s-plus-27.ContainerSecurityContextProps) +- *Default:* ensureNonRoot: true + privileged: false + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false + user: 25000 + group: 26000 + +SecurityContext defines the security options the container should be run with. + +If set, the fields override equivalent fields of the pod's security context. + +> https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +--- + +##### `startup`Optional + +```typescript +public readonly startup: Probe; +``` + +- *Type:* [`cdk8s-plus-27.Probe`](#cdk8s-plus-27.Probe) +- *Default:* If a port is provided, then knocks on that port +to determine when the container is ready for readiness and +liveness probe checks. +Otherwise, no startup probe is defined. + +StartupProbe indicates that the Pod has successfully initialized. + +If specified, no other probes are executed until this completes successfully + +--- + +##### `volumeMounts`Optional + +```typescript +public readonly volumeMounts: VolumeMount[]; +``` + +- *Type:* [`cdk8s-plus-27.VolumeMount`](#cdk8s-plus-27.VolumeMount)[] + +Pod volumes to mount into the container's filesystem. + +Cannot be updated. + +--- + +##### `workingDir`Optional + +```typescript +public readonly workingDir: string; +``` + +- *Type:* `string` +- *Default:* The container runtime's default. + +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. + +--- + +##### `image`Required + +```typescript +public readonly image: string; +``` + +- *Type:* `string` + +Docker image name. + +--- + +### ContainerResources + +CPU and memory compute resources. + +#### Initializer + +```typescript +import { ContainerResources } from 'cdk8s-plus-27' + +const containerResources: ContainerResources = { ... } +``` + +##### `cpu`Optional + +```typescript +public readonly cpu: CpuResources; +``` + +- *Type:* [`cdk8s-plus-27.CpuResources`](#cdk8s-plus-27.CpuResources) + +--- + +##### `ephemeralStorage`Optional + +```typescript +public readonly ephemeralStorage: EphemeralStorageResources; +``` + +- *Type:* [`cdk8s-plus-27.EphemeralStorageResources`](#cdk8s-plus-27.EphemeralStorageResources) + +--- + +##### `memory`Optional + +```typescript +public readonly memory: MemoryResources; +``` + +- *Type:* [`cdk8s-plus-27.MemoryResources`](#cdk8s-plus-27.MemoryResources) + +--- + +### ContainerSecurityContextProps + +Properties for `ContainerSecurityContext`. + +#### Initializer + +```typescript +import { ContainerSecurityContextProps } from 'cdk8s-plus-27' + +const containerSecurityContextProps: ContainerSecurityContextProps = { ... } +``` + +##### `allowPrivilegeEscalation`Optional + +```typescript +public readonly allowPrivilegeEscalation: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Whether a process can gain more privileges than its parent process. + +--- + +##### `ensureNonRoot`Optional + +```typescript +public readonly ensureNonRoot: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +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. + +--- + +##### `group`Optional + +```typescript +public readonly group: number; +``` + +- *Type:* `number` +- *Default:* 26000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The GID to run the entrypoint of the container process. + +--- + +##### `privileged`Optional + +```typescript +public readonly privileged: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Run container in privileged mode. + +Processes in privileged containers are essentially equivalent to root on the host. + +--- + +##### `readOnlyRootFilesystem`Optional + +```typescript +public readonly readOnlyRootFilesystem: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Whether this container has a read-only root filesystem. + +--- + +##### `user`Optional + +```typescript +public readonly user: number; +``` + +- *Type:* `number` +- *Default:* 25000. An arbitrary number bigger than 9999 is selected here. +This is so that the container is blocked to access host files even if +somehow it manages to get access to host file system. + +The UID to run the entrypoint of the container process. + +--- + +### CpuResources + +CPU request and limit. + +#### Initializer + +```typescript +import { CpuResources } from 'cdk8s-plus-27' + +const cpuResources: CpuResources = { ... } +``` + +##### `limit`Optional + +```typescript +public readonly limit: Cpu; +``` + +- *Type:* [`cdk8s-plus-27.Cpu`](#cdk8s-plus-27.Cpu) + +--- + +##### `request`Optional + +```typescript +public readonly request: Cpu; +``` + +- *Type:* [`cdk8s-plus-27.Cpu`](#cdk8s-plus-27.Cpu) + +--- + +### CronJobProps + +Properties for `CronJob`. + +#### Initializer + +```typescript +import { CronJobProps } from 'cdk8s-plus-27' + +const cronJobProps: CronJobProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```typescript +public readonly podMetadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```typescript +public readonly select: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```typescript +public readonly spread: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `activeDeadline`Optional + +```typescript +public readonly activeDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoffLimit`Optional + +```typescript +public readonly backoffLimit: number; +``` + +- *Type:* `number` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttlAfterFinished`Optional + +```typescript +public readonly ttlAfterFinished: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +##### `schedule`Required + +```typescript +public readonly schedule: Cron; +``` + +- *Type:* [`cdk8s.Cron`](#cdk8s.Cron) + +Specifies the time in which the job would run again. + +This is defined as a cron expression in the CronJob resource. + +--- + +##### `concurrencyPolicy`Optional + +```typescript +public readonly concurrencyPolicy: ConcurrencyPolicy; +``` + +- *Type:* [`cdk8s-plus-27.ConcurrencyPolicy`](#cdk8s-plus-27.ConcurrencyPolicy) +- *Default:* ConcurrencyPolicy.Forbid + +Specifies the concurrency policy for the job. + +--- + +##### `failedJobsRetained`Optional + +```typescript +public readonly failedJobsRetained: number; +``` + +- *Type:* `number` +- *Default:* 1 + +Specifies the number of failed jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `startingDeadline`Optional + +```typescript +public readonly startingDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) + +Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. + +This deadline specifies +how much time can pass after a schedule point, for which kubernetes can still start the job. +For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after +the scheduled time. + +Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 +seconds is not allowed, as it may cause your job to never be scheduled. + +In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). +This property also controls what time interval should kubernetes consider when counting for missed schedules. + +For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00, +and its `startingDeadline` field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00, +the job will not start as the number of missed jobs which missed their schedule is greater than 100. +However, if `startingDeadline` is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus +start a new execution at 10:22:00. + +--- + +##### `successfulJobsRetained`Optional + +```typescript +public readonly successfulJobsRetained: number; +``` + +- *Type:* `number` +- *Default:* 3 + +Specifies the number of successful jobs history retained. + +This would retain the Job and the associated Pod resource and can be useful for debugging. + +--- + +##### `suspend`Optional + +```typescript +public readonly suspend: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specifies if the cron job should be suspended. + +Only applies to future executions, current ones are remained untouched. + +--- + +##### `timeZone`Optional + +```typescript +public readonly timeZone: string; +``` + +- *Type:* `string` +- *Default:* Timezone of kube-controller-manager process. + +Specifies the timezone for the job. + +This helps aligining the schedule to follow the specified timezone. + +> {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} for list of valid timezone values. + +--- + +### CsiVolumeOptions + +Options for the CSI driver based volume. + +#### Initializer + +```typescript +import { CsiVolumeOptions } from 'cdk8s-plus-27' + +const csiVolumeOptions: CsiVolumeOptions = { ... } +``` + +##### `attributes`Optional + +```typescript +public readonly attributes: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} +- *Default:* undefined + +Any driver-specific attributes to pass to the CSI volume builder. + +--- + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* driver-dependent + +The filesystem type to mount. + +Ex. "ext4", "xfs", "ntfs". If not provided, +the empty value is passed to the associated CSI driver, which will +determine the default filesystem to apply. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto-generated + +The volume name. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Whether the mounted volume should be read-only or not. + +--- + +### DaemonSetProps + +Properties for `DaemonSet`. + +#### Initializer + +```typescript +import { DaemonSetProps } from 'cdk8s-plus-27' + +const daemonSetProps: DaemonSetProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```typescript +public readonly podMetadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```typescript +public readonly select: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```typescript +public readonly spread: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReadySeconds`Optional + +```typescript +public readonly minReadySeconds: number; +``` + +- *Type:* `number` +- *Default:* 0 + +Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +--- + +### DeploymentExposeViaServiceOptions + +Options for `Deployment.exposeViaService`. + +#### Initializer + +```typescript +import { DeploymentExposeViaServiceOptions } from 'cdk8s-plus-27' + +const deploymentExposeViaServiceOptions: DeploymentExposeViaServiceOptions = { ... } +``` + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: ServicePort[]; +``` + +- *Type:* [`cdk8s-plus-27.ServicePort`](#cdk8s-plus-27.ServicePort)[] +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +##### `serviceType`Optional + +```typescript +public readonly serviceType: ServiceType; +``` + +- *Type:* [`cdk8s-plus-27.ServiceType`](#cdk8s-plus-27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +### DeploymentProps + +Properties for `Deployment`. + +#### Initializer + +```typescript +import { DeploymentProps } from 'cdk8s-plus-27' + +const deploymentProps: DeploymentProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```typescript +public readonly podMetadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```typescript +public readonly select: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```typescript +public readonly spread: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReady`Optional + +```typescript +public readonly minReady: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `progressDeadline`Optional + +```typescript +public readonly progressDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(600) + +The maximum duration for a deployment to make progress before it is considered to be failed. + +The deployment controller will continue +to process failed deployments and a condition with a ProgressDeadlineExceeded +reason will be surfaced in the deployment status. + +Note that progress will not be estimated during the time a deployment is paused. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds + +--- + +##### `replicas`Optional + +```typescript +public readonly replicas: number; +``` + +- *Type:* `number` +- *Default:* 2 + +Number of desired pods. + +--- + +##### `strategy`Optional + +```typescript +public readonly strategy: DeploymentStrategy; +``` + +- *Type:* [`cdk8s-plus-27.DeploymentStrategy`](#cdk8s-plus-27.DeploymentStrategy) +- *Default:* RollingUpdate with maxSurge and maxUnavailable set to 25%. + +Specifies the strategy used to replace old Pods by new ones. + +--- + +### DeploymentStrategyRollingUpdateOptions + +Options for `DeploymentStrategy.rollingUpdate`. + +#### Initializer + +```typescript +import { DeploymentStrategyRollingUpdateOptions } from 'cdk8s-plus-27' + +const deploymentStrategyRollingUpdateOptions: DeploymentStrategyRollingUpdateOptions = { ... } +``` + +##### `maxSurge`Optional + +```typescript +public readonly maxSurge: PercentOrAbsolute; +``` + +- *Type:* [`cdk8s-plus-27.PercentOrAbsolute`](#cdk8s-plus-27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be scheduled above the desired number of pods. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding up. +This can not be 0 if `maxUnavailable` is 0. + +Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update +starts, such that the total number of old and new pods do not exceed 130% of desired pods. +Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that +total number of pods running at any time during the update is at most 130% of desired pods. + +--- + +##### `maxUnavailable`Optional + +```typescript +public readonly maxUnavailable: PercentOrAbsolute; +``` + +- *Type:* [`cdk8s-plus-27.PercentOrAbsolute`](#cdk8s-plus-27.PercentOrAbsolute) +- *Default:* '25%' + +The maximum number of pods that can be unavailable during the update. + +Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). +Absolute number is calculated from percentage by rounding down. +This can not be 0 if `maxSurge` is 0. + +Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired +pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can +be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total +number of pods available at all times during the update is at least 70% of desired pods. + +--- + +### DnsOption + +Custom DNS option. + +#### Initializer + +```typescript +import { DnsOption } from 'cdk8s-plus-27' + +const dnsOption: DnsOption = { ... } +``` + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +Option name. + +--- + +##### `value`Optional + +```typescript +public readonly value: string; +``` + +- *Type:* `string` +- *Default:* No value. + +Option value. + +--- + +### DockerConfigSecretProps + +Options for `DockerConfigSecret`. + +#### Initializer + +```typescript +import { DockerConfigSecretProps } from 'cdk8s-plus-27' + +const dockerConfigSecretProps: DockerConfigSecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `data`Required + +```typescript +public readonly data: {[ key: string ]: any}; +``` + +- *Type:* {[ key: string ]: `any`} + +JSON content to provide for the `~/.docker/config.json` file. This will be stringified and inserted as stringData. + +> https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file + +--- + +### EmptyDirVolumeOptions + +Options for volumes populated with an empty directory. + +#### Initializer + +```typescript +import { EmptyDirVolumeOptions } from 'cdk8s-plus-27' + +const emptyDirVolumeOptions: EmptyDirVolumeOptions = { ... } +``` + +##### `medium`Optional + +```typescript +public readonly medium: EmptyDirMedium; +``` + +- *Type:* [`cdk8s-plus-27.EmptyDirMedium`](#cdk8s-plus-27.EmptyDirMedium) +- *Default:* EmptyDirMedium.DEFAULT + +By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. + +However, you can set the emptyDir.medium field to +`EmptyDirMedium.MEMORY` to tell Kubernetes to mount a tmpfs (RAM-backed +filesystem) for you instead. While tmpfs is very fast, be aware that unlike +disks, tmpfs is cleared on node reboot and any files you write will count +against your Container's memory limit. + +--- + +##### `sizeLimit`Optional + +```typescript +public readonly sizeLimit: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* limit is undefined + +Total amount of local storage required for this EmptyDir volume. + +The size +limit is also applicable for memory medium. The maximum usage on memory +medium EmptyDir would be the minimum value between the SizeLimit specified +here and the sum of memory limits of all containers in a pod. + +--- + +### EnvValueFromConfigMapOptions + +Options to specify an envionment variable value from a ConfigMap key. + +#### Initializer + +```typescript +import { EnvValueFromConfigMapOptions } from 'cdk8s-plus-27' + +const envValueFromConfigMapOptions: EnvValueFromConfigMapOptions = { ... } +``` + +##### `optional`Optional + +```typescript +public readonly optional: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify whether the ConfigMap or its key must be defined. + +--- + +### EnvValueFromFieldRefOptions + +Options to specify an environment variable value from a field reference. + +#### Initializer + +```typescript +import { EnvValueFromFieldRefOptions } from 'cdk8s-plus-27' + +const envValueFromFieldRefOptions: EnvValueFromFieldRefOptions = { ... } +``` + +##### `apiVersion`Optional + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +Version of the schema the FieldPath is written in terms of. + +--- + +##### `key`Optional + +```typescript +public readonly key: string; +``` + +- *Type:* `string` + +The key to select the pod label or annotation. + +--- + +### EnvValueFromProcessOptions + +Options to specify an environment variable value from the process environment. + +#### Initializer + +```typescript +import { EnvValueFromProcessOptions } from 'cdk8s-plus-27' + +const envValueFromProcessOptions: EnvValueFromProcessOptions = { ... } +``` + +##### `required`Optional + +```typescript +public readonly required: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify whether the key must exist in the environment. + +If this is set to true, and the key does not exist, an error will thrown. + +--- + +### EnvValueFromResourceOptions + +Options to specify an environment variable value from a resource. + +#### Initializer + +```typescript +import { EnvValueFromResourceOptions } from 'cdk8s-plus-27' + +const envValueFromResourceOptions: EnvValueFromResourceOptions = { ... } +``` + +##### `container`Optional + +```typescript +public readonly container: Container; +``` + +- *Type:* [`cdk8s-plus-27.Container`](#cdk8s-plus-27.Container) + +The container to select the value from. + +--- + +##### `divisor`Optional + +```typescript +public readonly divisor: string; +``` + +- *Type:* `string` + +The output format of the exposed resource. + +--- + +### EnvValueFromSecretOptions + +Options to specify an environment variable value from a Secret. + +#### Initializer + +```typescript +import { EnvValueFromSecretOptions } from 'cdk8s-plus-27' + +const envValueFromSecretOptions: EnvValueFromSecretOptions = { ... } +``` + +##### `optional`Optional + +```typescript +public readonly optional: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify whether the Secret or its key must be defined. + +--- + +### EphemeralStorageResources + +Emphemeral storage request and limit. + +#### Initializer + +```typescript +import { EphemeralStorageResources } from 'cdk8s-plus-27' + +const ephemeralStorageResources: EphemeralStorageResources = { ... } +``` + +##### `limit`Optional + +```typescript +public readonly limit: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +##### `request`Optional + +```typescript +public readonly request: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +### ExposeDeploymentViaIngressOptions + +Options for exposing a deployment via an ingress. + +#### Initializer + +```typescript +import { ExposeDeploymentViaIngressOptions } from 'cdk8s-plus-27' + +const exposeDeploymentViaIngressOptions: ExposeDeploymentViaIngressOptions = { ... } +``` + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto generated. + +The name of the service to expose. + +If you'd like to expose the deployment multiple times, +you must explicitly set a name starting from the second expose call. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: ServicePort[]; +``` + +- *Type:* [`cdk8s-plus-27.ServicePort`](#cdk8s-plus-27.ServicePort)[] +- *Default:* extracted from the deployment. + +The ports that the service should bind to. + +--- + +##### `serviceType`Optional + +```typescript +public readonly serviceType: ServiceType; +``` + +- *Type:* [`cdk8s-plus-27.ServiceType`](#cdk8s-plus-27.ServiceType) +- *Default:* ClusterIP. + +The type of the exposed service. + +--- + +##### `ingress`Optional + +```typescript +public readonly ingress: Ingress; +``` + +- *Type:* [`cdk8s-plus-27.Ingress`](#cdk8s-plus-27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +##### `pathType`Optional + +```typescript +public readonly pathType: HttpIngressPathType; +``` + +- *Type:* [`cdk8s-plus-27.HttpIngressPathType`](#cdk8s-plus-27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +### ExposeServiceViaIngressOptions + +Options for exposing a service using an ingress. + +#### Initializer + +```typescript +import { ExposeServiceViaIngressOptions } from 'cdk8s-plus-27' + +const exposeServiceViaIngressOptions: ExposeServiceViaIngressOptions = { ... } +``` + +##### `ingress`Optional + +```typescript +public readonly ingress: Ingress; +``` + +- *Type:* [`cdk8s-plus-27.Ingress`](#cdk8s-plus-27.Ingress) +- *Default:* An ingress will be automatically created. + +The ingress to add rules to. + +--- + +##### `pathType`Optional + +```typescript +public readonly pathType: HttpIngressPathType; +``` + +- *Type:* [`cdk8s-plus-27.HttpIngressPathType`](#cdk8s-plus-27.HttpIngressPathType) +- *Default:* HttpIngressPathType.PREFIX + +The type of the path. + +--- + +### FromServiceAccountNameOptions + +#### Initializer + +```typescript +import { FromServiceAccountNameOptions } from 'cdk8s-plus-27' + +const fromServiceAccountNameOptions: FromServiceAccountNameOptions = { ... } +``` + +##### `namespaceName`Optional + +```typescript +public readonly namespaceName: string; +``` + +- *Type:* `string` +- *Default:* "default" + +The name of the namespace the service account belongs to. + +--- + +### GCEPersistentDiskPersistentVolumeProps + +Properties for `GCEPersistentDiskPersistentVolume`. + +#### Initializer + +```typescript +import { GCEPersistentDiskPersistentVolumeProps } from 'cdk8s-plus-27' + +const gCEPersistentDiskPersistentVolumeProps: GCEPersistentDiskPersistentVolumeProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```typescript +public readonly claim: IPersistentVolumeClaim; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```typescript +public readonly mountOptions: string[]; +``` + +- *Type:* `string`[] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```typescript +public readonly reclaimPolicy: PersistentVolumeReclaimPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeReclaimPolicy`](#cdk8s-plus-27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```typescript +public readonly volumeMode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +##### `pdName`Required + +```typescript +public readonly pdName: string; +``` + +- *Type:* `string` + +Unique name of the PD resource in GCE. + +Used to identify the disk in GCE. + +> https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +--- + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### GCEPersistentDiskVolumeOptions + +Options of `Volume.fromGcePersistentDisk`. + +#### Initializer + +```typescript +import { GCEPersistentDiskVolumeOptions } from 'cdk8s-plus-27' + +const gCEPersistentDiskVolumeOptions: GCEPersistentDiskVolumeOptions = { ... } +``` + +##### `fsType`Optional + +```typescript +public readonly fsType: string; +``` + +- *Type:* `string` +- *Default:* 'ext4' + +Filesystem type of the volume that you want to mount. + +Tip: Ensure that the filesystem type is supported by the host operating system. + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto-generated + +The volume name. + +--- + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` +- *Default:* No partition. + +The partition in the volume that you want to mount. + +If omitted, the default is to mount by volume name. +Examples: For volume /dev/sda1, you specify the partition as "1". +Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + +> https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +--- + +### HandlerFromHttpGetOptions + +Options for `Handler.fromHttpGet`. + +#### Initializer + +```typescript +import { HandlerFromHttpGetOptions } from 'cdk8s-plus-27' + +const handlerFromHttpGetOptions: HandlerFromHttpGetOptions = { ... } +``` + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +### HandlerFromTcpSocketOptions + +Options for `Handler.fromTcpSocket`. + +#### Initializer + +```typescript +import { HandlerFromTcpSocketOptions } from 'cdk8s-plus-27' + +const handlerFromTcpSocketOptions: HandlerFromTcpSocketOptions = { ... } +``` + +##### `host`Optional + +```typescript +public readonly host: string; +``` + +- *Type:* `string` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + +### HorizontalPodAutoscalerProps + +Properties for HorizontalPodAutoscaler. + +#### Initializer + +```typescript +import { HorizontalPodAutoscalerProps } from 'cdk8s-plus-27' + +const horizontalPodAutoscalerProps: HorizontalPodAutoscalerProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `maxReplicas`Required + +```typescript +public readonly maxReplicas: number; +``` + +- *Type:* `number` + +The maximum number of replicas that can be scaled up to. + +--- + +##### `target`Required + +```typescript +public readonly target: IScalable; +``` + +- *Type:* [`cdk8s-plus-27.IScalable`](#cdk8s-plus-27.IScalable) + +The workload to scale up or down. + +Scalable workload types: +* Deployment +* StatefulSet + +--- + +##### `metrics`Optional + +```typescript +public readonly metrics: Metric[]; +``` + +- *Type:* [`cdk8s-plus-27.Metric`](#cdk8s-plus-27.Metric)[] +- *Default:* If metrics are not provided, then the target resource +constraints (e.g. cpu limit) will be used as scaling metrics. + +The metric conditions that trigger a scale up or scale down. + +--- + +##### `minReplicas`Optional + +```typescript +public readonly minReplicas: number; +``` + +- *Type:* `number` +- *Default:* 1 + +The minimum number of replicas that can be scaled down to. + +Can be set to 0 if the alpha feature gate `HPAScaleToZero` is enabled and +at least one Object or External metric is configured. + +--- + +##### `scaleDown`Optional + +```typescript +public readonly scaleDown: ScalingRules; +``` + +- *Type:* [`cdk8s-plus-27.ScalingRules`](#cdk8s-plus-27.ScalingRules) +- *Default:* Scale down to minReplica count with a 5 minute stabilization window. + +The scaling behavior when scaling down. + +--- + +##### `scaleUp`Optional + +```typescript +public readonly scaleUp: ScalingRules; +``` + +- *Type:* [`cdk8s-plus-27.ScalingRules`](#cdk8s-plus-27.ScalingRules) +- *Default:* Is the higher of: +* Increase no more than 4 pods per 60 seconds +* Double the number of pods per 60 seconds + +The scaling behavior when scaling up. + +--- + +### HostAlias + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's /etc/hosts file. + +#### Initializer + +```typescript +import { HostAlias } from 'cdk8s-plus-27' + +const hostAlias: HostAlias = { ... } +``` + +##### `hostnames`Required + +```typescript +public readonly hostnames: string[]; +``` + +- *Type:* `string`[] + +Hostnames for the chosen IP address. + +--- + +##### `ip`Required + +```typescript +public readonly ip: string; +``` + +- *Type:* `string` + +IP address of the host file entry. + +--- + +### HostPathVolumeOptions + +Options for a HostPathVolume-based volume. + +#### Initializer + +```typescript +import { HostPathVolumeOptions } from 'cdk8s-plus-27' + +const hostPathVolumeOptions: HostPathVolumeOptions = { ... } +``` + +##### `path`Required + +```typescript +public readonly path: string; +``` + +- *Type:* `string` + +The path of the directory on the host. + +--- + +##### `type`Optional + +```typescript +public readonly type: HostPathVolumeType; +``` + +- *Type:* [`cdk8s-plus-27.HostPathVolumeType`](#cdk8s-plus-27.HostPathVolumeType) +- *Default:* HostPathVolumeType.DEFAULT + +The expected type of the path found on the host. + +--- + +### HttpGetProbeOptions + +Options for `Probe.fromHttpGet()`. + +#### Initializer + +```typescript +import { HttpGetProbeOptions } from 'cdk8s-plus-27' + +const httpGetProbeOptions: HttpGetProbeOptions = { ... } +``` + +##### `failureThreshold`Optional + +```typescript +public readonly failureThreshold: number; +``` + +- *Type:* `number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```typescript +public readonly initialDelaySeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```typescript +public readonly periodSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```typescript +public readonly successThreshold: number; +``` + +- *Type:* `number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```typescript +public readonly timeoutSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* defaults to `container.port`. + +The TCP port to use when sending the GET request. + +--- + +##### `scheme`Optional + +```typescript +public readonly scheme: ConnectionScheme; +``` + +- *Type:* [`cdk8s-plus-27.ConnectionScheme`](#cdk8s-plus-27.ConnectionScheme) +- *Default:* ConnectionScheme.HTTP + +Scheme to use for connecting to the host (HTTP or HTTPS). + +--- + +### IngressProps + +Properties for `Ingress`. + +#### Initializer + +```typescript +import { IngressProps } from 'cdk8s-plus-27' + +const ingressProps: IngressProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `defaultBackend`Optional + +```typescript +public readonly defaultBackend: IngressBackend; +``` + +- *Type:* [`cdk8s-plus-27.IngressBackend`](#cdk8s-plus-27.IngressBackend) + +The default backend services requests that do not match any rule. + +Using this option or the `addDefaultBackend()` method is equivalent to +adding a rule with both `path` and `host` undefined. + +--- + +##### `rules`Optional + +```typescript +public readonly rules: IngressRule[]; +``` + +- *Type:* [`cdk8s-plus-27.IngressRule`](#cdk8s-plus-27.IngressRule)[] + +Routing rules for this ingress. + +Each rule must define an `IngressBackend` that will receive the requests +that match this rule. If both `host` and `path` are not specifiec, this +backend will be used as the default backend of the ingress. + +You can also add rules later using `addRule()`, `addHostRule()`, +`addDefaultBackend()` and `addHostDefaultBackend()`. + +--- + +##### `tls`Optional + +```typescript +public readonly tls: IngressTls[]; +``` + +- *Type:* [`cdk8s-plus-27.IngressTls`](#cdk8s-plus-27.IngressTls)[] + +TLS settings for this ingress. + +Using this option tells the ingress controller to expose a TLS endpoint. +Currently the Ingress only supports a single TLS port, 443. If multiple +members of this list specify different hosts, they will be multiplexed on +the same port according to the hostname specified through the SNI TLS +extension, if the ingress controller fulfilling the ingress supports SNI. + +--- + +### IngressRule + +Represents the rules mapping the paths under a specified host to the related backend services. + +Incoming requests are first evaluated for a host match, +then routed to the backend associated with the matching path. + +#### Initializer + +```typescript +import { IngressRule } from 'cdk8s-plus-27' + +const ingressRule: IngressRule = { ... } +``` + +##### `backend`Required + +```typescript +public readonly backend: IngressBackend; +``` + +- *Type:* [`cdk8s-plus-27.IngressBackend`](#cdk8s-plus-27.IngressBackend) + +Backend defines the referenced service endpoint to which the traffic will be forwarded to. + +--- + +##### `host`Optional + +```typescript +public readonly host: string; +``` + +- *Type:* `string` +- *Default:* If the host is unspecified, the Ingress routes all traffic based +on the specified IngressRuleValue. + +Host is the fully qualified domain name of a network host, as defined by RFC 3986. + +Note the following deviations from the "host" part of the URI as +defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue +can only apply to the IP in the Spec of the parent Ingress. 2. The `:` +delimiter is not respected because ports are not allowed. Currently the +port of an Ingress is implicitly :80 for http and :443 for https. Both +these may change in the future. Incoming requests are matched against the +host before the IngressRuleValue. + +--- + +##### `path`Optional + +```typescript +public readonly path: string; +``` + +- *Type:* `string` +- *Default:* If unspecified, the path defaults to a catch all sending traffic +to the backend. + +Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/'. + +--- + +##### `pathType`Optional + +```typescript +public readonly pathType: HttpIngressPathType; +``` + +- *Type:* [`cdk8s-plus-27.HttpIngressPathType`](#cdk8s-plus-27.HttpIngressPathType) + +Specify how the path is matched against request paths. + +By default, path +types will be matched by prefix. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +--- + +### IngressTls + +Represents the TLS configuration mapping that is passed to the ingress controller for SSL termination. + +#### Initializer + +```typescript +import { IngressTls } from 'cdk8s-plus-27' + +const ingressTls: IngressTls = { ... } +``` + +##### `hosts`Optional + +```typescript +public readonly hosts: string[]; +``` + +- *Type:* `string`[] +- *Default:* If unspecified, it defaults to the wildcard host setting for +the loadbalancer controller fulfilling this Ingress. + +Hosts are a list of hosts included in the TLS certificate. + +The values in +this list must match the name/s used in the TLS Secret. + +--- + +##### `secret`Optional + +```typescript +public readonly secret: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* If unspecified, it allows SSL routing based on SNI hostname. + +Secret is the secret that contains the certificate and key used to terminate SSL traffic on 443. + +If the SNI host in a listener conflicts with +the "Host" header field used by an IngressRule, the SNI host is used for +termination and value of the Host header is used for routing. + +--- + +### JobProps + +Properties for `Job`. + +#### Initializer + +```typescript +import { JobProps } from 'cdk8s-plus-27' + +const jobProps: JobProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```typescript +public readonly podMetadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```typescript +public readonly select: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```typescript +public readonly spread: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `activeDeadline`Optional + +```typescript +public readonly activeDeadline: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If unset, then there is no deadline. + +Specifies the duration the job may be active before the system tries to terminate it. + +--- + +##### `backoffLimit`Optional + +```typescript +public readonly backoffLimit: number; +``` + +- *Type:* `number` +- *Default:* If not set, system defaults to 6. + +Specifies the number of retries before marking this job failed. + +--- + +##### `ttlAfterFinished`Optional + +```typescript +public readonly ttlAfterFinished: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* If this field is unset, the Job won't be automatically deleted. + +Limits the lifetime of a Job that has finished execution (either Complete or Failed). + +If this field is set, after the Job finishes, it is eligible to +be automatically deleted. When the Job is being deleted, its lifecycle +guarantees (e.g. finalizers) will be honored. If this field is set to zero, +the Job becomes eligible to be deleted immediately after it finishes. This +field is alpha-level and is only honored by servers that enable the +`TTLAfterFinished` feature. + +--- + +### LabelSelectorOptions + +Options for `LabelSelector.of`. + +#### Initializer + +```typescript +import { LabelSelectorOptions } from 'cdk8s-plus-27' + +const labelSelectorOptions: LabelSelectorOptions = { ... } +``` + +##### `expressions`Optional + +```typescript +public readonly expressions: LabelExpression[]; +``` + +- *Type:* [`cdk8s-plus-27.LabelExpression`](#cdk8s-plus-27.LabelExpression)[] + +Expression based label matchers. + +--- + +##### `labels`Optional + +```typescript +public readonly labels: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +Strict label matchers. + +--- + +### LabelSelectorRequirement + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + +#### Initializer + +```typescript +import { LabelSelectorRequirement } from 'cdk8s-plus-27' + +const labelSelectorRequirement: LabelSelectorRequirement = { ... } +``` + +##### `key`Required + +```typescript +public readonly key: string; +``` + +- *Type:* `string` + +The label key that the selector applies to. + +--- + +##### `operator`Required + +```typescript +public readonly operator: string; +``` + +- *Type:* `string` + +Represents a key's relationship to a set of values. + +--- + +##### `values`Optional + +```typescript +public readonly values: string[]; +``` + +- *Type:* `string`[] + +An array of string values. + +If the operator is In or NotIn, the values array +must be non-empty. If the operator is Exists or DoesNotExist, +the values array must be empty. This array is replaced during a strategic merge patch. + +--- + +### MemoryResources + +Memory request and limit. + +#### Initializer + +```typescript +import { MemoryResources } from 'cdk8s-plus-27' + +const memoryResources: MemoryResources = { ... } +``` + +##### `limit`Optional + +```typescript +public readonly limit: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +##### `request`Optional + +```typescript +public readonly request: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) + +--- + +### MetricContainerResourceOptions + +Options for `Metric.containerResource()`. + +#### Initializer + +```typescript +import { MetricContainerResourceOptions } from 'cdk8s-plus-27' + +const metricContainerResourceOptions: MetricContainerResourceOptions = { ... } +``` + +##### `container`Required + +```typescript +public readonly container: Container; +``` + +- *Type:* [`cdk8s-plus-27.Container`](#cdk8s-plus-27.Container) + +Container where the metric can be found. + +--- + +##### `target`Required + +```typescript +public readonly target: MetricTarget; +``` + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +Target metric value that will trigger scaling. + +--- + +### MetricObjectOptions + +Options for `Metric.object()`. + +#### Initializer + +```typescript +import { MetricObjectOptions } from 'cdk8s-plus-27' + +const metricObjectOptions: MetricObjectOptions = { ... } +``` + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of the metric to scale on. + +--- + +##### `target`Required + +```typescript +public readonly target: MetricTarget; +``` + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +##### `labelSelector`Optional + +```typescript +public readonly labelSelector: LabelSelector; +``` + +- *Type:* [`cdk8s-plus-27.LabelSelector`](#cdk8s-plus-27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +##### `object`Required + +```typescript +public readonly object: IResource; +``` + +- *Type:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +Resource where the metric can be found. + +--- + +### MetricOptions + +Base options for a Metric. + +#### Initializer + +```typescript +import { MetricOptions } from 'cdk8s-plus-27' + +const metricOptions: MetricOptions = { ... } +``` + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of the metric to scale on. + +--- + +##### `target`Required + +```typescript +public readonly target: MetricTarget; +``` + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +The target metric value that will trigger scaling. + +--- + +##### `labelSelector`Optional + +```typescript +public readonly labelSelector: LabelSelector; +``` + +- *Type:* [`cdk8s-plus-27.LabelSelector`](#cdk8s-plus-27.LabelSelector) +- *Default:* Just the metric 'name' will be used to gather metrics. + +A selector to find a metric by label. + +When set, it is passed as an additional parameter to the metrics server +for more specific metrics scoping. + +--- + +### MountOptions + +Options for mounts. + +#### Initializer + +```typescript +import { MountOptions } from 'cdk8s-plus-27' + +const mountOptions: MountOptions = { ... } +``` + +##### `propagation`Optional + +```typescript +public readonly propagation: MountPropagation; +``` + +- *Type:* [`cdk8s-plus-27.MountPropagation`](#cdk8s-plus-27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +##### `subPath`Optional + +```typescript +public readonly subPath: string; +``` + +- *Type:* `string` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +##### `subPathExpr`Optional + +```typescript +public readonly subPathExpr: string; +``` + +- *Type:* `string` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + +### NamespaceProps + +Properties for `Namespace`. + +#### Initializer + +```typescript +import { NamespaceProps } from 'cdk8s-plus-27' + +const namespaceProps: NamespaceProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +### NamespaceSelectorConfig + +Configuration for selecting namespaces. + +#### Initializer + +```typescript +import { NamespaceSelectorConfig } from 'cdk8s-plus-27' + +const namespaceSelectorConfig: NamespaceSelectorConfig = { ... } +``` + +##### `labelSelector`Optional + +```typescript +public readonly labelSelector: LabelSelector; +``` + +- *Type:* [`cdk8s-plus-27.LabelSelector`](#cdk8s-plus-27.LabelSelector) + +A selector to select namespaces by labels. + +--- + +##### `names`Optional + +```typescript +public readonly names: string[]; +``` + +- *Type:* `string`[] + +A list of names to select namespaces by names. + +--- + +### NamespacesSelectOptions + +Options for `Namespaces.select`. + +#### Initializer + +```typescript +import { NamespacesSelectOptions } from 'cdk8s-plus-27' + +const namespacesSelectOptions: NamespacesSelectOptions = { ... } +``` + +##### `expressions`Optional + +```typescript +public readonly expressions: LabelExpression[]; +``` + +- *Type:* [`cdk8s-plus-27.LabelExpression`](#cdk8s-plus-27.LabelExpression)[] +- *Default:* no selector requirements. + +Namespaces must satisfy these selectors. + +The selectors query labels, just like the `labels` property, but they +provide a more advanced matching mechanism. + +--- + +##### `labels`Optional + +```typescript +public readonly labels: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} +- *Default:* no strict labels requirements. + +Labels the namespaces must have. + +This is equivalent to using an 'Is' selector. + +--- + +##### `names`Optional + +```typescript +public readonly names: string[]; +``` + +- *Type:* `string`[] +- *Default:* no name requirements. + +Namespaces names must be one of these. + +--- + +### NetworkPolicyAddEgressRuleOptions + +Options for `NetworkPolicy.addEgressRule`. + +#### Initializer + +```typescript +import { NetworkPolicyAddEgressRuleOptions } from 'cdk8s-plus-27' + +const networkPolicyAddEgressRuleOptions: NetworkPolicyAddEgressRuleOptions = { ... } +``` + +##### `ports`Optional + +```typescript +public readonly ports: NetworkPolicyPort[]; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPort`](#cdk8s-plus-27.NetworkPolicyPort)[] +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports the rule should allow outgoing traffic to. + +--- + +### NetworkPolicyPeerConfig + +Configuration for network peers. + +A peer can either by an ip block, or a selection of pods, not both. + +#### Initializer + +```typescript +import { NetworkPolicyPeerConfig } from 'cdk8s-plus-27' + +const networkPolicyPeerConfig: NetworkPolicyPeerConfig = { ... } +``` + +##### `ipBlock`Optional + +```typescript +public readonly ipBlock: NetworkPolicyIpBlock; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyIpBlock`](#cdk8s-plus-27.NetworkPolicyIpBlock) + +The ip block this peer represents. + +--- + +##### `podSelector`Optional + +```typescript +public readonly podSelector: PodSelectorConfig; +``` + +- *Type:* [`cdk8s-plus-27.PodSelectorConfig`](#cdk8s-plus-27.PodSelectorConfig) + +The pod selector this peer represents. + +--- + +### NetworkPolicyPortProps + +Properties for `NetworkPolicyPort`. + +#### Initializer + +```typescript +import { NetworkPolicyPortProps } from 'cdk8s-plus-27' + +const networkPolicyPortProps: NetworkPolicyPortProps = { ... } +``` + +##### `endPort`Optional + +```typescript +public readonly endPort: number; +``` + +- *Type:* `number` +- *Default:* not a port range. + +End port (relative to `port`). + +Only applies if `port` is defined. +Use this to specify a port range, rather that a specific one. + +--- + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* all ports are allowed. + +Specific port number. + +--- + +##### `protocol`Optional + +```typescript +public readonly protocol: NetworkProtocol; +``` + +- *Type:* [`cdk8s-plus-27.NetworkProtocol`](#cdk8s-plus-27.NetworkProtocol) +- *Default:* NetworkProtocol.TCP + +Protocol. + +--- + +### NetworkPolicyProps + +Properties for `NetworkPolicy`. + +#### Initializer + +```typescript +import { NetworkPolicyProps } from 'cdk8s-plus-27' + +const networkPolicyProps: NetworkPolicyProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `egress`Optional + +```typescript +public readonly egress: NetworkPolicyTraffic; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyTraffic`](#cdk8s-plus-27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change egress behavior of the pods it selects. + +Egress traffic configuration. + +--- + +##### `ingress`Optional + +```typescript +public readonly ingress: NetworkPolicyTraffic; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyTraffic`](#cdk8s-plus-27.NetworkPolicyTraffic) +- *Default:* the policy doesn't change ingress behavior of the pods it selects. + +Ingress traffic configuration. + +--- + +##### `selector`Optional + +```typescript +public readonly selector: IPodSelector; +``` + +- *Type:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) +- *Default:* will select all pods in the namespace of the policy. + +Which pods does this policy object applies to. + +This can either be a single pod / workload, or a grouping of pods selected +via the `Pods.select` function. Rules is applied to any pods selected by this property. +Multiple network policies can select the same set of pods. +In this case, the rules for each are combined additively. + +Note that + +--- + +### NetworkPolicyRule + +Describes a rule allowing traffic from / to pods matched by a network policy selector. + +#### Initializer + +```typescript +import { NetworkPolicyRule } from 'cdk8s-plus-27' + +const networkPolicyRule: NetworkPolicyRule = { ... } +``` + +##### `peer`Required + +```typescript +public readonly peer: INetworkPolicyPeer; +``` + +- *Type:* [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +Peer this rule interacts with. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: NetworkPolicyPort[]; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPort`](#cdk8s-plus-27.NetworkPolicyPort)[] +- *Default:* traffic is allowed on all ports. + +The ports of the rule. + +--- + +### NetworkPolicyTraffic + +Describes how the network policy should configure egress / ingress traffic. + +#### Initializer + +```typescript +import { NetworkPolicyTraffic } from 'cdk8s-plus-27' + +const networkPolicyTraffic: NetworkPolicyTraffic = { ... } +``` + +##### `default`Optional + +```typescript +public readonly default: NetworkPolicyTrafficDefault; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyTrafficDefault`](#cdk8s-plus-27.NetworkPolicyTrafficDefault) +- *Default:* unset, the policy does not change the behavior. + +Specifies the default behavior of the policy when no rules are defined. + +--- + +##### `rules`Optional + +```typescript +public readonly rules: NetworkPolicyRule[]; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyRule`](#cdk8s-plus-27.NetworkPolicyRule)[] +- *Default:* no rules + +List of rules to be applied to the selected pods. + +If empty, the behavior of the policy is dictated by the `default` property. + +--- + +### NfsVolumeOptions + +Options for the NFS based volume. + +#### Initializer + +```typescript +import { NfsVolumeOptions } from 'cdk8s-plus-27' + +const nfsVolumeOptions: NfsVolumeOptions = { ... } +``` + +##### `path`Required + +```typescript +public readonly path: string; +``` + +- *Type:* `string` + +Path that is exported by the NFS server. + +--- + +##### `server`Required + +```typescript +public readonly server: string; +``` + +- *Type:* `string` + +Server is the hostname or IP address of the NFS server. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, will force the NFS export to be mounted with read-only permissions. + +--- + +### NodeTaintQueryOptions + +Options for `NodeTaintQuery`. + +#### Initializer + +```typescript +import { NodeTaintQueryOptions } from 'cdk8s-plus-27' + +const nodeTaintQueryOptions: NodeTaintQueryOptions = { ... } +``` + +##### `effect`Optional + +```typescript +public readonly effect: TaintEffect; +``` + +- *Type:* [`cdk8s-plus-27.TaintEffect`](#cdk8s-plus-27.TaintEffect) +- *Default:* all effects are matched. + +The taint effect to match. + +--- + +##### `evictAfter`Optional + +```typescript +public readonly evictAfter: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* bound forever. + +How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. + +Only applies for the `NO_EXECUTE` effect. + +--- + +### PathMapping + +Maps a string key to a path within a volume. + +#### Initializer + +```typescript +import { PathMapping } from 'cdk8s-plus-27' + +const pathMapping: PathMapping = { ... } +``` + +##### `path`Required + +```typescript +public readonly path: string; +``` + +- *Type:* `string` + +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`Optional + +```typescript +public readonly mode: number; +``` + +- *Type:* `number` + +Optional: 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. + +--- + +### PersistentVolumeClaimProps + +Properties for `PersistentVolumeClaim`. + +#### Initializer + +```typescript +import { PersistentVolumeClaimProps } from 'cdk8s-plus-27' + +const persistentVolumeClaimProps: PersistentVolumeClaimProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] +- *Default:* No access modes requirement. + +Contains the access modes the volume should support. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No storage requirement. + +Minimum storage size the volume should have. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` +- *Default:* Not set. + +Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. + +If the admission plugin is turned on, the storage class marked as default will be used. +- If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + +--- + +##### `volume`Optional + +```typescript +public readonly volume: IPersistentVolume; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume) +- *Default:* No specific volume binding. + +The PersistentVolume backing this claim. + +The control plane still checks that storage class, access modes, +and requested storage size on the volume are valid. + +Note that in order to guarantee a proper binding, the volume should +also define a `claimRef` referring to this claim. Otherwise, the volume may be +claimed be other pvc's before it gets a chance to bind to this one. + +If the volume is managed (i.e not imported), you can use `pv.claim()` to easily +create a bi-directional bounded claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding. + +--- + +##### `volumeMode`Optional + +```typescript +public readonly volumeMode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +### PersistentVolumeClaimVolumeOptions + +Options for a PersistentVolumeClaim-based volume. + +#### Initializer + +```typescript +import { PersistentVolumeClaimVolumeOptions } from 'cdk8s-plus-27' + +const persistentVolumeClaimVolumeOptions: PersistentVolumeClaimVolumeOptions = { ... } +``` + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* Derived from the PVC name. + +The volume name. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Will force the ReadOnly setting in VolumeMounts. + +--- + +### PersistentVolumeProps + +Properties for `PersistentVolume`. + +#### Initializer + +```typescript +import { PersistentVolumeProps } from 'cdk8s-plus-27' + +const persistentVolumeProps: PersistentVolumeProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `accessModes`Optional + +```typescript +public readonly accessModes: PersistentVolumeAccessMode[]; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeAccessMode`](#cdk8s-plus-27.PersistentVolumeAccessMode)[] +- *Default:* No access modes. + +Contains all ways the volume can be mounted. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + +--- + +##### `claim`Optional + +```typescript +public readonly claim: IPersistentVolumeClaim; +``` + +- *Type:* [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) +- *Default:* Not bound to a specific claim. + +Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + +Expected to be non-nil when bound. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + +--- + +##### `mountOptions`Optional + +```typescript +public readonly mountOptions: string[]; +``` + +- *Type:* `string`[] +- *Default:* No options. + +A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options + +--- + +##### `reclaimPolicy`Optional + +```typescript +public readonly reclaimPolicy: PersistentVolumeReclaimPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeReclaimPolicy`](#cdk8s-plus-27.PersistentVolumeReclaimPolicy) +- *Default:* PersistentVolumeReclaimPolicy.RETAIN + +When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. + +The reclaim policy tells the cluster what to do with +the volume after it has been released of its claim. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + +--- + +##### `storage`Optional + +```typescript +public readonly storage: Size; +``` + +- *Type:* [`cdk8s.Size`](#cdk8s.Size) +- *Default:* No specified. + +What is the storage capacity of this volume. + +> https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +--- + +##### `storageClassName`Optional + +```typescript +public readonly storageClassName: string; +``` + +- *Type:* `string` +- *Default:* Volume does not belong to any storage class. + +Name of StorageClass to which this persistent volume belongs. + +--- + +##### `volumeMode`Optional + +```typescript +public readonly volumeMode: PersistentVolumeMode; +``` + +- *Type:* [`cdk8s-plus-27.PersistentVolumeMode`](#cdk8s-plus-27.PersistentVolumeMode) +- *Default:* VolumeMode.FILE_SYSTEM + +Defines what type of volume is required by the claim. + +--- + +### PodConnectionsAllowFromOptions + +Options for `PodConnections.allowFrom`. + +#### Initializer + +```typescript +import { PodConnectionsAllowFromOptions } from 'cdk8s-plus-27' + +const podConnectionsAllowFromOptions: PodConnectionsAllowFromOptions = { ... } +``` + +##### `isolation`Optional + +```typescript +public readonly isolation: PodConnectionsIsolation; +``` + +- *Type:* [`cdk8s-plus-27.PodConnectionsIsolation`](#cdk8s-plus-27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: NetworkPolicyPort[]; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPort`](#cdk8s-plus-27.NetworkPolicyPort)[] +- *Default:* The pod ports. + +Ports to allow incoming traffic to. + +--- + +### PodConnectionsAllowToOptions + +Options for `PodConnections.allowTo`. + +#### Initializer + +```typescript +import { PodConnectionsAllowToOptions } from 'cdk8s-plus-27' + +const podConnectionsAllowToOptions: PodConnectionsAllowToOptions = { ... } +``` + +##### `isolation`Optional + +```typescript +public readonly isolation: PodConnectionsIsolation; +``` + +- *Type:* [`cdk8s-plus-27.PodConnectionsIsolation`](#cdk8s-plus-27.PodConnectionsIsolation) +- *Default:* unset, isolates both the pod and the peer. + +Which isolation should be applied to establish the connection. + +--- + +##### `ports`Optional + +```typescript +public readonly ports: NetworkPolicyPort[]; +``` + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPort`](#cdk8s-plus-27.NetworkPolicyPort)[] +- *Default:* If the peer is a managed pod, take its ports. Otherwise, all ports are allowed. + +Ports to allow outgoing traffic to. + +--- + +### PodDnsProps + +Properties for `PodDns`. + +#### Initializer + +```typescript +import { PodDnsProps } from 'cdk8s-plus-27' + +const podDnsProps: PodDnsProps = { ... } +``` + +##### `hostname`Optional + +```typescript +public readonly hostname: string; +``` + +- *Type:* `string` +- *Default:* Set to a system-defined value. + +Specifies the hostname of the Pod. + +--- + +##### `hostnameAsFQDN`Optional + +```typescript +public readonly hostnameAsFQDN: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + +In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). +In Windows containers, this means setting the registry value of hostname for the registry +key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. +If a pod does not have FQDN, this has no effect. + +--- + +##### `nameservers`Optional + +```typescript +public readonly nameservers: string[]; +``` + +- *Type:* `string`[] + +A list of IP addresses that will be used as DNS servers for the Pod. + +There can be at most 3 IP addresses specified. +When the policy is set to "NONE", the list must contain at least one IP address, +otherwise this property is optional. +The servers listed will be combined to the base nameservers generated from +the specified DNS policy with duplicate addresses removed. + +--- + +##### `options`Optional + +```typescript +public readonly options: DnsOption[]; +``` + +- *Type:* [`cdk8s-plus-27.DnsOption`](#cdk8s-plus-27.DnsOption)[] + +List of objects where each object may have a name property (required) and a value property (optional). + +The contents in this property +will be merged to the options generated from the specified DNS policy. +Duplicate entries are removed. + +--- + +##### `policy`Optional + +```typescript +public readonly policy: DnsPolicy; +``` + +- *Type:* [`cdk8s-plus-27.DnsPolicy`](#cdk8s-plus-27.DnsPolicy) +- *Default:* DnsPolicy.CLUSTER_FIRST + +Set DNS policy for the pod. + +If policy is set to `None`, other configuration must be supplied. + +--- + +##### `searches`Optional + +```typescript +public readonly searches: string[]; +``` + +- *Type:* `string`[] + +A list of DNS search domains for hostname lookup in the Pod. + +When specified, the provided list will be merged into the base +search domain names generated from the chosen DNS policy. +Duplicate domain names are removed. + +Kubernetes allows for at most 6 search domains. + +--- + +##### `subdomain`Optional + +```typescript +public readonly subdomain: string; +``` + +- *Type:* `string` +- *Default:* No subdomain. + +If specified, the fully qualified Pod hostname will be "...svc.". + +--- + +### PodProps + +Properties for `Pod`. + +#### Initializer + +```typescript +import { PodProps } from 'cdk8s-plus-27' + +const podProps: PodProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +### PodsAllOptions + +Options for `Pods.all`. + +#### Initializer + +```typescript +import { PodsAllOptions } from 'cdk8s-plus-27' + +const podsAllOptions: PodsAllOptions = { ... } +``` + +##### `namespaces`Optional + +```typescript +public readonly namespaces: Namespaces; +``` + +- *Type:* [`cdk8s-plus-27.Namespaces`](#cdk8s-plus-27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +### PodSchedulingAttractOptions + +Options for `PodScheduling.attract`. + +#### Initializer + +```typescript +import { PodSchedulingAttractOptions } from 'cdk8s-plus-27' + +const podSchedulingAttractOptions: PodSchedulingAttractOptions = { ... } +``` + +##### `weight`Optional + +```typescript +public readonly weight: number; +``` + +- *Type:* `number` +- *Default:* no weight. assignment is assumed to be required (hard). + +Indicates the attraction is optional (soft), with this weight score. + +--- + +### PodSchedulingColocateOptions + +Options for `PodScheduling.colocate`. + +#### Initializer + +```typescript +import { PodSchedulingColocateOptions } from 'cdk8s-plus-27' + +const podSchedulingColocateOptions: PodSchedulingColocateOptions = { ... } +``` + +##### `topology`Optional + +```typescript +public readonly topology: Topology; +``` + +- *Type:* [`cdk8s-plus-27.Topology`](#cdk8s-plus-27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to coloate on. + +--- + +##### `weight`Optional + +```typescript +public readonly weight: number; +``` + +- *Type:* `number` +- *Default:* no weight. co-location is assumed to be required (hard). + +Indicates the co-location is optional (soft), with this weight score. + +--- + +### PodSchedulingSeparateOptions + +Options for `PodScheduling.separate`. + +#### Initializer + +```typescript +import { PodSchedulingSeparateOptions } from 'cdk8s-plus-27' + +const podSchedulingSeparateOptions: PodSchedulingSeparateOptions = { ... } +``` + +##### `topology`Optional + +```typescript +public readonly topology: Topology; +``` + +- *Type:* [`cdk8s-plus-27.Topology`](#cdk8s-plus-27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to separate on. + +--- + +##### `weight`Optional + +```typescript +public readonly weight: number; +``` + +- *Type:* `number` +- *Default:* no weight. separation is assumed to be required (hard). + +Indicates the separation is optional (soft), with this weight score. + +--- + +### PodSecurityContextProps + +Properties for `PodSecurityContext`. + +#### Initializer + +```typescript +import { PodSecurityContextProps } from 'cdk8s-plus-27' + +const podSecurityContextProps: PodSecurityContextProps = { ... } +``` + +##### `ensureNonRoot`Optional + +```typescript +public readonly ensureNonRoot: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +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. + +--- + +##### `fsGroup`Optional + +```typescript +public readonly fsGroup: number; +``` + +- *Type:* `number` +- *Default:* Volume ownership is not changed. + +Modify the ownership and permissions of pod volumes to this GID. + +--- + +##### `fsGroupChangePolicy`Optional + +```typescript +public readonly fsGroupChangePolicy: FsGroupChangePolicy; +``` + +- *Type:* [`cdk8s-plus-27.FsGroupChangePolicy`](#cdk8s-plus-27.FsGroupChangePolicy) +- *Default:* FsGroupChangePolicy.ALWAYS + +Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. + +This field will only apply to volume types which support fsGroup based ownership(and permissions). +It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. + +--- + +##### `group`Optional + +```typescript +public readonly group: number; +``` + +- *Type:* `number` +- *Default:* Group configured by container runtime + +The GID to run the entrypoint of the container process. + +--- + +##### `sysctls`Optional + +```typescript +public readonly sysctls: Sysctl[]; +``` + +- *Type:* [`cdk8s-plus-27.Sysctl`](#cdk8s-plus-27.Sysctl)[] +- *Default:* No sysctls + +Sysctls hold a list of namespaced sysctls used for the pod. + +Pods with unsupported sysctls (by the container runtime) might fail to launch. + +--- + +##### `user`Optional + +```typescript +public readonly user: number; +``` + +- *Type:* `number` +- *Default:* User specified in image metadata + +The UID to run the entrypoint of the container process. + +--- + +### PodSelectorConfig + +Configuration for selecting pods, optionally in particular namespaces. + +#### Initializer + +```typescript +import { PodSelectorConfig } from 'cdk8s-plus-27' + +const podSelectorConfig: PodSelectorConfig = { ... } +``` + +##### `labelSelector`Required + +```typescript +public readonly labelSelector: LabelSelector; +``` + +- *Type:* [`cdk8s-plus-27.LabelSelector`](#cdk8s-plus-27.LabelSelector) + +A selector to select pods by labels. + +--- + +##### `namespaces`Optional + +```typescript +public readonly namespaces: NamespaceSelectorConfig; +``` + +- *Type:* [`cdk8s-plus-27.NamespaceSelectorConfig`](#cdk8s-plus-27.NamespaceSelectorConfig) + +Configuration for selecting which namepsaces are the pods allowed to be in. + +--- + +### PodsSelectOptions + +Options for `Pods.select`. + +#### Initializer + +```typescript +import { PodsSelectOptions } from 'cdk8s-plus-27' + +const podsSelectOptions: PodsSelectOptions = { ... } +``` + +##### `expressions`Optional + +```typescript +public readonly expressions: LabelExpression[]; +``` + +- *Type:* [`cdk8s-plus-27.LabelExpression`](#cdk8s-plus-27.LabelExpression)[] +- *Default:* no expressions requirements. + +Expressions the pods must satisify. + +--- + +##### `labels`Optional + +```typescript +public readonly labels: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} +- *Default:* no strict labels requirements. + +Labels the pods must have. + +--- + +##### `namespaces`Optional + +```typescript +public readonly namespaces: Namespaces; +``` + +- *Type:* [`cdk8s-plus-27.Namespaces`](#cdk8s-plus-27.Namespaces) +- *Default:* unset, implies the namespace of the resource this selection is used in. + +Namespaces the pods are allowed to be in. + +Use `Namespaces.all()` to allow all namespaces. + +--- + +### ProbeOptions + +Probe options. + +#### Initializer + +```typescript +import { ProbeOptions } from 'cdk8s-plus-27' + +const probeOptions: ProbeOptions = { ... } +``` + +##### `failureThreshold`Optional + +```typescript +public readonly failureThreshold: number; +``` + +- *Type:* `number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```typescript +public readonly initialDelaySeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```typescript +public readonly periodSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```typescript +public readonly successThreshold: number; +``` + +- *Type:* `number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```typescript +public readonly timeoutSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +### ResourceProps + +Initialization properties for resources. + +#### Initializer + +```typescript +import { ResourceProps } from 'cdk8s-plus-27' + +const resourceProps: ResourceProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +### RoleBindingProps + +Properties for `RoleBinding`. + +#### Initializer + +```typescript +import { RoleBindingProps } from 'cdk8s-plus-27' + +const roleBindingProps: RoleBindingProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `role`Required + +```typescript +public readonly role: IRole; +``` + +- *Type:* [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole) + +The role to bind to. + +A RoleBinding can reference a Role or a ClusterRole. + +--- + +### RolePolicyRule + +Policy rule of a `Role. + +#### Initializer + +```typescript +import { RolePolicyRule } from 'cdk8s-plus-27' + +const rolePolicyRule: RolePolicyRule = { ... } +``` + +##### `resources`Required + +```typescript +public readonly resources: IApiResource[]; +``` + +- *Type:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource)[] + +Resources this rule applies to. + +--- + +##### `verbs`Required + +```typescript +public readonly verbs: string[]; +``` + +- *Type:* `string`[] + +Verbs to allow. + +(e.g ['get', 'watch']) + +--- + +### RoleProps + +Properties for `Role`. + +#### Initializer + +```typescript +import { RoleProps } from 'cdk8s-plus-27' + +const roleProps: RoleProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `rules`Optional + +```typescript +public readonly rules: RolePolicyRule[]; +``` + +- *Type:* [`cdk8s-plus-27.RolePolicyRule`](#cdk8s-plus-27.RolePolicyRule)[] +- *Default:* [] + +A list of rules the role should allow. + +--- + +### ScalingPolicy + +#### Initializer + +```typescript +import { ScalingPolicy } from 'cdk8s-plus-27' + +const scalingPolicy: ScalingPolicy = { ... } +``` + +##### `replicas`Required + +```typescript +public readonly replicas: Replicas; +``` + +- *Type:* [`cdk8s-plus-27.Replicas`](#cdk8s-plus-27.Replicas) + +The type and quantity of replicas to change. + +--- + +##### `duration`Optional + +```typescript +public readonly duration: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* 15 seconds + +The amount of time the scaling policy has to continue scaling before the target metric must be revalidated. + +Must be greater than 0 seconds and no longer than 30 minutes. + +--- + +### ScalingRules + +Defines the scaling behavior for one direction. + +#### Initializer + +```typescript +import { ScalingRules } from 'cdk8s-plus-27' + +const scalingRules: ScalingRules = { ... } +``` + +##### `policies`Optional + +```typescript +public readonly policies: ScalingPolicy[]; +``` + +- *Type:* [`cdk8s-plus-27.ScalingPolicy`](#cdk8s-plus-27.ScalingPolicy)[] +- *Default:* * Scale up + * Increase no more than 4 pods per 60 seconds + * Double the number of pods per 60 seconds +* Scale down + * Decrease to minReplica count + +The scaling policies. + +--- + +##### `stabilizationWindow`Optional + +```typescript +public readonly stabilizationWindow: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* * On scale down no stabilization is performed. +* On scale up stabilization is performed for 5 minutes. + +Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur. + +Minimum duration is 1 second, max is 1 hour. + +--- + +##### `strategy`Optional + +```typescript +public readonly strategy: ScalingStrategy; +``` + +- *Type:* [`cdk8s-plus-27.ScalingStrategy`](#cdk8s-plus-27.ScalingStrategy) +- *Default:* MAX_CHANGE + +The strategy to use when scaling. + +--- + +### ScalingTarget + +Properties used to configure the target of an Autoscaler. + +#### Initializer + +```typescript +import { ScalingTarget } from 'cdk8s-plus-27' + +const scalingTarget: ScalingTarget = { ... } +``` + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `containers`Required + +```typescript +public readonly containers: Container[]; +``` + +- *Type:* [`cdk8s-plus-27.Container`](#cdk8s-plus-27.Container)[] + +Container definitions associated with the target. + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +##### `replicas`Optional + +```typescript +public readonly replicas: number; +``` + +- *Type:* `number` + +The fixed number of replicas defined on the target. + +This is used +for validation purposes as Scalable targets should not have a +fixed number of replicas. + +--- + +### SecretProps + +Options for `Secret`. + +#### Initializer + +```typescript +import { SecretProps } from 'cdk8s-plus-27' + +const secretProps: SecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `stringData`Optional + +```typescript +public readonly stringData: {[ key: string ]: string}; +``` + +- *Type:* {[ key: string ]: `string`} + +stringData allows specifying non-binary secret data in string form. + +It is +provided as a write-only convenience method. All keys and values are merged +into the data field on write, overwriting any existing values. It is never +output when reading from the API. + +--- + +##### `type`Optional + +```typescript +public readonly type: string; +``` + +- *Type:* `string` +- *Default:* undefined - Don't set a type. + +Optional type associated with the secret. + +Used to facilitate programmatic +handling of secret data by various controllers. + +--- + +### SecretValue + +Represents a specific value in JSON secret. + +#### Initializer + +```typescript +import { SecretValue } from 'cdk8s-plus-27' + +const secretValue: SecretValue = { ... } +``` + +##### `key`Required + +```typescript +public readonly key: string; +``` + +- *Type:* `string` + +The JSON key. + +--- + +##### `secret`Required + +```typescript +public readonly secret: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +The secret. + +--- + +### SecretVolumeOptions + +Options for the Secret-based volume. + +#### Initializer + +```typescript +import { SecretVolumeOptions } from 'cdk8s-plus-27' + +const secretVolumeOptions: SecretVolumeOptions = { ... } +``` + +##### `defaultMode`Optional + +```typescript +public readonly defaultMode: number; +``` + +- *Type:* `number` +- *Default:* 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. + +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. + +--- + +##### `items`Optional + +```typescript +public readonly items: {[ key: string ]: PathMapping}; +``` + +- *Type:* {[ key: string ]: [`cdk8s-plus-27.PathMapping`](#cdk8s-plus-27.PathMapping)} +- *Default:* no mapping + +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. Paths must be relative and may not +contain the '..' path or start with '..'. + +--- + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` +- *Default:* auto-generated + +The volume name. + +--- + +##### `optional`Optional + +```typescript +public readonly optional: boolean; +``` + +- *Type:* `boolean` +- *Default:* undocumented + +Specify whether the secret or its keys must be defined. + +--- + +### ServiceAccountProps + +Properties for initialization of `ServiceAccount`. + +#### Initializer + +```typescript +import { ServiceAccountProps } from 'cdk8s-plus-27' + +const serviceAccountProps: ServiceAccountProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountToken`Optional + +```typescript +public readonly automountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether pods running as this service account should have an API token automatically mounted. + +Can be overridden at the pod level. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `secrets`Optional + +```typescript +public readonly secrets: ISecret[]; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret)[] + +List of secrets allowed to be used by pods running using this ServiceAccount. + +> https://kubernetes.io/docs/concepts/configuration/secret + +--- + +### ServiceAccountTokenSecretProps + +Options for `ServiceAccountTokenSecret`. + +#### Initializer + +```typescript +import { ServiceAccountTokenSecretProps } from 'cdk8s-plus-27' + +const serviceAccountTokenSecretProps: ServiceAccountTokenSecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `serviceAccount`Required + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) + +The service account to store a secret for. + +--- + +### ServiceBindOptions + +Options for `Service.bind`. + +#### Initializer + +```typescript +import { ServiceBindOptions } from 'cdk8s-plus-27' + +const serviceBindOptions: ServiceBindOptions = { ... } +``` + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `nodePort`Optional + +```typescript +public readonly nodePort: number; +``` + +- *Type:* `number` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```typescript +public readonly protocol: Protocol; +``` + +- *Type:* [`cdk8s-plus-27.Protocol`](#cdk8s-plus-27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `targetPort`Optional + +```typescript +public readonly targetPort: number; +``` + +- *Type:* `number` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +### ServiceIngressBackendOptions + +Options for setting up backends for ingress rules. + +#### Initializer + +```typescript +import { ServiceIngressBackendOptions } from 'cdk8s-plus-27' + +const serviceIngressBackendOptions: ServiceIngressBackendOptions = { ... } +``` + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* if the service exposes a single port, this port will be used. + +The port to use to access the service. + +This option will fail if the service does not expose any ports. +- If the service exposes multiple ports, this option must be specified. +- If the service exposes a single port, this option is optional and if + specified, it must be the same port exposed by the service. + +--- + +### ServicePort + +Definition of a service port. + +#### Initializer + +```typescript +import { ServicePort } from 'cdk8s-plus-27' + +const servicePort: ServicePort = { ... } +``` + +##### `name`Optional + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of this port within the service. + +This must be a DNS_LABEL. All +ports within a ServiceSpec must have unique names. This maps to the 'Name' +field in EndpointPort objects. Optional if only one ServicePort is defined +on this service. + +--- + +##### `nodePort`Optional + +```typescript +public readonly nodePort: number; +``` + +- *Type:* `number` +- *Default:* auto-allocate a port if the ServiceType of this Service requires one. + +The port on each node on which this service is exposed when type=NodePort or LoadBalancer. + +Usually assigned by the system. If specified, it will be +allocated to the service if unused or else creation of the service will +fail. Default is to auto-allocate a port if the ServiceType of this Service +requires one. + +> https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + +--- + +##### `protocol`Optional + +```typescript +public readonly protocol: Protocol; +``` + +- *Type:* [`cdk8s-plus-27.Protocol`](#cdk8s-plus-27.Protocol) +- *Default:* Protocol.TCP + +The IP protocol for this port. + +Supports "TCP", "UDP", and "SCTP". Default is TCP. + +--- + +##### `targetPort`Optional + +```typescript +public readonly targetPort: number; +``` + +- *Type:* `number` +- *Default:* The value of `port` will be used. + +The port number the service will redirect to. + +--- + +##### `port`Required + +```typescript +public readonly port: number; +``` + +- *Type:* `number` + +The port number the service will bind to. + +--- + +### ServiceProps + +Properties for `Service`. + +#### Initializer + +```typescript +import { ServiceProps } from 'cdk8s-plus-27' + +const serviceProps: ServiceProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `clusterIP`Optional + +```typescript +public readonly clusterIP: string; +``` + +- *Type:* `string` +- *Default:* Automatically assigned. + +The IP address of the service and is usually assigned randomly by the master. + +If an address is specified manually and is not in use by others, it +will be allocated to the service; otherwise, creation of the service will +fail. This field can not be changed through updates. Valid values are +"None", empty string (""), or a valid IP address. "None" can be specified +for headless services when proxying is not required. Only applies to types +ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. + +> https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + +--- + +##### `externalIPs`Optional + +```typescript +public readonly externalIPs: string[]; +``` + +- *Type:* `string`[] +- *Default:* No external IPs. + +A list of IP addresses for which nodes in the cluster will also accept traffic for this service. + +These IPs are not managed by Kubernetes. The user +is responsible for ensuring that traffic arrives at a node with this IP. A +common example is external load-balancers that are not part of the +Kubernetes system. + +--- + +##### `externalName`Optional + +```typescript +public readonly externalName: string; +``` + +- *Type:* `string` +- *Default:* No external name. + +The externalName to be used when ServiceType.EXTERNAL_NAME is set. + +--- + +##### `loadBalancerSourceRanges`Optional + +```typescript +public readonly loadBalancerSourceRanges: string[]; +``` + +- *Type:* `string`[] + +A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. + +More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/ + +--- + +##### `ports`Optional + +```typescript +public readonly ports: ServicePort[]; +``` + +- *Type:* [`cdk8s-plus-27.ServicePort`](#cdk8s-plus-27.ServicePort)[] +- *Default:* either the selector ports, or none. + +The ports this service binds to. + +If the selector of the service is a managed pod / workload, +its ports will are automatically extracted and used as the default value. +Otherwise, no ports are bound. + +--- + +##### `selector`Optional + +```typescript +public readonly selector: IPodSelector; +``` + +- *Type:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) +- *Default:* unset, the service is assumed to have an external process managing +its endpoints, which Kubernetes will not modify. + +Which pods should the service select and route to. + +You can pass one of the following: + +- An instance of `Pod` or any workload resource (e.g `Deployment`, `StatefulSet`, ...) +- Pods selected by the `Pods.select` function. Note that in this case only labels can be specified. + +--- + +##### `type`Optional + +```typescript +public readonly type: ServiceType; +``` + +- *Type:* [`cdk8s-plus-27.ServiceType`](#cdk8s-plus-27.ServiceType) +- *Default:* ServiceType.ClusterIP + +Determines how the Service is exposed. + +More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + +--- + +### SshAuthSecretProps + +Options for `SshAuthSecret`. + +#### Initializer + +```typescript +import { SshAuthSecretProps } from 'cdk8s-plus-27' + +const sshAuthSecretProps: SshAuthSecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `sshPrivateKey`Required + +```typescript +public readonly sshPrivateKey: string; +``` + +- *Type:* `string` + +The SSH private key to use. + +--- + +### StatefulSetProps + +Properties for initialization of `StatefulSet`. + +#### Initializer + +```typescript +import { StatefulSetProps } from 'cdk8s-plus-27' + +const statefulSetProps: StatefulSetProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```typescript +public readonly podMetadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```typescript +public readonly select: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```typescript +public readonly spread: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +##### `minReady`Optional + +```typescript +public readonly minReady: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(0) + +Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + +Zero means the pod will be considered available as soon as it is ready. + +This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. + +> https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds + +--- + +##### `podManagementPolicy`Optional + +```typescript +public readonly podManagementPolicy: PodManagementPolicy; +``` + +- *Type:* [`cdk8s-plus-27.PodManagementPolicy`](#cdk8s-plus-27.PodManagementPolicy) +- *Default:* PodManagementPolicy.ORDERED_READY + +Pod management policy to use for this statefulset. + +--- + +##### `replicas`Optional + +```typescript +public readonly replicas: number; +``` + +- *Type:* `number` +- *Default:* 1 + +Number of desired pods. + +--- + +##### `service`Optional + +```typescript +public readonly service: Service; +``` + +- *Type:* [`cdk8s-plus-27.Service`](#cdk8s-plus-27.Service) +- *Default:* A new headless service will be created. + +Service to associate with the statefulset. + +--- + +##### `strategy`Optional + +```typescript +public readonly strategy: StatefulSetUpdateStrategy; +``` + +- *Type:* [`cdk8s-plus-27.StatefulSetUpdateStrategy`](#cdk8s-plus-27.StatefulSetUpdateStrategy) +- *Default:* RollingUpdate with partition set to 0 + +Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. + +--- + +### StatefulSetUpdateStrategyRollingUpdateOptions + +Options for `StatefulSetUpdateStrategy.rollingUpdate`. + +#### Initializer + +```typescript +import { StatefulSetUpdateStrategyRollingUpdateOptions } from 'cdk8s-plus-27' + +const statefulSetUpdateStrategyRollingUpdateOptions: StatefulSetUpdateStrategyRollingUpdateOptions = { ... } +``` + +##### `partition`Optional + +```typescript +public readonly partition: number; +``` + +- *Type:* `number` +- *Default:* 0 + +If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet's .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version. + +If the partition is greater than replicas, updates to the pod template will not be propagated to Pods. +In most cases you will not need to use a partition, but they are useful if you want to stage an +update, roll out a canary, or perform a phased roll out. + +> https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions + +--- + +### SubjectConfiguration + +Subject contains a reference to the object or user identities a role binding applies to. + +This can either hold a direct API object reference, or a value +for non-objects such as user and group names. + +#### Initializer + +```typescript +import { SubjectConfiguration } from 'cdk8s-plus-27' + +const subjectConfiguration: SubjectConfiguration = { ... } +``` + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +Kind of object being referenced. + +Values defined by this API group are +"User", "Group", and "ServiceAccount". If the Authorizer does not +recognized the kind value, the Authorizer should report an error. + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +Name of the object being referenced. + +--- + +##### `apiGroup`Optional + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +APIGroup holds the API group of the referenced subject. + +Defaults to "" for +ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User +and Group subjects. + +--- + +##### `namespace`Optional + +```typescript +public readonly namespace: string; +``` + +- *Type:* `string` + +Namespace of the referenced object. + +If the object kind is non-namespace, +such as "User" or "Group", and this value is not empty the Authorizer +should report an error. + +--- + +### Sysctl + +Sysctl defines a kernel parameter to be set. + +#### Initializer + +```typescript +import { Sysctl } from 'cdk8s-plus-27' + +const sysctl: Sysctl = { ... } +``` + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +Name of a property to set. + +--- + +##### `value`Required + +```typescript +public readonly value: string; +``` + +- *Type:* `string` + +Value of a property to set. + +--- + +### TcpSocketProbeOptions + +Options for `Probe.fromTcpSocket()`. + +#### Initializer + +```typescript +import { TcpSocketProbeOptions } from 'cdk8s-plus-27' + +const tcpSocketProbeOptions: TcpSocketProbeOptions = { ... } +``` + +##### `failureThreshold`Optional + +```typescript +public readonly failureThreshold: number; +``` + +- *Type:* `number` +- *Default:* 3 + +Minimum consecutive failures for the probe to be considered failed after having succeeded. + +Defaults to 3. Minimum value is 1. + +--- + +##### `initialDelaySeconds`Optional + +```typescript +public readonly initialDelaySeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* immediate + +Number of seconds after the container has started before liveness probes are initiated. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `periodSeconds`Optional + +```typescript +public readonly periodSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(10) Minimum value is 1. + +How often (in seconds) to perform the probe. + +Default to 10 seconds. Minimum value is 1. + +--- + +##### `successThreshold`Optional + +```typescript +public readonly successThreshold: number; +``` + +- *Type:* `number` +- *Default:* 1 Must be 1 for liveness and startup. Minimum value is 1. + +Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. + +Must be 1 for liveness and startup. Minimum value is 1. + +--- + +##### `timeoutSeconds`Optional + +```typescript +public readonly timeoutSeconds: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(1) + +Number of seconds after which the probe times out. + +Defaults to 1 second. Minimum value is 1. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +--- + +##### `host`Optional + +```typescript +public readonly host: string; +``` + +- *Type:* `string` +- *Default:* defaults to the pod IP + +The host name to connect to on the container. + +--- + +##### `port`Optional + +```typescript +public readonly port: number; +``` + +- *Type:* `number` +- *Default:* defaults to `container.port`. + +The TCP port to connect to on the container. + +--- + +### TlsSecretProps + +Options for `TlsSecret`. + +#### Initializer + +```typescript +import { TlsSecretProps } from 'cdk8s-plus-27' + +const tlsSecretProps: TlsSecretProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `immutable`Optional + +```typescript +public readonly immutable: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + +If not set to true, the field can be modified at any time. + +--- + +##### `tlsCert`Required + +```typescript +public readonly tlsCert: string; +``` + +- *Type:* `string` + +The TLS cert. + +--- + +##### `tlsKey`Required + +```typescript +public readonly tlsKey: string; +``` + +- *Type:* `string` + +The TLS key. + +--- + +### VolumeMount + +Mount a volume from the pod to the container. + +#### Initializer + +```typescript +import { VolumeMount } from 'cdk8s-plus-27' + +const volumeMount: VolumeMount = { ... } +``` + +##### `propagation`Optional + +```typescript +public readonly propagation: MountPropagation; +``` + +- *Type:* [`cdk8s-plus-27.MountPropagation`](#cdk8s-plus-27.MountPropagation) +- *Default:* MountPropagation.NONE + +Determines how mounts are propagated from the host to container and the other way around. + +When not set, MountPropagationNone is used. + +Mount propagation allows for sharing volumes mounted by a Container to +other Containers in the same Pod, or even to other Pods on the same node. + +--- + +##### `readOnly`Optional + +```typescript +public readonly readOnly: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Mounted read-only if true, read-write otherwise (false or unspecified). + +Defaults to false. + +--- + +##### `subPath`Optional + +```typescript +public readonly subPath: string; +``` + +- *Type:* `string` +- *Default:* "" the volume's root + +Path within the volume from which the container's volume should be mounted.). + +--- + +##### `subPathExpr`Optional + +```typescript +public readonly subPathExpr: string; +``` + +- *Type:* `string` +- *Default:* "" volume's root. + +Expanded path within the volume from which the container's volume should be mounted. + +Behaves similarly to SubPath but environment variable references +$(VAR_NAME) are expanded using the container's environment. Defaults to "" +(volume's root). + +`subPathExpr` and `subPath` are mutually exclusive. + +--- + +##### `path`Required + +```typescript +public readonly path: string; +``` + +- *Type:* `string` + +Path within the container at which the volume should be mounted. + +Must not +contain ':'. + +--- + +##### `volume`Required + +```typescript +public readonly volume: Volume; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume) + +The volume to mount. + +--- + +### WorkloadProps + +Properties for `Workload`. + +#### Initializer + +```typescript +import { WorkloadProps } from 'cdk8s-plus-27' + +const workloadProps: WorkloadProps = { ... } +``` + +##### `metadata`Optional + +```typescript +public readonly metadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +Metadata that all persisted resources must have, which includes all objects users must create. + +--- + +##### `automountServiceAccountToken`Optional + +```typescript +public readonly automountServiceAccountToken: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Indicates whether a service account token should be automatically mounted. + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server + +--- + +##### `containers`Optional + +```typescript +public readonly containers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No containers. Note that a pod spec must include at least one container. + +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()` + +--- + +##### `dns`Optional + +```typescript +public readonly dns: PodDnsProps; +``` + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) +- *Default:* policy: DnsPolicy.CLUSTER_FIRST + hostnameAsFQDN: false + +DNS settings for the pod. + +> https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ + +--- + +##### `dockerRegistryAuth`Optional + +```typescript +public readonly dockerRegistryAuth: ISecret; +``` + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) +- *Default:* No auth. Images are assumed to be publicly available. + +A secret containing docker credentials for authenticating to a registry. + +--- + +##### `hostAliases`Optional + +```typescript +public readonly hostAliases: HostAlias[]; +``` + +- *Type:* [`cdk8s-plus-27.HostAlias`](#cdk8s-plus-27.HostAlias)[] + +HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. + +--- + +##### `hostNetwork`Optional + +```typescript +public readonly hostNetwork: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Host network for the pod. + +--- + +##### `initContainers`Optional + +```typescript +public readonly initContainers: ContainerProps[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps)[] +- *Default:* No init containers. + +List of initialization containers belonging to the pod. + +Init containers are executed in order prior to containers being started. +If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. +The name for an init container or normal container must be unique among all containers. +Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. +The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit +for each resource type, and then using the max of of that value or the sum of the normal containers. +Limits are applied to init containers in a similar fashion. + +Init containers cannot currently be added ,removed or updated. + +> https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + +--- + +##### `isolate`Optional + +```typescript +public readonly isolate: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Isolates the pod. + +This will prevent any ingress or egress connections to / from this pod. +You can however allow explicit connections post instantiation by using the `.connections` property. + +--- + +##### `restartPolicy`Optional + +```typescript +public readonly restartPolicy: RestartPolicy; +``` + +- *Type:* [`cdk8s-plus-27.RestartPolicy`](#cdk8s-plus-27.RestartPolicy) +- *Default:* RestartPolicy.ALWAYS + +Restart policy for all containers within the pod. + +> https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + +--- + +##### `securityContext`Optional + +```typescript +public readonly securityContext: PodSecurityContextProps; +``` + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) +- *Default:* fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS + ensureNonRoot: true + +SecurityContext holds pod-level security attributes and common container settings. + +--- + +##### `serviceAccount`Optional + +```typescript +public readonly serviceAccount: IServiceAccount; +``` + +- *Type:* [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) +- *Default:* No service account. + +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). + +> https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + +--- + +##### `terminationGracePeriod`Optional + +```typescript +public readonly terminationGracePeriod: Duration; +``` + +- *Type:* [`cdk8s.Duration`](#cdk8s.Duration) +- *Default:* Duration.seconds(30) + +Grace period until the pod is terminated. + +--- + +##### `volumes`Optional + +```typescript +public readonly volumes: Volume[]; +``` + +- *Type:* [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume)[] +- *Default:* No volumes. + +List of volumes that can be mounted by containers belonging to the pod. + +You can also add volumes later using `podSpec.addVolume()` + +> https://kubernetes.io/docs/concepts/storage/volumes + +--- + +##### `podMetadata`Optional + +```typescript +public readonly podMetadata: ApiObjectMetadata; +``` + +- *Type:* [`cdk8s.ApiObjectMetadata`](#cdk8s.ApiObjectMetadata) + +The pod metadata of this workload. + +--- + +##### `select`Optional + +```typescript +public readonly select: boolean; +``` + +- *Type:* `boolean` +- *Default:* true + +Automatically allocates a pod label selector for this workload and add it to the pod metadata. + +This ensures this workload manages pods created by +its pod template. + +--- + +##### `spread`Optional + +```typescript +public readonly spread: boolean; +``` + +- *Type:* `boolean` +- *Default:* false + +Automatically spread pods across hostname and zones. + +> https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints + +--- + +### WorkloadSchedulingSpreadOptions + +Options for `WorkloadScheduling.spread`. + +#### Initializer + +```typescript +import { WorkloadSchedulingSpreadOptions } from 'cdk8s-plus-27' + +const workloadSchedulingSpreadOptions: WorkloadSchedulingSpreadOptions = { ... } +``` + +##### `topology`Optional + +```typescript +public readonly topology: Topology; +``` + +- *Type:* [`cdk8s-plus-27.Topology`](#cdk8s-plus-27.Topology) +- *Default:* Topology.HOSTNAME + +Which topology to spread on. + +--- + +##### `weight`Optional + +```typescript +public readonly weight: number; +``` + +- *Type:* `number` +- *Default:* no weight. spread is assumed to be required. + +Indicates the spread is optional, with this weight score. + +--- + +## Classes + +### ApiResource + +- *Implements:* [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource), [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +Represents information about an API resource type. + +#### Methods + +##### `asApiResource` + +```typescript +public asApiResource() +``` + +##### `asNonApiResource` + +```typescript +public asNonApiResource() +``` + +#### Static Functions + +##### `custom` + +```typescript +import { ApiResource } from 'cdk8s-plus-27' + +ApiResource.custom(options: ApiResourceOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.ApiResourceOptions`](#cdk8s-plus-27.ApiResourceOptions) + +--- + +#### Properties + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of the resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +#### Constants + +##### `API_SERVICES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for APIService. + +--- + +##### `BINDINGS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Binding. + +--- + +##### `CERTIFICATE_SIGNING_REQUESTS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for CertificateSigningRequest. + +--- + +##### `CLUSTER_ROLE_BINDINGS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ClusterRoleBinding. + +--- + +##### `CLUSTER_ROLES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ClusterRole. + +--- + +##### `COMPONENT_STATUSES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ComponentStatus. + +--- + +##### `CONFIG_MAPS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ConfigMap. + +--- + +##### `CONTROLLER_REVISIONS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ControllerRevision. + +--- + +##### `CRON_JOBS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for CronJob. + +--- + +##### `CSI_DRIVERS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for CSIDriver. + +--- + +##### `CSI_NODES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for CSINode. + +--- + +##### `CSI_STORAGE_CAPACITIES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for CSIStorageCapacity. + +--- + +##### `CUSTOM_RESOURCE_DEFINITIONS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for CustomResourceDefinition. + +--- + +##### `DAEMON_SETS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for DaemonSet. + +--- + +##### `DEPLOYMENTS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Deployment. + +--- + +##### `ENDPOINT_SLICES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for EndpointSlice. + +--- + +##### `ENDPOINTS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Endpoints. + +--- + +##### `EVENTS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Event. + +--- + +##### `FLOW_SCHEMAS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for FlowSchema. + +--- + +##### `HORIZONTAL_POD_AUTOSCALERS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for HorizontalPodAutoscaler. + +--- + +##### `INGRESS_CLASSES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for IngressClass. + +--- + +##### `INGRESSES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Ingress. + +--- + +##### `JOBS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Job. + +--- + +##### `LEASES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Lease. + +--- + +##### `LIMIT_RANGES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for LimitRange. + +--- + +##### `LOCAL_SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for LocalSubjectAccessReview. + +--- + +##### `MUTATING_WEBHOOK_CONFIGURATIONS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for MutatingWebhookConfiguration. + +--- + +##### `NAMESPACES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Namespace. + +--- + +##### `NETWORK_POLICIES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for NetworkPolicy. + +--- + +##### `NODES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Node. + +--- + +##### `PERSISTENT_VOLUME_CLAIMS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for PersistentVolumeClaim. + +--- + +##### `PERSISTENT_VOLUMES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for PersistentVolume. + +--- + +##### `POD_DISRUPTION_BUDGETS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for PodDisruptionBudget. + +--- + +##### `POD_TEMPLATES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for PodTemplate. + +--- + +##### `PODS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Pod. + +--- + +##### `PRIORITY_CLASSES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for PriorityClass. + +--- + +##### `PRIORITY_LEVEL_CONFIGURATIONS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for PriorityLevelConfiguration. + +--- + +##### `REPLICA_SETS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ReplicaSet. + +--- + +##### `REPLICATION_CONTROLLERS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ReplicationController. + +--- + +##### `RESOURCE_QUOTAS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ResourceQuota. + +--- + +##### `ROLE_BINDINGS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for RoleBinding. + +--- + +##### `ROLES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Role. + +--- + +##### `RUNTIME_CLASSES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for RuntimeClass. + +--- + +##### `SECRETS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Secret. + +--- + +##### `SELF_SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for SelfSubjectAccessReview. + +--- + +##### `SELF_SUBJECT_RULES_REVIEWS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for SelfSubjectRulesReview. + +--- + +##### `SERVICE_ACCOUNTS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ServiceAccount. + +--- + +##### `SERVICES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for Service. + +--- + +##### `STATEFUL_SETS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for StatefulSet. + +--- + +##### `STORAGE_CLASSES` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for StorageClass. + +--- + +##### `SUBJECT_ACCESS_REVIEWS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for SubjectAccessReview. + +--- + +##### `TOKEN_REVIEWS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for TokenReview. + +--- + +##### `VALIDATING_WEBHOOK_CONFIGURATIONS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for ValidatingWebhookConfiguration. + +--- + +##### `VOLUME_ATTACHMENTS` + +- *Type:* [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource) + +API resource information for VolumeAttachment. + +--- + +### Container + +A single application container that you want to run within a pod. + +#### Initializers + +```typescript +import { Container } from 'cdk8s-plus-27' + +new Container(props: ContainerProps) +``` + +##### `props`Required + +- *Type:* [`cdk8s-plus-27.ContainerProps`](#cdk8s-plus-27.ContainerProps) + +--- + +#### Methods + +##### `addPort` + +```typescript +public addPort(port: ContainerPort) +``` + +###### `port`Required + +- *Type:* [`cdk8s-plus-27.ContainerPort`](#cdk8s-plus-27.ContainerPort) + +--- + +##### `mount` + +```typescript +public mount(path: string, storage: IStorage, options?: MountOptions) +``` + +###### `path`Required + +- *Type:* `string` + +The desired path in the container. + +--- + +###### `storage`Required + +- *Type:* [`cdk8s-plus-27.IStorage`](#cdk8s-plus-27.IStorage) + +The storage to mount. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.MountOptions`](#cdk8s-plus-27.MountOptions) + +--- + + +#### Properties + +##### `env`Required + +```typescript +public readonly env: Env; +``` + +- *Type:* [`cdk8s-plus-27.Env`](#cdk8s-plus-27.Env) + +The environment of the container. + +--- + +##### `image`Required + +```typescript +public readonly image: string; +``` + +- *Type:* `string` + +The container image. + +--- + +##### `imagePullPolicy`Required + +```typescript +public readonly imagePullPolicy: ImagePullPolicy; +``` + +- *Type:* [`cdk8s-plus-27.ImagePullPolicy`](#cdk8s-plus-27.ImagePullPolicy) + +Image pull policy for this container. + +--- + +##### `mounts`Required + +```typescript +public readonly mounts: VolumeMount[]; +``` + +- *Type:* [`cdk8s-plus-27.VolumeMount`](#cdk8s-plus-27.VolumeMount)[] + +Volume mounts configured for this container. + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The name of the container. + +--- + +##### `ports`Required + +```typescript +public readonly ports: ContainerPort[]; +``` + +- *Type:* [`cdk8s-plus-27.ContainerPort`](#cdk8s-plus-27.ContainerPort)[] + +Ports exposed by this containers. + +Returns a copy, use `addPort` to modify. + +--- + +##### `securityContext`Required + +```typescript +public readonly securityContext: ContainerSecurityContext; +``` + +- *Type:* [`cdk8s-plus-27.ContainerSecurityContext`](#cdk8s-plus-27.ContainerSecurityContext) + +The security context of the container. + +--- + +##### `args`Optional + +```typescript +public readonly args: string[]; +``` + +- *Type:* `string`[] + +Arguments to the entrypoint. + +--- + +##### `command`Optional + +```typescript +public readonly command: string[]; +``` + +- *Type:* `string`[] + +Entrypoint array (the command to execute when the container starts). + +--- + +##### ~~`port`~~Optional + +- *Deprecated:* - use `portNumber`. + +```typescript +public readonly port: number; +``` + +- *Type:* `number` + +--- + +##### `portNumber`Optional + +```typescript +public readonly portNumber: number; +``` + +- *Type:* `number` + +The port number that was configured for this container. + +If undefined, either the container doesn't expose a port, or its +port configuration is stored in the `ports` field. + +--- + +##### `resources`Optional + +```typescript +public readonly resources: ContainerResources; +``` + +- *Type:* [`cdk8s-plus-27.ContainerResources`](#cdk8s-plus-27.ContainerResources) + +Compute resources (CPU and memory requests and limits) required by the container. + +> https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +--- + +##### `workingDir`Optional + +```typescript +public readonly workingDir: string; +``` + +- *Type:* `string` + +The working directory inside the container. + +--- + + +### ContainerSecurityContext + +Container security attributes and settings. + +#### Initializers + +```typescript +import { ContainerSecurityContext } from 'cdk8s-plus-27' + +new ContainerSecurityContext(props?: ContainerSecurityContextProps) +``` + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.ContainerSecurityContextProps`](#cdk8s-plus-27.ContainerSecurityContextProps) + +--- + + + +#### Properties + +##### `ensureNonRoot`Required + +```typescript +public readonly ensureNonRoot: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `privileged`Required + +```typescript +public readonly privileged: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `readOnlyRootFilesystem`Required + +```typescript +public readonly readOnlyRootFilesystem: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `allowPrivilegeEscalation`Optional + +```typescript +public readonly allowPrivilegeEscalation: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `group`Optional + +```typescript +public readonly group: number; +``` + +- *Type:* `number` + +--- + +##### `user`Optional + +```typescript +public readonly user: number; +``` + +- *Type:* `number` + +--- + + +### Cpu + +Represents the amount of CPU. + +The amount can be passed as millis or units. + + +#### Static Functions + +##### `millis` + +```typescript +import { Cpu } from 'cdk8s-plus-27' + +Cpu.millis(amount: number) +``` + +###### `amount`Required + +- *Type:* `number` + +--- + +##### `units` + +```typescript +import { Cpu } from 'cdk8s-plus-27' + +Cpu.units(amount: number) +``` + +###### `amount`Required + +- *Type:* `number` + +--- + +#### Properties + +##### `amount`Required + +```typescript +public readonly amount: string; +``` + +- *Type:* `string` + +--- + + +### DeploymentStrategy + +Deployment strategies. + + +#### Static Functions + +##### `recreate` + +```typescript +import { DeploymentStrategy } from 'cdk8s-plus-27' + +DeploymentStrategy.recreate() +``` + +##### `rollingUpdate` + +```typescript +import { DeploymentStrategy } from 'cdk8s-plus-27' + +DeploymentStrategy.rollingUpdate(options?: DeploymentStrategyRollingUpdateOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.DeploymentStrategyRollingUpdateOptions`](#cdk8s-plus-27.DeploymentStrategyRollingUpdateOptions) + +--- + + + +### Env + +Container environment variables. + +#### Initializers + +```typescript +import { Env } from 'cdk8s-plus-27' + +new Env(sources: EnvFrom[], variables: {[ key: string ]: EnvValue}) +``` + +##### `sources`Required + +- *Type:* [`cdk8s-plus-27.EnvFrom`](#cdk8s-plus-27.EnvFrom)[] + +--- + +##### `variables`Required + +- *Type:* {[ key: string ]: [`cdk8s-plus-27.EnvValue`](#cdk8s-plus-27.EnvValue)} + +--- + +#### Methods + +##### `addVariable` + +```typescript +public addVariable(name: string, value: EnvValue) +``` + +###### `name`Required + +- *Type:* `string` + +--- + +###### `value`Required + +- *Type:* [`cdk8s-plus-27.EnvValue`](#cdk8s-plus-27.EnvValue) + +--- + +##### `copyFrom` + +```typescript +public copyFrom(from: EnvFrom) +``` + +###### `from`Required + +- *Type:* [`cdk8s-plus-27.EnvFrom`](#cdk8s-plus-27.EnvFrom) + +--- + +#### Static Functions + +##### `fromConfigMap` + +```typescript +import { Env } from 'cdk8s-plus-27' + +Env.fromConfigMap(configMap: IConfigMap, prefix?: string) +``` + +###### `configMap`Required + +- *Type:* [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap) + +--- + +###### `prefix`Optional + +- *Type:* `string` + +--- + +##### `fromSecret` + +```typescript +import { Env } from 'cdk8s-plus-27' + +Env.fromSecret(secr: ISecret) +``` + +###### `secr`Required + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +--- + +#### Properties + +##### `sources`Required + +```typescript +public readonly sources: EnvFrom[]; +``` + +- *Type:* [`cdk8s-plus-27.EnvFrom`](#cdk8s-plus-27.EnvFrom)[] + +The list of sources used to populate the container environment, in addition to the `variables`. + +Returns a copy. To add a source use `container.env.copyFrom()`. + +--- + +##### `variables`Required + +```typescript +public readonly variables: {[ key: string ]: EnvValue}; +``` + +- *Type:* {[ key: string ]: [`cdk8s-plus-27.EnvValue`](#cdk8s-plus-27.EnvValue)} + +The environment variables for this container. + +Returns a copy. To add environment variables use `container.env.addVariable()`. + +--- + + +### EnvFrom + +A collection of env variables defined in other resources. + +#### Initializers + +```typescript +import { EnvFrom } from 'cdk8s-plus-27' + +new EnvFrom(configMap?: IConfigMap, prefix?: string, sec?: ISecret) +``` + +##### `configMap`Optional + +- *Type:* [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap) + +--- + +##### `prefix`Optional + +- *Type:* `string` + +--- + +##### `sec`Optional + +- *Type:* [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +--- + + + + + +### EnvValue + +Utility class for creating reading env values from various sources. + + +#### Static Functions + +##### `fromConfigMap` + +```typescript +import { EnvValue } from 'cdk8s-plus-27' + +EnvValue.fromConfigMap(configMap: IConfigMap, key: string, options?: EnvValueFromConfigMapOptions) +``` + +###### `configMap`Required + +- *Type:* [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap) + +The config map. + +--- + +###### `key`Required + +- *Type:* `string` + +The key to extract the value from. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromConfigMapOptions`](#cdk8s-plus-27.EnvValueFromConfigMapOptions) + +Additional options. + +--- + +##### `fromFieldRef` + +```typescript +import { EnvValue } from 'cdk8s-plus-27' + +EnvValue.fromFieldRef(fieldPath: EnvFieldPaths, options?: EnvValueFromFieldRefOptions) +``` + +###### `fieldPath`Required + +- *Type:* [`cdk8s-plus-27.EnvFieldPaths`](#cdk8s-plus-27.EnvFieldPaths) + +: The field reference. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromFieldRefOptions`](#cdk8s-plus-27.EnvValueFromFieldRefOptions) + +: Additional options. + +--- + +##### `fromProcess` + +```typescript +import { EnvValue } from 'cdk8s-plus-27' + +EnvValue.fromProcess(key: string, options?: EnvValueFromProcessOptions) +``` + +###### `key`Required + +- *Type:* `string` + +The key to read. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromProcessOptions`](#cdk8s-plus-27.EnvValueFromProcessOptions) + +Additional options. + +--- + +##### `fromResource` + +```typescript +import { EnvValue } from 'cdk8s-plus-27' + +EnvValue.fromResource(resource: ResourceFieldPaths, options?: EnvValueFromResourceOptions) +``` + +###### `resource`Required + +- *Type:* [`cdk8s-plus-27.ResourceFieldPaths`](#cdk8s-plus-27.ResourceFieldPaths) + +: Resource to select the value from. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromResourceOptions`](#cdk8s-plus-27.EnvValueFromResourceOptions) + +: Additional options. + +--- + +##### `fromSecretValue` + +```typescript +import { EnvValue } from 'cdk8s-plus-27' + +EnvValue.fromSecretValue(secretValue: SecretValue, options?: EnvValueFromSecretOptions) +``` + +###### `secretValue`Required + +- *Type:* [`cdk8s-plus-27.SecretValue`](#cdk8s-plus-27.SecretValue) + +The secret value (secrent + key). + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromSecretOptions`](#cdk8s-plus-27.EnvValueFromSecretOptions) + +Additional options. + +--- + +##### `fromValue` + +```typescript +import { EnvValue } from 'cdk8s-plus-27' + +EnvValue.fromValue(value: string) +``` + +###### `value`Required + +- *Type:* `string` + +The value. + +--- + +#### Properties + +##### `value`Optional + +```typescript +public readonly value: any; +``` + +- *Type:* `any` + +--- + +##### `valueFrom`Optional + +```typescript +public readonly valueFrom: any; +``` + +- *Type:* `any` + +--- + + +### Handler + +Defines a specific action that should be taken. + + +#### Static Functions + +##### `fromCommand` + +```typescript +import { Handler } from 'cdk8s-plus-27' + +Handler.fromCommand(command: string[]) +``` + +###### `command`Required + +- *Type:* `string`[] + +The command to execute. + +--- + +##### `fromHttpGet` + +```typescript +import { Handler } from 'cdk8s-plus-27' + +Handler.fromHttpGet(path: string, options?: HandlerFromHttpGetOptions) +``` + +###### `path`Required + +- *Type:* `string` + +The URL path to hit. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.HandlerFromHttpGetOptions`](#cdk8s-plus-27.HandlerFromHttpGetOptions) + +Options. + +--- + +##### `fromTcpSocket` + +```typescript +import { Handler } from 'cdk8s-plus-27' + +Handler.fromTcpSocket(options?: HandlerFromTcpSocketOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.HandlerFromTcpSocketOptions`](#cdk8s-plus-27.HandlerFromTcpSocketOptions) + +Options. + +--- + + + +### IngressBackend + +The backend for an ingress path. + + +#### Static Functions + +##### `fromResource` + +```typescript +import { IngressBackend } from 'cdk8s-plus-27' + +IngressBackend.fromResource(resource: IResource) +``` + +###### `resource`Required + +- *Type:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +--- + +##### `fromService` + +```typescript +import { IngressBackend } from 'cdk8s-plus-27' + +IngressBackend.fromService(serv: Service, options?: ServiceIngressBackendOptions) +``` + +###### `serv`Required + +- *Type:* [`cdk8s-plus-27.Service`](#cdk8s-plus-27.Service) + +The service object. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.ServiceIngressBackendOptions`](#cdk8s-plus-27.ServiceIngressBackendOptions) + +--- + + + +### LabeledNode + +A node that is matched by label selectors. + +#### Initializers + +```typescript +import { LabeledNode } from 'cdk8s-plus-27' + +new LabeledNode(labelSelector: NodeLabelQuery[]) +``` + +##### `labelSelector`Required + +- *Type:* [`cdk8s-plus-27.NodeLabelQuery`](#cdk8s-plus-27.NodeLabelQuery)[] + +--- + + + +#### Properties + +##### `labelSelector`Required + +```typescript +public readonly labelSelector: NodeLabelQuery[]; +``` + +- *Type:* [`cdk8s-plus-27.NodeLabelQuery`](#cdk8s-plus-27.NodeLabelQuery)[] + +--- + + +### LabelExpression + +Represents a query that can be performed against resources with labels. + + +#### Static Functions + +##### `doesNotExist` + +```typescript +import { LabelExpression } from 'cdk8s-plus-27' + +LabelExpression.doesNotExist(key: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +##### `exists` + +```typescript +import { LabelExpression } from 'cdk8s-plus-27' + +LabelExpression.exists(key: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +##### `in` + +```typescript +import { LabelExpression } from 'cdk8s-plus-27' + +LabelExpression.in(key: string, values: string[]) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `values`Required + +- *Type:* `string`[] + +--- + +##### `notIn` + +```typescript +import { LabelExpression } from 'cdk8s-plus-27' + +LabelExpression.notIn(key: string, values: string[]) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `values`Required + +- *Type:* `string`[] + +--- + +#### Properties + +##### `key`Required + +```typescript +public readonly key: string; +``` + +- *Type:* `string` + +--- + +##### `operator`Required + +```typescript +public readonly operator: string; +``` + +- *Type:* `string` + +--- + +##### `values`Optional + +```typescript +public readonly values: string[]; +``` + +- *Type:* `string`[] + +--- + + +### LabelSelector + +Match a resource by labels. + +#### Methods + +##### `isEmpty` + +```typescript +public isEmpty() +``` + +#### Static Functions + +##### `of` + +```typescript +import { LabelSelector } from 'cdk8s-plus-27' + +LabelSelector.of(options?: LabelSelectorOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.LabelSelectorOptions`](#cdk8s-plus-27.LabelSelectorOptions) + +--- + + + +### Metric + +A metric condition that HorizontalPodAutoscaler's scale on. + + +#### Static Functions + +##### `containerCpu` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.containerCpu(options: MetricContainerResourceOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricContainerResourceOptions`](#cdk8s-plus-27.MetricContainerResourceOptions) + +--- + +##### `containerEphemeralStorage` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.containerEphemeralStorage(options: MetricContainerResourceOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricContainerResourceOptions`](#cdk8s-plus-27.MetricContainerResourceOptions) + +--- + +##### `containerMemory` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.containerMemory(options: MetricContainerResourceOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricContainerResourceOptions`](#cdk8s-plus-27.MetricContainerResourceOptions) + +--- + +##### `containerStorage` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.containerStorage(options: MetricContainerResourceOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricContainerResourceOptions`](#cdk8s-plus-27.MetricContainerResourceOptions) + +--- + +##### `external` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.external(options: MetricOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricOptions`](#cdk8s-plus-27.MetricOptions) + +--- + +##### `object` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.object(options: MetricObjectOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricObjectOptions`](#cdk8s-plus-27.MetricObjectOptions) + +--- + +##### `pods` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.pods(options: MetricOptions) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.MetricOptions`](#cdk8s-plus-27.MetricOptions) + +--- + +##### `resourceCpu` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.resourceCpu(target: MetricTarget) +``` + +###### `target`Required + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +--- + +##### `resourceEphemeralStorage` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.resourceEphemeralStorage(target: MetricTarget) +``` + +###### `target`Required + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +--- + +##### `resourceMemory` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.resourceMemory(target: MetricTarget) +``` + +###### `target`Required + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +--- + +##### `resourceStorage` + +```typescript +import { Metric } from 'cdk8s-plus-27' + +Metric.resourceStorage(target: MetricTarget) +``` + +###### `target`Required + +- *Type:* [`cdk8s-plus-27.MetricTarget`](#cdk8s-plus-27.MetricTarget) + +--- + +#### Properties + +##### `type`Required + +```typescript +public readonly type: string; +``` + +- *Type:* `string` + +--- + + +### MetricTarget + +A metric condition that will trigger scaling behavior when satisfied. + + +#### Static Functions + +##### `averageUtilization` + +```typescript +import { MetricTarget } from 'cdk8s-plus-27' + +MetricTarget.averageUtilization(averageUtilization: number) +``` + +###### `averageUtilization`Required + +- *Type:* `number` + +The percentage of the utilization metric. + +e.g. `50` for 50%. + +--- + +##### `averageValue` + +```typescript +import { MetricTarget } from 'cdk8s-plus-27' + +MetricTarget.averageValue(averageValue: number) +``` + +###### `averageValue`Required + +- *Type:* `number` + +The average metric value. + +--- + +##### `value` + +```typescript +import { MetricTarget } from 'cdk8s-plus-27' + +MetricTarget.value(value: number) +``` + +###### `value`Required + +- *Type:* `number` + +The target value. + +--- + + + +### NamedNode + +A node that is matched by its name. + +#### Initializers + +```typescript +import { NamedNode } from 'cdk8s-plus-27' + +new NamedNode(name: string) +``` + +##### `name`Required + +- *Type:* `string` + +--- + + + +#### Properties + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +--- + + +### NetworkPolicyPort + +Describes a port to allow traffic on. + + +#### Static Functions + +##### `allTcp` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.allTcp() +``` + +##### `allUdp` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.allUdp() +``` + +##### `of` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.of(props: NetworkPolicyPortProps) +``` + +###### `props`Required + +- *Type:* [`cdk8s-plus-27.NetworkPolicyPortProps`](#cdk8s-plus-27.NetworkPolicyPortProps) + +--- + +##### `tcp` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.tcp(port: number) +``` + +###### `port`Required + +- *Type:* `number` + +--- + +##### `tcpRange` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.tcpRange(startPort: number, endPort: number) +``` + +###### `startPort`Required + +- *Type:* `number` + +--- + +###### `endPort`Required + +- *Type:* `number` + +--- + +##### `udp` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.udp(port: number) +``` + +###### `port`Required + +- *Type:* `number` + +--- + +##### `udpRange` + +```typescript +import { NetworkPolicyPort } from 'cdk8s-plus-27' + +NetworkPolicyPort.udpRange(startPort: number, endPort: number) +``` + +###### `startPort`Required + +- *Type:* `number` + +--- + +###### `endPort`Required + +- *Type:* `number` + +--- + + + +### Node + +Represents a node in the cluster. + +#### Initializers + +```typescript +import { Node } from 'cdk8s-plus-27' + +new Node() +``` + + +#### Static Functions + +##### `labeled` + +```typescript +import { Node } from 'cdk8s-plus-27' + +Node.labeled(labelSelector: NodeLabelQuery) +``` + +###### `labelSelector`Required + +- *Type:* [`cdk8s-plus-27.NodeLabelQuery`](#cdk8s-plus-27.NodeLabelQuery) + +--- + +##### `named` + +```typescript +import { Node } from 'cdk8s-plus-27' + +Node.named(nodeName: string) +``` + +###### `nodeName`Required + +- *Type:* `string` + +--- + +##### `tainted` + +```typescript +import { Node } from 'cdk8s-plus-27' + +Node.tainted(taintSelector: NodeTaintQuery) +``` + +###### `taintSelector`Required + +- *Type:* [`cdk8s-plus-27.NodeTaintQuery`](#cdk8s-plus-27.NodeTaintQuery) + +--- + + + +### NodeLabelQuery + +Represents a query that can be performed against nodes with labels. + + +#### Static Functions + +##### `doesNotExist` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.doesNotExist(key: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +##### `exists` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.exists(key: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +##### `gt` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.gt(key: string, values: string[]) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `values`Required + +- *Type:* `string`[] + +--- + +##### `in` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.in(key: string, values: string[]) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `values`Required + +- *Type:* `string`[] + +--- + +##### `is` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.is(key: string, value: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `value`Required + +- *Type:* `string` + +--- + +##### `lt` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.lt(key: string, values: string[]) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `values`Required + +- *Type:* `string`[] + +--- + +##### `notIn` + +```typescript +import { NodeLabelQuery } from 'cdk8s-plus-27' + +NodeLabelQuery.notIn(key: string, values: string[]) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `values`Required + +- *Type:* `string`[] + +--- + + + +### NodeTaintQuery + +Taint queries that can be perfomed against nodes. + + +#### Static Functions + +##### `any` + +```typescript +import { NodeTaintQuery } from 'cdk8s-plus-27' + +NodeTaintQuery.any() +``` + +##### `exists` + +```typescript +import { NodeTaintQuery } from 'cdk8s-plus-27' + +NodeTaintQuery.exists(key: string, options?: NodeTaintQueryOptions) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.NodeTaintQueryOptions`](#cdk8s-plus-27.NodeTaintQueryOptions) + +--- + +##### `is` + +```typescript +import { NodeTaintQuery } from 'cdk8s-plus-27' + +NodeTaintQuery.is(key: string, value: string, options?: NodeTaintQueryOptions) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +###### `value`Required + +- *Type:* `string` + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.NodeTaintQueryOptions`](#cdk8s-plus-27.NodeTaintQueryOptions) + +--- + + + +### NonApiResource + +- *Implements:* [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +Factory for creating non api resources. + +#### Methods + +##### `asApiResource` + +```typescript +public asApiResource() +``` + +##### `asNonApiResource` + +```typescript +public asNonApiResource() +``` + +#### Static Functions + +##### `of` + +```typescript +import { NonApiResource } from 'cdk8s-plus-27' + +NonApiResource.of(url: string) +``` + +###### `url`Required + +- *Type:* `string` + +--- + + + +### PercentOrAbsolute + +Union like class repsenting either a ration in percents or an absolute number. + +#### Methods + +##### `isZero` + +```typescript +public isZero() +``` + +#### Static Functions + +##### `absolute` + +```typescript +import { PercentOrAbsolute } from 'cdk8s-plus-27' + +PercentOrAbsolute.absolute(num: number) +``` + +###### `num`Required + +- *Type:* `number` + +--- + +##### `percent` + +```typescript +import { PercentOrAbsolute } from 'cdk8s-plus-27' + +PercentOrAbsolute.percent(percent: number) +``` + +###### `percent`Required + +- *Type:* `number` + +--- + +#### Properties + +##### `value`Required + +```typescript +public readonly value: any; +``` + +- *Type:* `any` + +--- + + +### PodConnections + +Controls network isolation rules for inter-pod communication. + +#### Initializers + +```typescript +import { PodConnections } from 'cdk8s-plus-27' + +new PodConnections(instance: AbstractPod) +``` + +##### `instance`Required + +- *Type:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod) + +--- + +#### Methods + +##### `allowFrom` + +```typescript +public allowFrom(peer: INetworkPolicyPeer, options?: PodConnectionsAllowFromOptions) +``` + +###### `peer`Required + +- *Type:* [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PodConnectionsAllowFromOptions`](#cdk8s-plus-27.PodConnectionsAllowFromOptions) + +--- + +##### `allowTo` + +```typescript +public allowTo(peer: INetworkPolicyPeer, options?: PodConnectionsAllowToOptions) +``` + +###### `peer`Required + +- *Type:* [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PodConnectionsAllowToOptions`](#cdk8s-plus-27.PodConnectionsAllowToOptions) + +--- + +##### `isolate` + +```typescript +public isolate() +``` + + + + +### PodDns + +Holds dns settings of the pod. + +#### Initializers + +```typescript +import { PodDns } from 'cdk8s-plus-27' + +new PodDns(props?: PodDnsProps) +``` + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.PodDnsProps`](#cdk8s-plus-27.PodDnsProps) + +--- + +#### Methods + +##### `addNameserver` + +```typescript +public addNameserver(nameservers: string) +``` + +###### `nameservers`Required + +- *Type:* `string` + +--- + +##### `addOption` + +```typescript +public addOption(options: DnsOption) +``` + +###### `options`Required + +- *Type:* [`cdk8s-plus-27.DnsOption`](#cdk8s-plus-27.DnsOption) + +--- + +##### `addSearch` + +```typescript +public addSearch(searches: string) +``` + +###### `searches`Required + +- *Type:* `string` + +--- + + +#### Properties + +##### `hostnameAsFQDN`Required + +```typescript +public readonly hostnameAsFQDN: boolean; +``` + +- *Type:* `boolean` + +Whether or not the pods hostname is set to its FQDN. + +--- + +##### `nameservers`Required + +```typescript +public readonly nameservers: string[]; +``` + +- *Type:* `string`[] + +Nameservers defined for this pod. + +--- + +##### `options`Required + +```typescript +public readonly options: DnsOption[]; +``` + +- *Type:* [`cdk8s-plus-27.DnsOption`](#cdk8s-plus-27.DnsOption)[] + +Custom dns options defined for this pod. + +--- + +##### `policy`Required + +```typescript +public readonly policy: DnsPolicy; +``` + +- *Type:* [`cdk8s-plus-27.DnsPolicy`](#cdk8s-plus-27.DnsPolicy) + +The DNS policy of this pod. + +--- + +##### `searches`Required + +```typescript +public readonly searches: string[]; +``` + +- *Type:* `string`[] + +Search domains defined for this pod. + +--- + +##### `hostname`Optional + +```typescript +public readonly hostname: string; +``` + +- *Type:* `string` + +The configured hostname of the pod. + +Undefined means its set to a system-defined value. + +--- + +##### `subdomain`Optional + +```typescript +public readonly subdomain: string; +``` + +- *Type:* `string` + +The configured subdomain of the pod. + +--- + + +### PodScheduling + +Controls the pod scheduling strategy. + +#### Initializers + +```typescript +import { PodScheduling } from 'cdk8s-plus-27' + +new PodScheduling(instance: AbstractPod) +``` + +##### `instance`Required + +- *Type:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod) + +--- + +#### Methods + +##### `assign` + +```typescript +public assign(node: NamedNode) +``` + +###### `node`Required + +- *Type:* [`cdk8s-plus-27.NamedNode`](#cdk8s-plus-27.NamedNode) + +--- + +##### `attract` + +```typescript +public attract(node: LabeledNode, options?: PodSchedulingAttractOptions) +``` + +###### `node`Required + +- *Type:* [`cdk8s-plus-27.LabeledNode`](#cdk8s-plus-27.LabeledNode) + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PodSchedulingAttractOptions`](#cdk8s-plus-27.PodSchedulingAttractOptions) + +--- + +##### `colocate` + +```typescript +public colocate(selector: IPodSelector, options?: PodSchedulingColocateOptions) +``` + +###### `selector`Required + +- *Type:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PodSchedulingColocateOptions`](#cdk8s-plus-27.PodSchedulingColocateOptions) + +--- + +##### `separate` + +```typescript +public separate(selector: IPodSelector, options?: PodSchedulingSeparateOptions) +``` + +###### `selector`Required + +- *Type:* [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.PodSchedulingSeparateOptions`](#cdk8s-plus-27.PodSchedulingSeparateOptions) + +--- + +##### `tolerate` + +```typescript +public tolerate(node: TaintedNode) +``` + +###### `node`Required + +- *Type:* [`cdk8s-plus-27.TaintedNode`](#cdk8s-plus-27.TaintedNode) + +--- + + + + +### PodSecurityContext + +Holds pod-level security attributes and common container settings. + +#### Initializers + +```typescript +import { PodSecurityContext } from 'cdk8s-plus-27' + +new PodSecurityContext(props?: PodSecurityContextProps) +``` + +##### `props`Optional + +- *Type:* [`cdk8s-plus-27.PodSecurityContextProps`](#cdk8s-plus-27.PodSecurityContextProps) + +--- + + + +#### Properties + +##### `ensureNonRoot`Required + +```typescript +public readonly ensureNonRoot: boolean; +``` + +- *Type:* `boolean` + +--- + +##### `fsGroupChangePolicy`Required + +```typescript +public readonly fsGroupChangePolicy: FsGroupChangePolicy; +``` + +- *Type:* [`cdk8s-plus-27.FsGroupChangePolicy`](#cdk8s-plus-27.FsGroupChangePolicy) + +--- + +##### `sysctls`Required + +```typescript +public readonly sysctls: Sysctl[]; +``` + +- *Type:* [`cdk8s-plus-27.Sysctl`](#cdk8s-plus-27.Sysctl)[] + +--- + +##### `fsGroup`Optional + +```typescript +public readonly fsGroup: number; +``` + +- *Type:* `number` + +--- + +##### `group`Optional + +```typescript +public readonly group: number; +``` + +- *Type:* `number` + +--- + +##### `user`Optional + +```typescript +public readonly user: number; +``` + +- *Type:* `number` + +--- + + +### Probe + +Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. + + +#### Static Functions + +##### `fromCommand` + +```typescript +import { Probe } from 'cdk8s-plus-27' + +Probe.fromCommand(command: string[], options?: CommandProbeOptions) +``` + +###### `command`Required + +- *Type:* `string`[] + +The command to execute. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.CommandProbeOptions`](#cdk8s-plus-27.CommandProbeOptions) + +Options. + +--- + +##### `fromHttpGet` + +```typescript +import { Probe } from 'cdk8s-plus-27' + +Probe.fromHttpGet(path: string, options?: HttpGetProbeOptions) +``` + +###### `path`Required + +- *Type:* `string` + +The URL path to hit. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.HttpGetProbeOptions`](#cdk8s-plus-27.HttpGetProbeOptions) + +Options. + +--- + +##### `fromTcpSocket` + +```typescript +import { Probe } from 'cdk8s-plus-27' + +Probe.fromTcpSocket(options?: TcpSocketProbeOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.TcpSocketProbeOptions`](#cdk8s-plus-27.TcpSocketProbeOptions) + +Options. + +--- + + + +### Replicas + +The amount of replicas that will change. + + +#### Static Functions + +##### `absolute` + +```typescript +import { Replicas } from 'cdk8s-plus-27' + +Replicas.absolute(value: number) +``` + +###### `value`Required + +- *Type:* `number` + +The amount of change to apply. + +Must be greater than 0. + +--- + +##### `percent` + +```typescript +import { Replicas } from 'cdk8s-plus-27' + +Replicas.percent(value: number) +``` + +###### `value`Required + +- *Type:* `number` + +The percentage of change to apply. + +Must be greater than 0. + +--- + + + +### ResourcePermissions + +Controls permissions for operations on resources. + +#### Initializers + +```typescript +import { ResourcePermissions } from 'cdk8s-plus-27' + +new ResourcePermissions(instance: Resource) +``` + +##### `instance`Required + +- *Type:* [`cdk8s-plus-27.Resource`](#cdk8s-plus-27.Resource) + +--- + +#### Methods + +##### `grantRead` + +```typescript +public grantRead(subjects: ISubject) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +--- + +##### `grantReadWrite` + +```typescript +public grantReadWrite(subjects: ISubject) +``` + +###### `subjects`Required + +- *Type:* [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +--- + + + + +### StatefulSetUpdateStrategy + +StatefulSet update strategies. + + +#### Static Functions + +##### `onDelete` + +```typescript +import { StatefulSetUpdateStrategy } from 'cdk8s-plus-27' + +StatefulSetUpdateStrategy.onDelete() +``` + +##### `rollingUpdate` + +```typescript +import { StatefulSetUpdateStrategy } from 'cdk8s-plus-27' + +StatefulSetUpdateStrategy.rollingUpdate(options?: StatefulSetUpdateStrategyRollingUpdateOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.StatefulSetUpdateStrategyRollingUpdateOptions`](#cdk8s-plus-27.StatefulSetUpdateStrategyRollingUpdateOptions) + +--- + + + +### TaintedNode + +A node that is matched by taint selectors. + +#### Initializers + +```typescript +import { TaintedNode } from 'cdk8s-plus-27' + +new TaintedNode(taintSelector: NodeTaintQuery[]) +``` + +##### `taintSelector`Required + +- *Type:* [`cdk8s-plus-27.NodeTaintQuery`](#cdk8s-plus-27.NodeTaintQuery)[] + +--- + + + +#### Properties + +##### `taintSelector`Required + +```typescript +public readonly taintSelector: NodeTaintQuery[]; +``` + +- *Type:* [`cdk8s-plus-27.NodeTaintQuery`](#cdk8s-plus-27.NodeTaintQuery)[] + +--- + + +### Topology + +Available topology domains. + + +#### Static Functions + +##### `custom` + +```typescript +import { Topology } from 'cdk8s-plus-27' + +Topology.custom(key: string) +``` + +###### `key`Required + +- *Type:* `string` + +--- + +#### Properties + +##### `key`Required + +```typescript +public readonly key: string; +``` + +- *Type:* `string` + +--- + +#### Constants + +##### `HOSTNAME` + +- *Type:* [`cdk8s-plus-27.Topology`](#cdk8s-plus-27.Topology) + +A hostname represents a single node in the cluster. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetesiohostname + +--- + +##### `REGION` + +- *Type:* [`cdk8s-plus-27.Topology`](#cdk8s-plus-27.Topology) + +A region represents a larger domain, made up of one or more zones. + +It is uncommon +for Kubernetes clusters to span multiple regions. While the exact definition of a +zone or region is left to infrastructure implementations, common properties of a region +include higher network latency between them than within them, non-zero cost for network +traffic between them, and failure independence from other zones or regions. + +For example, nodes within a region might share power infrastructure (e.g. a UPS or generator), but +nodes in different regions typically would not. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesioregion + +--- + +##### `ZONE` + +- *Type:* [`cdk8s-plus-27.Topology`](#cdk8s-plus-27.Topology) + +A zone represents a logical failure domain. + +It is common for Kubernetes clusters to +span multiple zones for increased availability. While the exact definition of a zone is +left to infrastructure implementations, common properties of a zone include very low +network latency within a zone, no-cost network traffic within a zone, and failure +independence from other zones. For example, nodes within a zone might share a network +switch, but nodes in different zones should not. + +> https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesiozone + +--- + +### WorkloadScheduling + +Controls the pod scheduling strategy of this workload. + +It offers some additional API's on top of the core pod scheduling. + +#### Initializers + +```typescript +import { WorkloadScheduling } from 'cdk8s-plus-27' + +new WorkloadScheduling(instance: AbstractPod) +``` + +##### `instance`Required + +- *Type:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod) + +--- + +#### Methods + +##### `spread` + +```typescript +public spread(options?: WorkloadSchedulingSpreadOptions) +``` + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.WorkloadSchedulingSpreadOptions`](#cdk8s-plus-27.WorkloadSchedulingSpreadOptions) + +--- + + + + +## Protocols + +### IApiEndpoint + +- *Implemented By:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod), [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource), [`cdk8s-plus-27.AwsElasticBlockStorePersistentVolume`](#cdk8s-plus-27.AwsElasticBlockStorePersistentVolume), [`cdk8s-plus-27.AzureDiskPersistentVolume`](#cdk8s-plus-27.AzureDiskPersistentVolume), [`cdk8s-plus-27.BasicAuthSecret`](#cdk8s-plus-27.BasicAuthSecret), [`cdk8s-plus-27.ClusterRole`](#cdk8s-plus-27.ClusterRole), [`cdk8s-plus-27.ClusterRoleBinding`](#cdk8s-plus-27.ClusterRoleBinding), [`cdk8s-plus-27.ConfigMap`](#cdk8s-plus-27.ConfigMap), [`cdk8s-plus-27.CronJob`](#cdk8s-plus-27.CronJob), [`cdk8s-plus-27.DaemonSet`](#cdk8s-plus-27.DaemonSet), [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.DockerConfigSecret`](#cdk8s-plus-27.DockerConfigSecret), [`cdk8s-plus-27.GCEPersistentDiskPersistentVolume`](#cdk8s-plus-27.GCEPersistentDiskPersistentVolume), [`cdk8s-plus-27.HorizontalPodAutoscaler`](#cdk8s-plus-27.HorizontalPodAutoscaler), [`cdk8s-plus-27.Ingress`](#cdk8s-plus-27.Ingress), [`cdk8s-plus-27.Job`](#cdk8s-plus-27.Job), [`cdk8s-plus-27.Namespace`](#cdk8s-plus-27.Namespace), [`cdk8s-plus-27.NetworkPolicy`](#cdk8s-plus-27.NetworkPolicy), [`cdk8s-plus-27.NonApiResource`](#cdk8s-plus-27.NonApiResource), [`cdk8s-plus-27.PersistentVolume`](#cdk8s-plus-27.PersistentVolume), [`cdk8s-plus-27.PersistentVolumeClaim`](#cdk8s-plus-27.PersistentVolumeClaim), [`cdk8s-plus-27.Pod`](#cdk8s-plus-27.Pod), [`cdk8s-plus-27.Resource`](#cdk8s-plus-27.Resource), [`cdk8s-plus-27.Role`](#cdk8s-plus-27.Role), [`cdk8s-plus-27.RoleBinding`](#cdk8s-plus-27.RoleBinding), [`cdk8s-plus-27.Secret`](#cdk8s-plus-27.Secret), [`cdk8s-plus-27.Service`](#cdk8s-plus-27.Service), [`cdk8s-plus-27.ServiceAccount`](#cdk8s-plus-27.ServiceAccount), [`cdk8s-plus-27.ServiceAccountTokenSecret`](#cdk8s-plus-27.ServiceAccountTokenSecret), [`cdk8s-plus-27.SshAuthSecret`](#cdk8s-plus-27.SshAuthSecret), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.TlsSecret`](#cdk8s-plus-27.TlsSecret), [`cdk8s-plus-27.Workload`](#cdk8s-plus-27.Workload), [`cdk8s-plus-27.IApiEndpoint`](#cdk8s-plus-27.IApiEndpoint) + +An API Endpoint can either be a resource descriptor (e.g /pods) or a non resource url (e.g /healthz). It must be one or the other, and not both. + +#### Methods + +##### `asApiResource` + +```typescript +public asApiResource() +``` + +##### `asNonApiResource` + +```typescript +public asNonApiResource() +``` + + +### IApiResource + +- *Implemented By:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod), [`cdk8s-plus-27.ApiResource`](#cdk8s-plus-27.ApiResource), [`cdk8s-plus-27.AwsElasticBlockStorePersistentVolume`](#cdk8s-plus-27.AwsElasticBlockStorePersistentVolume), [`cdk8s-plus-27.AzureDiskPersistentVolume`](#cdk8s-plus-27.AzureDiskPersistentVolume), [`cdk8s-plus-27.BasicAuthSecret`](#cdk8s-plus-27.BasicAuthSecret), [`cdk8s-plus-27.ClusterRole`](#cdk8s-plus-27.ClusterRole), [`cdk8s-plus-27.ClusterRoleBinding`](#cdk8s-plus-27.ClusterRoleBinding), [`cdk8s-plus-27.ConfigMap`](#cdk8s-plus-27.ConfigMap), [`cdk8s-plus-27.CronJob`](#cdk8s-plus-27.CronJob), [`cdk8s-plus-27.DaemonSet`](#cdk8s-plus-27.DaemonSet), [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.DockerConfigSecret`](#cdk8s-plus-27.DockerConfigSecret), [`cdk8s-plus-27.GCEPersistentDiskPersistentVolume`](#cdk8s-plus-27.GCEPersistentDiskPersistentVolume), [`cdk8s-plus-27.HorizontalPodAutoscaler`](#cdk8s-plus-27.HorizontalPodAutoscaler), [`cdk8s-plus-27.Ingress`](#cdk8s-plus-27.Ingress), [`cdk8s-plus-27.Job`](#cdk8s-plus-27.Job), [`cdk8s-plus-27.Namespace`](#cdk8s-plus-27.Namespace), [`cdk8s-plus-27.NetworkPolicy`](#cdk8s-plus-27.NetworkPolicy), [`cdk8s-plus-27.PersistentVolume`](#cdk8s-plus-27.PersistentVolume), [`cdk8s-plus-27.PersistentVolumeClaim`](#cdk8s-plus-27.PersistentVolumeClaim), [`cdk8s-plus-27.Pod`](#cdk8s-plus-27.Pod), [`cdk8s-plus-27.Resource`](#cdk8s-plus-27.Resource), [`cdk8s-plus-27.Role`](#cdk8s-plus-27.Role), [`cdk8s-plus-27.RoleBinding`](#cdk8s-plus-27.RoleBinding), [`cdk8s-plus-27.Secret`](#cdk8s-plus-27.Secret), [`cdk8s-plus-27.Service`](#cdk8s-plus-27.Service), [`cdk8s-plus-27.ServiceAccount`](#cdk8s-plus-27.ServiceAccount), [`cdk8s-plus-27.ServiceAccountTokenSecret`](#cdk8s-plus-27.ServiceAccountTokenSecret), [`cdk8s-plus-27.SshAuthSecret`](#cdk8s-plus-27.SshAuthSecret), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.TlsSecret`](#cdk8s-plus-27.TlsSecret), [`cdk8s-plus-27.Workload`](#cdk8s-plus-27.Workload), [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource), [`cdk8s-plus-27.IClusterRole`](#cdk8s-plus-27.IClusterRole), [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap), [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume), [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim), [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource), [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole), [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret), [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) + +Represents a resource or collection of resources. + + +#### Properties + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +### IClusterRole + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +- *Implemented By:* [`cdk8s-plus-27.ClusterRole`](#cdk8s-plus-27.ClusterRole), [`cdk8s-plus-27.IClusterRole`](#cdk8s-plus-27.IClusterRole) + +Represents a cluster-level role. + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IConfigMap + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +- *Implemented By:* [`cdk8s-plus-27.ConfigMap`](#cdk8s-plus-27.ConfigMap), [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap) + +Represents a config map. + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### INamespaceSelector + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s-plus-27.Namespace`](#cdk8s-plus-27.Namespace), [`cdk8s-plus-27.Namespaces`](#cdk8s-plus-27.Namespaces), [`cdk8s-plus-27.INamespaceSelector`](#cdk8s-plus-27.INamespaceSelector) + +Represents an object that can select namespaces. + +#### Methods + +##### `toNamespaceSelectorConfig` + +```typescript +public toNamespaceSelectorConfig() +``` + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### INetworkPolicyPeer + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod), [`cdk8s-plus-27.CronJob`](#cdk8s-plus-27.CronJob), [`cdk8s-plus-27.DaemonSet`](#cdk8s-plus-27.DaemonSet), [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.Job`](#cdk8s-plus-27.Job), [`cdk8s-plus-27.Namespace`](#cdk8s-plus-27.Namespace), [`cdk8s-plus-27.Namespaces`](#cdk8s-plus-27.Namespaces), [`cdk8s-plus-27.NetworkPolicyIpBlock`](#cdk8s-plus-27.NetworkPolicyIpBlock), [`cdk8s-plus-27.Pod`](#cdk8s-plus-27.Pod), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.Workload`](#cdk8s-plus-27.Workload), [`cdk8s-plus-27.INetworkPolicyPeer`](#cdk8s-plus-27.INetworkPolicyPeer) + +Describes a peer to allow traffic to/from. + +#### Methods + +##### `toNetworkPolicyPeerConfig` + +```typescript +public toNetworkPolicyPeerConfig() +``` + +##### `toPodSelector` + +```typescript +public toPodSelector() +``` + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### IPersistentVolume + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +- *Implemented By:* [`cdk8s-plus-27.AwsElasticBlockStorePersistentVolume`](#cdk8s-plus-27.AwsElasticBlockStorePersistentVolume), [`cdk8s-plus-27.AzureDiskPersistentVolume`](#cdk8s-plus-27.AzureDiskPersistentVolume), [`cdk8s-plus-27.GCEPersistentDiskPersistentVolume`](#cdk8s-plus-27.GCEPersistentDiskPersistentVolume), [`cdk8s-plus-27.PersistentVolume`](#cdk8s-plus-27.PersistentVolume), [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume) + +Contract of a `PersistentVolumeClaim`. + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IPersistentVolumeClaim + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +- *Implemented By:* [`cdk8s-plus-27.PersistentVolumeClaim`](#cdk8s-plus-27.PersistentVolumeClaim), [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim) + +Contract of a `PersistentVolumeClaim`. + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IPodSelector + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod), [`cdk8s-plus-27.CronJob`](#cdk8s-plus-27.CronJob), [`cdk8s-plus-27.DaemonSet`](#cdk8s-plus-27.DaemonSet), [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.Job`](#cdk8s-plus-27.Job), [`cdk8s-plus-27.Pod`](#cdk8s-plus-27.Pod), [`cdk8s-plus-27.Pods`](#cdk8s-plus-27.Pods), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.Workload`](#cdk8s-plus-27.Workload), [`cdk8s-plus-27.IPodSelector`](#cdk8s-plus-27.IPodSelector) + +Represents an object that can select pods. + +#### Methods + +##### `toPodSelectorConfig` + +```typescript +public toPodSelectorConfig() +``` + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### IResource + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct), [`cdk8s-plus-27.IApiResource`](#cdk8s-plus-27.IApiResource) + +- *Implemented By:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod), [`cdk8s-plus-27.AwsElasticBlockStorePersistentVolume`](#cdk8s-plus-27.AwsElasticBlockStorePersistentVolume), [`cdk8s-plus-27.AzureDiskPersistentVolume`](#cdk8s-plus-27.AzureDiskPersistentVolume), [`cdk8s-plus-27.BasicAuthSecret`](#cdk8s-plus-27.BasicAuthSecret), [`cdk8s-plus-27.ClusterRole`](#cdk8s-plus-27.ClusterRole), [`cdk8s-plus-27.ClusterRoleBinding`](#cdk8s-plus-27.ClusterRoleBinding), [`cdk8s-plus-27.ConfigMap`](#cdk8s-plus-27.ConfigMap), [`cdk8s-plus-27.CronJob`](#cdk8s-plus-27.CronJob), [`cdk8s-plus-27.DaemonSet`](#cdk8s-plus-27.DaemonSet), [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.DockerConfigSecret`](#cdk8s-plus-27.DockerConfigSecret), [`cdk8s-plus-27.GCEPersistentDiskPersistentVolume`](#cdk8s-plus-27.GCEPersistentDiskPersistentVolume), [`cdk8s-plus-27.HorizontalPodAutoscaler`](#cdk8s-plus-27.HorizontalPodAutoscaler), [`cdk8s-plus-27.Ingress`](#cdk8s-plus-27.Ingress), [`cdk8s-plus-27.Job`](#cdk8s-plus-27.Job), [`cdk8s-plus-27.Namespace`](#cdk8s-plus-27.Namespace), [`cdk8s-plus-27.NetworkPolicy`](#cdk8s-plus-27.NetworkPolicy), [`cdk8s-plus-27.PersistentVolume`](#cdk8s-plus-27.PersistentVolume), [`cdk8s-plus-27.PersistentVolumeClaim`](#cdk8s-plus-27.PersistentVolumeClaim), [`cdk8s-plus-27.Pod`](#cdk8s-plus-27.Pod), [`cdk8s-plus-27.Resource`](#cdk8s-plus-27.Resource), [`cdk8s-plus-27.Role`](#cdk8s-plus-27.Role), [`cdk8s-plus-27.RoleBinding`](#cdk8s-plus-27.RoleBinding), [`cdk8s-plus-27.Secret`](#cdk8s-plus-27.Secret), [`cdk8s-plus-27.Service`](#cdk8s-plus-27.Service), [`cdk8s-plus-27.ServiceAccount`](#cdk8s-plus-27.ServiceAccount), [`cdk8s-plus-27.ServiceAccountTokenSecret`](#cdk8s-plus-27.ServiceAccountTokenSecret), [`cdk8s-plus-27.SshAuthSecret`](#cdk8s-plus-27.SshAuthSecret), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.TlsSecret`](#cdk8s-plus-27.TlsSecret), [`cdk8s-plus-27.Workload`](#cdk8s-plus-27.Workload), [`cdk8s-plus-27.IClusterRole`](#cdk8s-plus-27.IClusterRole), [`cdk8s-plus-27.IConfigMap`](#cdk8s-plus-27.IConfigMap), [`cdk8s-plus-27.IPersistentVolume`](#cdk8s-plus-27.IPersistentVolume), [`cdk8s-plus-27.IPersistentVolumeClaim`](#cdk8s-plus-27.IPersistentVolumeClaim), [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource), [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole), [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret), [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) + +Represents a resource. + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IRole + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +- *Implemented By:* [`cdk8s-plus-27.ClusterRole`](#cdk8s-plus-27.ClusterRole), [`cdk8s-plus-27.Role`](#cdk8s-plus-27.Role), [`cdk8s-plus-27.IRole`](#cdk8s-plus-27.IRole) + +A reference to any Role or ClusterRole. + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IScalable + +- *Implemented By:* [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.IScalable`](#cdk8s-plus-27.IScalable) + +Represents a scalable workload. + +#### Methods + +##### `markHasAutoscaler` + +```typescript +public markHasAutoscaler() +``` + +##### `toScalingTarget` + +```typescript +public toScalingTarget() +``` + +#### Properties + +##### `hasAutoscaler`Required + +```typescript +public readonly hasAutoscaler: boolean; +``` + +- *Type:* `boolean` + +If this is a target of an autoscaler. + +--- + +### ISecret + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource) + +- *Implemented By:* [`cdk8s-plus-27.BasicAuthSecret`](#cdk8s-plus-27.BasicAuthSecret), [`cdk8s-plus-27.DockerConfigSecret`](#cdk8s-plus-27.DockerConfigSecret), [`cdk8s-plus-27.Secret`](#cdk8s-plus-27.Secret), [`cdk8s-plus-27.ServiceAccountTokenSecret`](#cdk8s-plus-27.ServiceAccountTokenSecret), [`cdk8s-plus-27.SshAuthSecret`](#cdk8s-plus-27.SshAuthSecret), [`cdk8s-plus-27.TlsSecret`](#cdk8s-plus-27.TlsSecret), [`cdk8s-plus-27.ISecret`](#cdk8s-plus-27.ISecret) + +#### Methods + +##### `envValue` + +```typescript +public envValue(key: string, options?: EnvValueFromSecretOptions) +``` + +###### `key`Required + +- *Type:* `string` + +Secret's key. + +--- + +###### `options`Optional + +- *Type:* [`cdk8s-plus-27.EnvValueFromSecretOptions`](#cdk8s-plus-27.EnvValueFromSecretOptions) + +Additional EnvValue options. + +--- + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IServiceAccount + +- *Extends:* [`cdk8s-plus-27.IResource`](#cdk8s-plus-27.IResource), [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +- *Implemented By:* [`cdk8s-plus-27.ServiceAccount`](#cdk8s-plus-27.ServiceAccount), [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount) + + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +##### `apiGroup`Required + +```typescript +public readonly apiGroup: string; +``` + +- *Type:* `string` + +The group portion of the API version (e.g. `authorization.k8s.io`). + +--- + +##### `resourceType`Required + +```typescript +public readonly resourceType: string; +``` + +- *Type:* `string` + +The name of a resource type as it appears in the relevant API endpoint. + +> https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources + +--- + +##### `resourceName`Optional + +```typescript +public readonly resourceName: string; +``` + +- *Type:* `string` + +The unique, namespace-global, name of an object inside the Kubernetes cluster. + +If this is omitted, the ApiResource should represent all objects of the given type. + +--- + +##### `apiVersion`Required + +```typescript +public readonly apiVersion: string; +``` + +- *Type:* `string` + +The object's API version (e.g. "authorization.k8s.io/v1"). + +--- + +##### `kind`Required + +```typescript +public readonly kind: string; +``` + +- *Type:* `string` + +The object kind (e.g. "Deployment"). + +--- + +##### `name`Required + +```typescript +public readonly name: string; +``` + +- *Type:* `string` + +The Kubernetes name of this resource. + +--- + +### IStorage + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s-plus-27.AwsElasticBlockStorePersistentVolume`](#cdk8s-plus-27.AwsElasticBlockStorePersistentVolume), [`cdk8s-plus-27.AzureDiskPersistentVolume`](#cdk8s-plus-27.AzureDiskPersistentVolume), [`cdk8s-plus-27.GCEPersistentDiskPersistentVolume`](#cdk8s-plus-27.GCEPersistentDiskPersistentVolume), [`cdk8s-plus-27.PersistentVolume`](#cdk8s-plus-27.PersistentVolume), [`cdk8s-plus-27.Volume`](#cdk8s-plus-27.Volume), [`cdk8s-plus-27.IStorage`](#cdk8s-plus-27.IStorage) + +Represents a piece of storage in the cluster. + +#### Methods + +##### `asVolume` + +```typescript +public asVolume() +``` + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +### ISubject + +- *Extends:* [`constructs.IConstruct`](#constructs.IConstruct) + +- *Implemented By:* [`cdk8s-plus-27.AbstractPod`](#cdk8s-plus-27.AbstractPod), [`cdk8s-plus-27.CronJob`](#cdk8s-plus-27.CronJob), [`cdk8s-plus-27.DaemonSet`](#cdk8s-plus-27.DaemonSet), [`cdk8s-plus-27.Deployment`](#cdk8s-plus-27.Deployment), [`cdk8s-plus-27.Group`](#cdk8s-plus-27.Group), [`cdk8s-plus-27.Job`](#cdk8s-plus-27.Job), [`cdk8s-plus-27.Pod`](#cdk8s-plus-27.Pod), [`cdk8s-plus-27.ServiceAccount`](#cdk8s-plus-27.ServiceAccount), [`cdk8s-plus-27.StatefulSet`](#cdk8s-plus-27.StatefulSet), [`cdk8s-plus-27.User`](#cdk8s-plus-27.User), [`cdk8s-plus-27.Workload`](#cdk8s-plus-27.Workload), [`cdk8s-plus-27.IServiceAccount`](#cdk8s-plus-27.IServiceAccount), [`cdk8s-plus-27.ISubject`](#cdk8s-plus-27.ISubject) + +Represents an object that can be used as a role binding subject. + +#### Methods + +##### `toSubjectConfiguration` + +```typescript +public toSubjectConfiguration() +``` + +#### Properties + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* [`constructs.Node`](#constructs.Node) + +The tree node. + +--- + +## Enums + +### AzureDiskPersistentVolumeCachingMode + +Azure disk caching modes. + +#### `NONE` + +None. + +--- + + +#### `READ_ONLY` + +ReadOnly. + +--- + + +#### `READ_WRITE` + +ReadWrite. + +--- + + +### AzureDiskPersistentVolumeKind + +Azure Disk kinds. + +#### `SHARED` + +Multiple blob disks per storage account. + +--- + + +#### `DEDICATED` + +Single blob disk per storage account. + +--- + + +#### `MANAGED` + +Azure managed data disk. + +--- + + +### ConcurrencyPolicy + +Concurrency policy for CronJobs. + +#### `ALLOW` + +This policy allows to run job concurrently. + +--- + + +#### `FORBID` + +This policy does not allow to run job concurrently. + +It does not let a new job to be scheduled if the previous one is not finished yet. + +--- + + +#### `REPLACE` + +This policy replaces the currently running job if a new job is being scheduled. + +--- + + +### ConnectionScheme + +#### `HTTP` + +Use HTTP request for connecting to host. + +--- + + +#### `HTTPS` + +Use HTTPS request for connecting to host. + +--- + + +### DnsPolicy + +Pod DNS policies. + +#### `CLUSTER_FIRST` + +Any DNS query that does not match the configured cluster domain suffix, such as "www.kubernetes.io", is forwarded to the upstream nameserver inherited from the node. Cluster administrators may have extra stub-domain and upstream DNS servers configured. + +--- + + +#### `CLUSTER_FIRST_WITH_HOST_NET` + +For Pods running with hostNetwork, you should explicitly set its DNS policy "ClusterFirstWithHostNet". + +--- + + +#### `DEFAULT` + +The Pod inherits the name resolution configuration from the node that the pods run on. + +--- + + +#### `NONE` + +It allows a Pod to ignore DNS settings from the Kubernetes environment. + +All DNS settings are supposed to be provided using the dnsConfig +field in the Pod Spec. + +--- + + +### EmptyDirMedium + +The medium on which to store the volume. + +#### `DEFAULT` + +The default volume of the backing node. + +--- + + +#### `MEMORY` + +Mount a tmpfs (RAM-backed filesystem) for you instead. + +While tmpfs is very +fast, be aware that unlike disks, tmpfs is cleared on node reboot and any +files you write will count against your Container's memory limit. + +--- + + +### EnvFieldPaths + +#### `POD_NAME` + +The name of the pod. + +--- + + +#### `POD_NAMESPACE` + +The namespace of the pod. + +--- + + +#### `POD_UID` + +The uid of the pod. + +--- + + +#### `POD_LABEL` + +The labels of the pod. + +--- + + +#### `POD_ANNOTATION` + +The annotations of the pod. + +--- + + +#### `POD_IP` + +The ipAddress of the pod. + +--- + + +#### `SERVICE_ACCOUNT_NAME` + +The service account name of the pod. + +--- + + +#### `NODE_NAME` + +The name of the node. + +--- + + +#### `NODE_IP` + +The ipAddress of the node. + +--- + + +#### `POD_IPS` + +The ipAddresess of the pod. + +--- + + +### FsGroupChangePolicy + +#### `ON_ROOT_MISMATCH` + +Only change permissions and ownership if permission and ownership of root directory does not match with expected permissions of the volume. + +This could help shorten the time it takes to change ownership and permission of a volume + +--- + + +#### `ALWAYS` + +Always change permission and ownership of the volume when volume is mounted. + +--- + + +### HostPathVolumeType + +Host path types. + +#### `DEFAULT` + +Empty string (default) is for backward compatibility, which means that no checks will be performed before mounting the hostPath volume. + +--- + + +#### `DIRECTORY_OR_CREATE` + +If nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Kubelet. + +--- + + +#### `DIRECTORY` + +A directory must exist at the given path. + +--- + + +#### `FILE_OR_CREATE` + +If nothing exists at the given path, an empty file will be created there as needed with permission set to 0644, having the same group and ownership with Kubelet. + +--- + + +#### `FILE` + +A file must exist at the given path. + +--- + + +#### `SOCKET` + +A UNIX socket must exist at the given path. + +--- + + +#### `CHAR_DEVICE` + +A character device must exist at the given path. + +--- + + +#### `BLOCK_DEVICE` + +A block device must exist at the given path. + +--- + + +### HttpIngressPathType + +Specify how the path is matched against request paths. + +> https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types + +#### `PREFIX` + +Matches the URL path exactly. + +--- + + +#### `EXACT` + +Matches based on a URL path prefix split by '/'. + +--- + + +#### `IMPLEMENTATION_SPECIFIC` + +Matching is specified by the underlying IngressClass. + +--- + + +### ImagePullPolicy + +#### `ALWAYS` + +Every time the kubelet launches a container, the kubelet queries the container image registry to resolve the name to an image digest. + +If the kubelet has a container image with that exact +digest cached locally, the kubelet uses its cached image; otherwise, the kubelet downloads +(pulls) the image with the resolved digest, and uses that image to launch the container. + +Default is Always if ImagePullPolicy is omitted and either the image tag is :latest or +the image tag is omitted. + +--- + + +#### `IF_NOT_PRESENT` + +The image is pulled only if it is not already present locally. + +Default is IfNotPresent if ImagePullPolicy is omitted and the image tag is present but +not :latest + +--- + + +#### `NEVER` + +The image is assumed to exist locally. + +No attempt is made to pull the image. + +--- + + +### MountPropagation + +#### `NONE` + +This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host. + +In similar +fashion, no mounts created by the Container will be visible on the host. + +This is the default mode. + +This mode is equal to `private` mount propagation as described in the Linux +kernel documentation + +--- + + +#### `HOST_TO_CONTAINER` + +This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories. + +In other words, if the host mounts anything inside the volume mount, the +Container will see it mounted there. + +Similarly, if any Pod with Bidirectional mount propagation to the same +volume mounts anything there, the Container with HostToContainer mount +propagation will see it. + +This mode is equal to `rslave` mount propagation as described in the Linux +kernel documentation + +--- + + +#### `BIDIRECTIONAL` + +This volume mount behaves the same the HostToContainer mount. + +In addition, +all volume mounts created by the Container will be propagated back to the +host and to all Containers of all Pods that use the same volume + +A typical use case for this mode is a Pod with a FlexVolume or CSI driver +or a Pod that needs to mount something on the host using a hostPath volume. + +This mode is equal to `rshared` mount propagation as described in the Linux +kernel documentation + +Caution: Bidirectional mount propagation can be dangerous. It can damage +the host operating system and therefore it is allowed only in privileged +Containers. Familiarity with Linux kernel behavior is strongly recommended. +In addition, any volume mounts created by Containers in Pods must be +destroyed (unmounted) by the Containers on termination. + +--- + + +### NetworkPolicyTrafficDefault + +Default behaviors of network traffic in policies. + +#### `DENY` + +The policy denies all traffic. + +Since rules are additive, additional rules or policies can allow +specific traffic. + +--- + + +#### `ALLOW` + +The policy allows all traffic (either ingress or egress). + +Since rules are additive, no additional rule or policies can +subsequently deny the traffic. + +--- + + +### NetworkProtocol + +Network protocols. + +#### `TCP` + +TCP. + +--- + + +#### `UDP` + +UDP. + +--- + + +#### `SCTP` + +SCTP. + +--- + + +### PersistentVolumeAccessMode + +Access Modes. + +#### `READ_WRITE_ONCE` + +The volume can be mounted as read-write by a single node. + +ReadWriteOnce access mode still can allow multiple pods to access +the volume when the pods are running on the same node. + +--- + + +#### `READ_ONLY_MANY` + +The volume can be mounted as read-only by many nodes. + +--- + + +#### `READ_WRITE_MANY` + +The volume can be mounted as read-write by many nodes. + +--- + + +#### `READ_WRITE_ONCE_POD` + +The volume can be mounted as read-write by a single Pod. + +Use ReadWriteOncePod access mode if you want to ensure that +only one pod across whole cluster can read that PVC or write to it. +This is only supported for CSI volumes and Kubernetes version 1.22+. + +--- + + +### PersistentVolumeMode + +Volume Modes. + +#### `FILE_SYSTEM` + +Volume is ounted into Pods into a directory. + +If the volume is backed by a block device and the device is empty, +Kubernetes creates a filesystem on the device before mounting it +for the first time. + +--- + + +#### `BLOCK` + +Use a volume as a raw block device. + +Such volume is presented into a Pod as a block device, +without any filesystem on it. This mode is useful to provide a Pod the fastest possible way +to access a volume, without any filesystem layer between the Pod +and the volume. On the other hand, the application running in +the Pod must know how to handle a raw block device + +--- + + +### PersistentVolumeReclaimPolicy + +Reclaim Policies. + +#### `RETAIN` + +The Retain reclaim policy allows for manual reclamation of the resource. + +When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the +volume is considered "released". But it is not yet available for another claim +because the previous claimant's data remains on the volume. +An administrator can manually reclaim the volume with the following steps: + +1. Delete the PersistentVolume. The associated storage asset in external + infrastructure (such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume) still exists after the PV is deleted. +2. Manually clean up the data on the associated storage asset accordingly. +3. Manually delete the associated storage asset. + +If you want to reuse the same storage asset, create a new PersistentVolume +with the same storage asset definition. + +--- + + +#### `DELETE` + +For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure, such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume. + +Volumes that were dynamically provisioned inherit the reclaim policy of their StorageClass, which defaults to Delete. +The administrator should configure the StorageClass according to users' expectations; otherwise, +the PV must be edited or patched after it is created + +--- + + +### PodConnectionsIsolation + +Isolation determines which policies are created when allowing connections from a a pod / workload to peers. + +#### `POD` + +Only creates network policies that select the pod. + +--- + + +#### `PEER` + +Only creates network policies that select the peer. + +--- + + +### PodManagementPolicy + +Controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. + +The default policy is `OrderedReady`, where pods are created in increasing order +(pod-0, then pod-1, etc) and the controller will wait until each pod is ready before +continuing. When scaling down, the pods are removed in the opposite order. + +The alternative policy is `Parallel` which will create pods in parallel to match the +desired scale without waiting, and on scale down will delete all pods at once. + +#### `ORDERED_READY` + +--- + + +#### `PARALLEL` + +--- + + +### Protocol + +Network protocols. + +#### `TCP` + +TCP. + +--- + + +#### `UDP` + +UDP. + +--- + + +#### `SCTP` + +SCTP. + +--- + + +### ResourceFieldPaths + +#### `CPU_LIMIT` + +CPU limit of the container. + +--- + + +#### `MEMORY_LIMIT` + +Memory limit of the container. + +--- + + +#### `CPU_REQUEST` + +CPU request of the container. + +--- + + +#### `MEMORY_REQUEST` + +Memory request of the container. + +--- + + +#### `STORAGE_LIMIT` + +Ephemeral storage limit of the container. + +--- + + +#### `STORAGE_REQUEST` + +Ephemeral storage request of the container. + +--- + + +### RestartPolicy + +Restart policy for all containers within the pod. + +#### `ALWAYS` + +Always restart the pod after it exits. + +--- + + +#### `ON_FAILURE` + +Only restart if the pod exits with a non-zero exit code. + +--- + + +#### `NEVER` + +Never restart the pod. + +--- + + +### ScalingStrategy + +#### `MAX_CHANGE` + +Use the policy that provisions the most changes. + +--- + + +#### `MIN_CHANGE` + +Use the policy that provisions the least amount of changes. + +--- + + +#### ~~`DISABLED`~~ + +- *Deprecated:* - Omit the ScalingRule instead + +Disables scaling in this direction. + +--- + + +### ServiceType + +For some parts of your application (for example, frontends) you may want to expose a Service onto an external IP address, that's outside of your cluster. + +Kubernetes ServiceTypes allow you to specify what kind of Service you want. +The default is ClusterIP. + +#### `CLUSTER_IP` + +Exposes the Service on a cluster-internal IP. + +Choosing this value makes the Service only reachable from within the cluster. +This is the default ServiceType + +--- + + +#### `NODE_PORT` + +Exposes the Service on each Node's IP at a static port (the NodePort). + +A ClusterIP Service, to which the NodePort Service routes, is automatically created. +You'll be able to contact the NodePort Service, from outside the cluster, +by requesting :. + +--- + + +#### `LOAD_BALANCER` + +Exposes the Service externally using a cloud provider's load balancer. + +NodePort and ClusterIP Services, to which the external load balancer routes, +are automatically created. + +--- + + +#### `EXTERNAL_NAME` + +Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up. + +> Note: You need either kube-dns version 1.7 or CoreDNS version 0.0.8 or higher to use the ExternalName type. + +--- + + +### TaintEffect + +Taint effects. + +#### `NO_SCHEDULE` + +This means that no pod will be able to schedule onto the node unless it has a matching toleration. + +--- + + +#### `PREFER_NO_SCHEDULE` + +This is a "preference" or "soft" version of `NO_SCHEDULE` -- the system will try to avoid placing a pod that does not tolerate the taint on the node, but it is not required. + +--- + + +#### `NO_EXECUTE` + +This affects pods that are already running on the node as follows:. + +Pods that do not tolerate the taint are evicted immediately. +- Pods that tolerate the taint without specifying `duration` remain bound forever. +- Pods that tolerate the taint with a specified `duration` remain bound for + the specified amount of time. + +--- + diff --git a/docs/reference/cdk8s-plus-30/.pages b/docs/reference/cdk8s-plus-30/.pages new file mode 100644 index 0000000000..ecb0fdb885 --- /dev/null +++ b/docs/reference/cdk8s-plus-30/.pages @@ -0,0 +1,5 @@ +nav: +- TypeScript: typescript.md +- Python: python.md +- Java: java.md +- Go: go.md \ No newline at end of file diff --git a/docs/reference/cdk8s-plus-30/go.md b/docs/reference/cdk8s-plus-30/go.md new file mode 100644 index 0000000000..77b0e5fa09 --- /dev/null +++ b/docs/reference/cdk8s-plus-30/go.md @@ -0,0 +1,3 @@ +# cdk8s-plus-30 (Go) + +For Go API reference, please visit . \ No newline at end of file diff --git a/docs/reference/index.md b/docs/reference/index.md index 168a0df590..06169ce367 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -5,30 +5,30 @@ This section includes API reference for the various components of cdk8s. === "TypeScript" * [**cdk8s**](./cdk8s/typescript.md) - * [**cdk8s-plus-27**](./cdk8s-plus-27/typescript.md) · Kubernetes v1.27.0 * [**cdk8s-plus-28**](./cdk8s-plus-28/typescript.md) · Kubernetes v1.28.0 * [**cdk8s-plus-29**](./cdk8s-plus-29/typescript.md) · Kubernetes v1.29.0 + * [**cdk8s-plus-30**](./cdk8s-plus-30/typescript.md) · Kubernetes v1.30.0 === "Python" * [**cdk8s**](./cdk8s/python.md) - * [**cdk8s-plus-27**](./cdk8s-plus-27/python.md) · Kubernetes v1.27.0 * [**cdk8s-plus-28**](./cdk8s-plus-28/python.md) · Kubernetes v1.28.0 * [**cdk8s-plus-29**](./cdk8s-plus-29/python.md) · Kubernetes v1.29.0 + * [**cdk8s-plus-30**](./cdk8s-plus-30/python.md) · Kubernetes v1.30.0 === "Java" * [**cdk8s**](./cdk8s/java.md) - * [**cdk8s-plus-27**](./cdk8s-plus-27/java.md) · Kubernetes v1.27.0 * [**cdk8s-plus-28**](./cdk8s-plus-28/java.md) · Kubernetes v1.28.0 * [**cdk8s-plus-29**](./cdk8s-plus-29/java.md) · Kubernetes v1.29.0 + * [**cdk8s-plus-30**](./cdk8s-plus-30/java.md) · Kubernetes v1.30.0 === "Go" * [**cdk8s**](./cdk8s/go.md) - * [**cdk8s-plus-27**](./cdk8s-plus-27/go.md) · Kubernetes v1.27.0 * [**cdk8s-plus-28**](./cdk8s-plus-28/go.md) · Kubernetes v1.28.0 * [**cdk8s-plus-29**](./cdk8s-plus-29/go.md) · Kubernetes v1.29.0 + * [**cdk8s-plus-30**](./cdk8s-plus-30/go.md) · Kubernetes v1.30.0 !!! info diff --git a/package.json b/package.json index af11f51762..52ecbe817c 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,9 @@ "@typescript-eslint/parser": "^6", "cdk8s": "^2.68.74", "cdk8s-cli": "^2.198.137", - "cdk8s-plus-27": "^2.9.5", "cdk8s-plus-28": "^2.3.5", "cdk8s-plus-29": "^2.3.6", + "cdk8s-plus-30": "^2.0.0", "constructs": "^10.0.0", "eslint": "^8", "eslint-import-resolver-typescript": "^3.6.1", diff --git a/src/latest-k8s-version.txt b/src/latest-k8s-version.txt index d99e90eb96..8580e7b684 100644 --- a/src/latest-k8s-version.txt +++ b/src/latest-k8s-version.txt @@ -1 +1 @@ -29 \ No newline at end of file +30 \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index f83466124a..4ddaf925d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2204,15 +2204,6 @@ cdk8s-plus-25@^2.22.79: optionalDependencies: backport "8.5.0" -cdk8s-plus-27@^2.9.5: - version "2.9.5" - resolved "https://registry.yarnpkg.com/cdk8s-plus-27/-/cdk8s-plus-27-2.9.5.tgz#a2d7942a7aba001c0a07705627314d780cde7265" - integrity sha512-vZtq6BHIi3wFdzxd8LFmKiWIb3sFjV9kFpJ3bN2sOZiQYHoirN0UUlB04n2YMA7u97wJZPc521ZJGUyDBUhupQ== - dependencies: - minimatch "^3.1.2" - optionalDependencies: - backport "8.5.0" - cdk8s-plus-28@^2.3.5: version "2.3.5" resolved "https://registry.yarnpkg.com/cdk8s-plus-28/-/cdk8s-plus-28-2.3.5.tgz#f3f96127c6b3c154fefddaf3ef184cba930842ba" @@ -2231,6 +2222,15 @@ cdk8s-plus-29@^2.3.6: optionalDependencies: backport "8.5.0" +cdk8s-plus-30@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/cdk8s-plus-30/-/cdk8s-plus-30-2.0.0.tgz#65fd203f41bd0f919db1c5ca1e421e5602bbb35c" + integrity sha512-SmvZs6ZyqeABkbUlLeIejHfFjFmOfv5/RZsls0fyNj04fGFeyRSxOfY9ESDU4RHGyCtmhgJUmVz+Q+PgeoxxnA== + dependencies: + minimatch "^3.1.2" + optionalDependencies: + backport "8.5.0" + cdk8s@^2.68.73, cdk8s@^2.68.74: version "2.68.74" resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-2.68.74.tgz#5ed162393011f13907693196ce59bb788b191a3d" @@ -7320,16 +7320,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7402,14 +7393,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -8172,7 +8156,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -8190,15 +8174,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"