Skip to content

Commit df4ab33

Browse files
authored
Merge pull request #31537 from verb/main-ec-api-ref
Update API reference for Ephemeral Containers beta
2 parents 9af1c83 + 627a56d commit df4ab33

File tree

2 files changed

+88
-88
lines changed
  • api-ref-assets/config
  • content/en/docs/reference/kubernetes-api/workload-resources

2 files changed

+88
-88
lines changed

api-ref-assets/config/fields.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@
5050
- securityContext
5151
- name: Beta level
5252
fields:
53+
- ephemeralContainers
5354
- preemptionPolicy
5455
- overhead
55-
- name: Alpha level
56-
fields:
57-
- ephemeralContainers
5856
- name: Deprecated
5957
fields:
6058
- serviceAccount
@@ -227,14 +225,16 @@
227225
- stdin
228226
- stdinOnce
229227
- tty
228+
- name: Security context
229+
fields:
230+
- securityContext
230231
- name: Not allowed
231232
fields:
232233
- ports
233234
- resources
234235
- lifecycle
235236
- livenessProbe
236237
- readinessProbe
237-
- securityContext
238238
- startupProbe
239239

240240
- definition: io.k8s.api.core.v1.ReplicationControllerSpec

content/en/docs/reference/kubernetes-api/workload-resources/pod-v1.md

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,12 @@ PodSpec is a description of a pod.
489489
### Beta level
490490

491491

492+
- **ephemeralContainers** ([]<a href="{{< ref "../workload-resources/pod-v1#EphemeralContainer" >}}">EphemeralContainer</a>)
493+
494+
*Patch strategy: merge on key `name`*
495+
496+
List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.
497+
492498
- **preemptionPolicy** (string)
493499

494500
PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.
@@ -497,15 +503,6 @@ PodSpec is a description of a pod.
497503

498504
Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.
499505

500-
### Alpha level
501-
502-
503-
- **ephemeralContainers** ([]<a href="{{< ref "../workload-resources/pod-v1#EphemeralContainer" >}}">EphemeralContainer</a>)
504-
505-
*Patch strategy: merge on key `name`*
506-
507-
List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.
508-
509506
### Deprecated
510507

511508

@@ -1220,82 +1217,8 @@ This is a beta feature available on clusters that haven't disabled the Ephemeral
12201217

12211218
Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
12221219

1223-
### Not allowed
1224-
1225-
1226-
- **ports** ([]ContainerPort)
1227-
1228-
*Patch strategy: merge on key `containerPort`*
1229-
1230-
*Map: unique values on keys `containerPort, protocol` will be kept during a merge*
1231-
1232-
Ports are not allowed for ephemeral containers.
1233-
1234-
<a name="ContainerPort"></a>
1235-
*ContainerPort represents a network port in a single container.*
1236-
1237-
- **ports.containerPort** (int32), required
1238-
1239-
Number of port to expose on the pod's IP address. This must be a valid port number, 0 \< x \< 65536.
1240-
1241-
- **ports.hostIP** (string)
1242-
1243-
What host IP to bind the external port to.
1244-
1245-
- **ports.hostPort** (int32)
1246-
1247-
Number of port to expose on the host. If specified, this must be a valid port number, 0 \< x \< 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
1248-
1249-
- **ports.name** (string)
1250-
1251-
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.
1252-
1253-
- **ports.protocol** (string)
1254-
1255-
Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".
1256-
1257-
Possible enum values:
1258-
- `"SCTP"` is the SCTP protocol.
1259-
- `"TCP"` is the TCP protocol.
1260-
- `"UDP"` is the UDP protocol.
1261-
1262-
- **resources** (ResourceRequirements)
1263-
1264-
Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.
1265-
1266-
<a name="ResourceRequirements"></a>
1267-
*ResourceRequirements describes the compute resource requirements.*
1268-
1269-
- **resources.limits** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
1270-
1271-
Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1272-
1273-
- **resources.requests** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
1274-
1275-
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1276-
1277-
- **lifecycle** (Lifecycle)
1278-
1279-
Lifecycle is not allowed for ephemeral containers.
1280-
1281-
<a name="Lifecycle"></a>
1282-
*Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.*
1283-
1284-
- **lifecycle.postStart** (<a href="{{< ref "../workload-resources/pod-v1#LifecycleHandler" >}}">LifecycleHandler</a>)
1285-
1286-
PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
1287-
1288-
- **lifecycle.preStop** (<a href="{{< ref "../workload-resources/pod-v1#LifecycleHandler" >}}">LifecycleHandler</a>)
1289-
1290-
PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
1291-
1292-
- **livenessProbe** (<a href="{{< ref "../workload-resources/pod-v1#Probe" >}}">Probe</a>)
1293-
1294-
Probes are not allowed for ephemeral containers.
1295-
1296-
- **readinessProbe** (<a href="{{< ref "../workload-resources/pod-v1#Probe" >}}">Probe</a>)
1220+
### Security context
12971221

1298-
Probes are not allowed for ephemeral containers.
12991222

13001223
- **securityContext** (SecurityContext)
13011224

@@ -1415,6 +1338,83 @@ This is a beta feature available on clusters that haven't disabled the Ephemeral
14151338

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

1341+
### Not allowed
1342+
1343+
1344+
- **ports** ([]ContainerPort)
1345+
1346+
*Patch strategy: merge on key `containerPort`*
1347+
1348+
*Map: unique values on keys `containerPort, protocol` will be kept during a merge*
1349+
1350+
Ports are not allowed for ephemeral containers.
1351+
1352+
<a name="ContainerPort"></a>
1353+
*ContainerPort represents a network port in a single container.*
1354+
1355+
- **ports.containerPort** (int32), required
1356+
1357+
Number of port to expose on the pod's IP address. This must be a valid port number, 0 \< x \< 65536.
1358+
1359+
- **ports.hostIP** (string)
1360+
1361+
What host IP to bind the external port to.
1362+
1363+
- **ports.hostPort** (int32)
1364+
1365+
Number of port to expose on the host. If specified, this must be a valid port number, 0 \< x \< 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
1366+
1367+
- **ports.name** (string)
1368+
1369+
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.
1370+
1371+
- **ports.protocol** (string)
1372+
1373+
Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".
1374+
1375+
Possible enum values:
1376+
- `"SCTP"` is the SCTP protocol.
1377+
- `"TCP"` is the TCP protocol.
1378+
- `"UDP"` is the UDP protocol.
1379+
1380+
- **resources** (ResourceRequirements)
1381+
1382+
Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.
1383+
1384+
<a name="ResourceRequirements"></a>
1385+
*ResourceRequirements describes the compute resource requirements.*
1386+
1387+
- **resources.limits** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
1388+
1389+
Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1390+
1391+
- **resources.requests** (map[string]<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)
1392+
1393+
Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1394+
1395+
- **lifecycle** (Lifecycle)
1396+
1397+
Lifecycle is not allowed for ephemeral containers.
1398+
1399+
<a name="Lifecycle"></a>
1400+
*Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.*
1401+
1402+
- **lifecycle.postStart** (<a href="{{< ref "../workload-resources/pod-v1#LifecycleHandler" >}}">LifecycleHandler</a>)
1403+
1404+
PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
1405+
1406+
- **lifecycle.preStop** (<a href="{{< ref "../workload-resources/pod-v1#LifecycleHandler" >}}">LifecycleHandler</a>)
1407+
1408+
PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
1409+
1410+
- **livenessProbe** (<a href="{{< ref "../workload-resources/pod-v1#Probe" >}}">Probe</a>)
1411+
1412+
Probes are not allowed for ephemeral containers.
1413+
1414+
- **readinessProbe** (<a href="{{< ref "../workload-resources/pod-v1#Probe" >}}">Probe</a>)
1415+
1416+
Probes are not allowed for ephemeral containers.
1417+
14181418
- **startupProbe** (<a href="{{< ref "../workload-resources/pod-v1#Probe" >}}">Probe</a>)
14191419

14201420
Probes are not allowed for ephemeral containers.

0 commit comments

Comments
 (0)