Skip to content

Commit 4d2b1c9

Browse files
committed
KEP-277: Update for beta in 1.23
1 parent 4dd81f5 commit 4d2b1c9

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

keps/prod-readiness/sig-node/277.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
kep-number: 277
22
alpha:
33
approver: "@johnbelamaric"
4+
beta:
5+
approver: "@johnbelamaric"

keps/sig-node/277-ephemeral-containers/README.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -884,33 +884,28 @@ _This section must be completed when targeting beta graduation to a release._
884884

885885
* **How can an operator determine if the feature is in use by workloads?**
886886

887-
We will create a new gauge metric that's updated during kubelet's reconcile
888-
of `v1.Pod` to track the number containers scheduled to this node in the API.
889-
This will be slightly different than the existing
890-
`kubelet_running_containers`, which describes the kubelet's representation of
891-
containers, and will be able to label the metrics with fields that are only
892-
available in the API object, such as type of container.
893-
894-
Note that these kubelet metrics are still in alpha.
895-
896-
This is tracked in [#97974](https://issues.k8s.io/97974).
887+
This information is available by examining pod objects in the API server
888+
for the field `pod.spec.ephemeralContainers`. Additionally, the kubelet surfaces
889+
the following metrics, added in [#99000](https://issues.k8s.io/99000):
890+
891+
- `kubelet_managed_ephemeral_containers`: The number of ephemeral containers
892+
in pods managed by this kubelet.
893+
- `kubelet_started_containers_total`: Counter of all containers started by
894+
this kubelet, indexed by `container_type`. Ephemeral containers have a
895+
`container_type` of `ephemeral_container`.
896+
- `kubelet_started_containers_errors_total `: Counter of errors encountered
897+
when this kubelet starts containers, idnexed by `container_type`.
898+
Ephemeral containers have a `container_type` of `ephemeral_container`.
897899

898900
* **What are the SLIs (Service Level Indicators) an operator can use to determine
899901
the health of the service?**
900902
- [x] Metrics
901-
- Metric name: `apiserver_request_total{component="apiserver",resource="pods",subresource="ephemeralcontainers"}` (apiserver), `kubelet_container_errors_total{type="Ephemeral"}` (kubelet, Proposed)
903+
- Metric name: `apiserver_request_total{component="apiserver",resource="pods",subresource="ephemeralcontainers"}` (apiserver), `kubelet_started_containers_errors_total{container_type="ephemeral_container"}`
902904
- [Optional] Aggregation method: Aggregate by container type
903-
- Components exposing the metric: kubelet
905+
- Components exposing the metric: apiserver, kubelet
904906
- [ ] Other (treat as last resort)
905907
- Details:
906908

907-
Note that the kubelet SLI for this feature is a counter that increments upon
908-
failure to create an ephemeral container. Right now the kubelet only surfaces
909-
runtime-level errors, so I'll propose adding a higher level counter to
910-
encapsulate the entire container creation request, including container type.
911-
912-
This is tracked in [#97974](https://issues.k8s.io/97974).
913-
914909
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
915910
At a high level, this usually will be in the form of "high percentile of SLI
916911
per day <= X". It's impossible to provide comprehensive guidance, but at the very
@@ -962,11 +957,13 @@ previous answers based on experience in the field._
962957

963958
* **Will enabling / using this feature result in introducing new API types?**
964959

965-
There an no new Kinds for storage, but new types are used in API interactions
966-
and in `v1.Pod`.
960+
There an no new Kinds for storage, but new types are used in `v1.Pod`.
961+
Ephemeral containers are added by writing a `v1.Pod` containing
962+
`pod.spec.ephemeralContainers` to the pod's `/ephemeralcontainers`
963+
subresource, similar to how the kubelet updates `pod.status`.
967964

968965
- API type:
969-
- v1.EphemeralContainers (used for `/ephemeralcontainers` subresource)
966+
- v1.Pod (with `/ephemeralcontainers` subresource)
970967
- Supported number of objects per cluster: same as Pods
971968
- Supported number of objects per namespace: same as Pods
972969

@@ -980,21 +977,22 @@ the existing API objects?**
980977

981978
- API type(s): v1.Pod
982979
- Estimated increase in size: Additional `Container` for each Ephemeral
983-
container. This is expected to be negligible since these are created by
980+
container. This is expected to be negligible since these are created
984981
manually by humans.
985982
- Estimated amount of new objects: N/A
986983

987984
* **Will enabling / using this feature result in increasing time taken by any
988985
operations covered by [existing SLIs/SLOs]?**
989986

990-
When people add additional containers to a Pod, the pod will have additional
987+
When users add additional containers to a Pod, the pod will have additional
991988
containers to shut down and garbage collect when the Pod exits.
992989

993990
* **Will enabling / using this feature result in non-negligible increase of
994991
resource usage (CPU, RAM, disk, IO, ...) in any components?**
995992

996993
Not automatically. Use of this feature will result in additional containers
997-
running on kubelets.
994+
running on kubelets, but it does not change the amount of resources allocated
995+
to pods.
998996

999997
### Troubleshooting
1000998

@@ -1030,6 +1028,11 @@ _This section must be completed when targeting beta graduation to a release._
10301028
- Testing: No, testing for cluster misconfiguration at dev time doesn't
10311029
prevent cluster misconfiguration at run time.
10321030

1031+
One may completely disable the feature using the `EphemeralContainers` feature
1032+
flag, but it's also possible to prevent the creation of new ephemeral containers
1033+
without a restart by removing authorization to `ephemeralcontainers` subresource
1034+
via [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/).
1035+
10331036
* **What steps should be taken if SLOs are not being met to determine the problem?**
10341037

10351038
Troubleshoot using apiserver and kubelet error logs.
@@ -1050,6 +1053,9 @@ _This section must be completed when targeting beta graduation to a release._
10501053
- *2020-09-29*: Ported KEP to directory-based template.
10511054
- *2021-01-07*: Updated KEP for beta release in 1.21 and completed PRR section.
10521055
- *2021-04-12*: Switched `/ephemeralcontainers` API to use `Pod`.
1056+
- *2021-05-14*: Add additional graduation criteria
1057+
- *2021-07-09*: Revert KEP to alpha because of the new API introduced in 1.22.
1058+
- *2021-08-23*: Updated KEP for beta release in 1.23.
10531059

10541060
## Drawbacks
10551061

keps/sig-node/277-ephemeral-containers/kep.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ participating-sigs:
99
status: implementable
1010
creation-date: 2019-02-12
1111
reviewers:
12-
- "@yujuhong"
12+
- "@dchen1107"
1313
approvers:
1414
- "@dchen1107"
1515
- "@liggitt"
@@ -19,12 +19,12 @@ see-also:
1919
- "/keps/sig-cli/1441-kubectl-debug"
2020

2121
# The target maturity stage in the current dev cycle for this KEP.
22-
stage: alpha
22+
stage: beta
2323

2424
# The most recent milestone for which work toward delivery of this KEP has been
2525
# done. This can be the current (upcoming) milestone, if it is being actively
2626
# worked on.
27-
latest-milestone: "v1.22"
27+
latest-milestone: "v1.23"
2828

2929
# The milestone at which this feature was, or is targeted to be, at each stage.
3030
milestone:
@@ -43,4 +43,6 @@ disable-supported: true
4343

4444
# The following PRR answers are required at beta release
4545
metrics:
46-
- kubelet_container_errors_total
46+
- kubelet_started_containers_total
47+
- kubelet_started_containers_errors_total
48+
- kubelet_managed_ephemeral_containers

0 commit comments

Comments
 (0)