| Modifier and Type | Method and Description |
|---|---|
Container.Builder |
args(List<String> args)
Arguments to the entrypoint.
|
Container |
build() |
Container.Builder |
command(List<String> command)
Entrypoint array.
|
static Container.Builder |
create() |
Container.Builder |
env(Map<String,? extends EnvValue> env)
List of environment variables to set in the container.
|
Container.Builder |
image(String image)
Docker image name.
|
Container.Builder |
imagePullPolicy(ImagePullPolicy imagePullPolicy)
Image pull policy for this container.
|
Container.Builder |
liveness(Probe liveness)
Periodic probe of container liveness.
|
Container.Builder |
name(String name)
Name of the container specified as a DNS_LABEL.
|
Container.Builder |
port(Number port)
Number of port to expose on the pod's IP address.
|
Container.Builder |
readiness(Probe readiness)
Determines when the container is ready to serve traffic.
|
Container.Builder |
startup(Probe startup)
StartupProbe indicates that the Pod has successfully initialized.
|
Container.Builder |
volumeMounts(List<? extends VolumeMount> volumeMounts)
Pod volumes to mount into the container's filesystem.
|
Container.Builder |
workingDir(String workingDir)
Container's working directory.
|
@Stability(value=Stable) public static Container.Builder create()
Container.Builder.@Stability(value=Stable) public Container.Builder image(String image)
image - Docker image name. This parameter is required.this@Stability(value=Stable) public Container.Builder args(List<String> args)
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.
Default: []
args - Arguments to the entrypoint. The docker image's CMD is used if `command` is not provided. This parameter is required.thishttps://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell@Stability(value=Stable) public Container.Builder command(List<String> command)
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
Default: - The docker image's ENTRYPOINT.
command - Entrypoint array. This parameter is required.this@Stability(value=Stable) public Container.Builder env(Map<String,? extends EnvValue> env)
Cannot be updated.
Default: - No environment variables.
env - List of environment variables to set in the container. This parameter is required.this@Stability(value=Stable) public Container.Builder imagePullPolicy(ImagePullPolicy imagePullPolicy)
Default: ImagePullPolicy.ALWAYS
imagePullPolicy - Image pull policy for this container. This parameter is required.this@Stability(value=Stable) public Container.Builder liveness(Probe liveness)
Container will be restarted if the probe fails.
Default: - no liveness probe is defined
liveness - Periodic probe of container liveness. This parameter is required.this@Stability(value=Stable) public Container.Builder name(String name)
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
Default: 'main'
name - Name of the container specified as a DNS_LABEL. This parameter is required.this@Stability(value=Stable) public Container.Builder port(Number port)
This must be a valid port number, 0 < x < 65536.
Default: - No port is exposed.
port - Number of port to expose on the pod's IP address. This parameter is required.this@Stability(value=Stable) public Container.Builder readiness(Probe readiness)
Default: - no readiness probe is defined
readiness - Determines when the container is ready to serve traffic. This parameter is required.this@Stability(value=Stable) public Container.Builder startup(Probe startup)
If specified, no other probes are executed until this completes successfully
Default: - no startup probe is defined.
startup - StartupProbe indicates that the Pod has successfully initialized. This parameter is required.this@Stability(value=Stable) public Container.Builder volumeMounts(List<? extends VolumeMount> volumeMounts)
Cannot be updated.
volumeMounts - Pod volumes to mount into the container's filesystem. This parameter is required.this@Stability(value=Stable) public Container.Builder workingDir(String workingDir)
If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
Default: - The container runtime's default.
workingDir - Container's working directory. This parameter is required.thisCopyright © 2021. All rights reserved.