Package org.cdk8s.plus20
Class Pod
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus20.Resource
-
- org.cdk8s.plus20.Pod
-
- All Implemented Interfaces:
IPodSpec,IResource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-26T09:02:10.529Z") @Stability(Stable) public class Pod extends Resource implements IPodSpec
Pod is a collection of containers that can run on a host.This resource is created by clients and scheduled onto hosts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPod.BuilderA fluent builder forPod.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IPodSpec
IPodSpec.Jsii$Default, IPodSpec.Jsii$Proxy
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IResource
IResource.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPod(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedPod(software.amazon.jsii.JsiiObjectRef objRef)Pod(software.constructs.Construct scope, String id)Pod(software.constructs.Construct scope, String id, PodProps props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContaineraddContainer(ContainerProps cont)Add a container to the pod.voidaddHostAlias(HostAlias hostAlias)ContaineraddInitContainer(ContainerProps cont)Add an init container to the pod.voidaddVolume(Volume vol)Add a volume to the pod.protected org.cdk8s.ApiObjectgetApiObject()The underlying cdk8s API object.List<Container>getContainers()The containers belonging to the pod.PodDnsgetDns()The pod's DNS settings.List<HostAlias>getHostAliases()An optional list of hosts and IPs that will be injected into the pod's hosts file if specified.List<Container>getInitContainers()The init containers belonging to the pod.RestartPolicygetRestartPolicy()Restart policy for all containers within the pod.PodSecurityContextgetSecurityContext()The pod's security context.IServiceAccountgetServiceAccount()The service account used to run this pod.List<Volume>getVolumes()The volumes associated with this pod.-
Methods inherited from class org.cdk8s.plus20.Resource
getMetadata, getName
-
Methods inherited from class software.constructs.Construct
onPrepare, onSynthesize, onValidate, toString
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Pod
protected Pod(software.amazon.jsii.JsiiObjectRef objRef)
-
Pod
protected Pod(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Pod
@Stability(Stable) public Pod(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable PodProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Pod
@Stability(Stable) public Pod(@NotNull software.constructs.Construct scope, @NotNull String id)- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Detail
-
addContainer
@Stability(Stable) @NotNull public Container addContainer(@NotNull ContainerProps cont)
Add a container to the pod.- Specified by:
addContainerin interfaceIPodSpec- Parameters:
cont- This parameter is required.
-
addHostAlias
@Stability(Stable) public void addHostAlias(@NotNull HostAlias hostAlias)- Parameters:
hostAlias- This parameter is required.
-
addInitContainer
@Stability(Stable) @NotNull public Container addInitContainer(@NotNull ContainerProps cont)
Add an init container to the pod.- Specified by:
addInitContainerin interfaceIPodSpec- Parameters:
cont- This parameter is required.
-
addVolume
@Stability(Stable) public void addVolume(@NotNull Volume vol)Add a volume to the pod.
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObjectin classResource- See Also:
base.Resource.apiObject
-
getContainers
@Stability(Stable) @NotNull public List<Container> getContainers()
The containers belonging to the pod.Use
addContainerto add containers.- Specified by:
getContainersin interfaceIPodSpec
-
getDns
@Stability(Stable) @NotNull public PodDns getDns()
The pod's DNS settings.
-
getHostAliases
@Stability(Stable) @NotNull public List<HostAlias> getHostAliases()
An optional list of hosts and IPs that will be injected into the pod's hosts file if specified.This is only valid for non-hostNetwork pods.
- Specified by:
getHostAliasesin interfaceIPodSpec
-
getInitContainers
@Stability(Stable) @NotNull public List<Container> getInitContainers()
The init containers belonging to the pod.Use
addInitContainerto add init containers.- Specified by:
getInitContainersin interfaceIPodSpec
-
getSecurityContext
@Stability(Stable) @NotNull public PodSecurityContext getSecurityContext()
The pod's security context.- Specified by:
getSecurityContextin interfaceIPodSpec
-
getVolumes
@Stability(Stable) @NotNull public List<Volume> getVolumes()
The volumes associated with this pod.Use
addVolumeto add volumes.- Specified by:
getVolumesin interfaceIPodSpec
-
getRestartPolicy
@Stability(Stable) @Nullable public RestartPolicy getRestartPolicy()
Restart policy for all containers within the pod.- Specified by:
getRestartPolicyin interfaceIPodSpec
-
getServiceAccount
@Stability(Stable) @Nullable public IServiceAccount getServiceAccount()
The service account used to run this pod.- Specified by:
getServiceAccountin interfaceIPodSpec
-
-