Skip to content

Commit 954acfe

Browse files
committed
Migrate kubectl debug KEP to new format
1 parent 6200154 commit 954acfe

File tree

2 files changed

+315
-42
lines changed

2 files changed

+315
-42
lines changed

keps/sig-cli/20190805-kubectl-debug.md renamed to keps/sig-cli/1441-kubectl-debug/README.md

Lines changed: 269 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
1-
---
2-
title: kubectl debug
3-
authors:
4-
- "@verb"
5-
owning-sig: sig-cli
6-
participating-sigs:
7-
- sig-cli
8-
- sig-node
9-
reviewers:
10-
- "@aylei"
11-
- "@soltysh"
12-
approvers:
13-
- "@pwittrock"
14-
- "@soltysh"
15-
editor: TBD
16-
creation-date: 2019-08-05
17-
last-updated: 2019-08-06
18-
status: implementable
19-
see-also:
20-
- "/keps/sig-node/20190212-ephemeral-containers.md"
21-
- "/keps/sig-release/20190316-rebase-images-to-distroless.md"
22-
---
23-
24-
# Pod Troubleshooting
25-
26-
## Table of Contents
1+
# KEP-1441: kubectl debug
272

283
<!-- toc -->
294
- [Release Signoff Checklist](#release-signoff-checklist)
@@ -50,40 +25,44 @@ see-also:
5025
- [Debugging](#debugging)
5126
- [Automation](#automation)
5227
- [Technical Support](#technical-support)
53-
- [Implementation Details/Notes/Constraints](#implementation-detailsnotesconstraints)
28+
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
5429
- [Risks and Mitigations](#risks-and-mitigations)
5530
- [Design Details](#design-details)
5631
- [Test Plan](#test-plan)
5732
- [Graduation Criteria](#graduation-criteria)
5833
- [Alpha -&gt; Beta Graduation](#alpha---beta-graduation)
5934
- [Beta -&gt; GA Graduation](#beta---ga-graduation)
35+
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
36+
- [Version Skew Strategy](#version-skew-strategy)
37+
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
6038
- [Implementation History](#implementation-history)
39+
- [Drawbacks](#drawbacks)
6140
- [Alternatives](#alternatives)
6241
<!-- /toc -->
6342

6443
## Release Signoff Checklist
6544

66-
For enhancements that make changes to code or processes/procedures in core Kubernetes i.e., [kubernetes/kubernetes], we require the following Release Signoff checklist to be completed.
45+
Items marked with (R) are required *prior to targeting to a milestone / release*.
6746

68-
Check these off as they are completed for the Release Team to track. These checklist items _must_ be updated for the enhancement to be released.
69-
70-
- [ ] kubernetes/enhancements issue in release milestone, which links to KEP (this should be a link to the KEP location in kubernetes/enhancements, not the initial KEP PR)
71-
- [ ] KEP approvers have set the KEP status to `implementable`
72-
- [ ] Design details are appropriately documented
73-
- [ ] Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
74-
- [ ] Graduation criteria is in place
47+
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
48+
- [x] (R) KEP approvers have approved the KEP status as `implementable`
49+
- [ ] (R) Design details are appropriately documented
50+
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
51+
- [ ] (R) Graduation criteria is in place
52+
- [ ] (R) Production readiness review completed
53+
- [ ] Production readiness review approved
7554
- [ ] "Implementation History" section is up-to-date for milestone
7655
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
77-
- [ ] Supporting documentation e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
78-
79-
**Note:** Any PRs to move a KEP to `implementable` or significant changes once it is marked `implementable` should be approved by each of the KEP approvers. If any of those approvers is no longer appropriate than changes to that list should be approved by the remaining approvers and/or the owning SIG (or SIG-arch for cross cutting KEPs).
56+
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
8057

58+
<!--
8159
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
60+
-->
8261

8362
[kubernetes.io]: https://kubernetes.io/
84-
[kubernetes/enhancements]: https://github.com/kubernetes/enhancements/issues
85-
[kubernetes/kubernetes]: https://github.com/kubernetes/kubernetes
86-
[kubernetes/website]: https://github.com/kubernetes/website
63+
[kubernetes/enhancements]: https://git.k8s.io/enhancements
64+
[kubernetes/kubernetes]: https://git.k8s.io/kubernetes
65+
[kubernetes/website]: https://git.k8s.io/website
8766

8867
## Summary
8968

@@ -436,7 +415,7 @@ is to run his team's autodiagnose script:
436415
% kubectl debug --image=k8s.gcr.io/autodiagnose nginx-pod-1234
437416
```
438417

439-
### Implementation Details/Notes/Constraints
418+
### Notes/Constraints/Caveats
440419

441420
1. There's an output stream race inherent to creating then attaching a
442421
container which causes output generated between the start and attach to go
@@ -476,13 +455,261 @@ test prior to Alpha -> Beta graduation.
476455

477456
- [ ] Ephemeral Containers are GA
478457

458+
### Upgrade / Downgrade Strategy
459+
460+
<!--
461+
If applicable, how will the component be upgraded and downgraded? Make sure
462+
this is in the test plan.
463+
464+
Consider the following in developing an upgrade/downgrade strategy for this
465+
enhancement:
466+
- What changes (in invocations, configurations, API use, etc.) is an existing
467+
cluster required to make on upgrade, in order to maintain previous behavior?
468+
- What changes (in invocations, configurations, API use, etc.) is an existing
469+
cluster required to make on upgrade, in order to make use of the enhancement?
470+
-->
471+
472+
### Version Skew Strategy
473+
474+
<!--
475+
If applicable, how will the component handle version skew with other
476+
components? What are the guarantees? Make sure this is in the test plan.
477+
478+
Consider the following in developing a version skew strategy for this
479+
enhancement:
480+
- Does this enhancement involve coordinating behavior in the control plane and
481+
in the kubelet? How does an n-2 kubelet without this feature available behave
482+
when this feature is used?
483+
- Will any other components on the node change? For example, changes to CSI,
484+
CRI or CNI may require updating that component before the kubelet.
485+
-->
486+
487+
## Production Readiness Review Questionnaire
488+
489+
<!--
490+
491+
Production readiness reviews are intended to ensure that features merging into
492+
Kubernetes are observable, scalable and supportable; can be safely operated in
493+
production environments, and can be disabled or rolled back in the event they
494+
cause increased failures in production. See more in the PRR KEP at
495+
https://git.k8s.io/enhancements/keps/sig-architecture/20190731-production-readiness-review-process.md.
496+
497+
The production readiness review questionnaire must be completed for features in
498+
v1.19 or later, but is non-blocking at this time. That is, approval is not
499+
required in order to be in the release.
500+
501+
In some cases, the questions below should also have answers in `kep.yaml`. This
502+
is to enable automation to verify the presence of the review, and to reduce review
503+
burden and latency.
504+
505+
The KEP must have a approver from the
506+
[`prod-readiness-approvers`](http://git.k8s.io/enhancements/OWNERS_ALIASES)
507+
team. Please reach out on the
508+
[#prod-readiness](https://kubernetes.slack.com/archives/CPNHUMN74) channel if
509+
you need any help or guidance.
510+
511+
-->
512+
513+
```
514+
<<[UNRESOLVED copied over from template and needs to be filled. ]>>
515+
516+
### Feature Enablement and Rollback
517+
518+
_This section must be completed when targeting alpha to a release._
519+
520+
* **How can this feature be enabled / disabled in a live cluster?**
521+
- [ ] Feature gate (also fill in values in `kep.yaml`)
522+
- Feature gate name:
523+
- Components depending on the feature gate:
524+
- [ ] Other
525+
- Describe the mechanism:
526+
- Will enabling / disabling the feature require downtime of the control
527+
plane?
528+
- Will enabling / disabling the feature require downtime or reprovisioning
529+
of a node? (Do not assume `Dynamic Kubelet Config` feature is enabled).
530+
531+
* **Does enabling the feature change any default behavior?**
532+
Any change of default behavior may be surprising to users or break existing
533+
automations, so be extremely careful here.
534+
535+
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
536+
the enablement)?**
537+
Also set `disable-supported` to `true` or `false` in `kep.yaml`.
538+
Describe the consequences on existing workloads (e.g., if this is a runtime
539+
feature, can it break the existing applications?).
540+
541+
* **What happens if we reenable the feature if it was previously rolled back?**
542+
543+
* **Are there any tests for feature enablement/disablement?**
544+
The e2e framework does not currently support enabling or disabling feature
545+
gates. However, unit tests in each component dealing with managing data, created
546+
with and without the feature, are necessary. At the very least, think about
547+
conversion tests if API types are being modified.
548+
549+
### Rollout, Upgrade and Rollback Planning
550+
551+
_This section must be completed when targeting beta graduation to a release._
552+
553+
* **How can a rollout fail? Can it impact already running workloads?**
554+
Try to be as paranoid as possible - e.g., what if some components will restart
555+
mid-rollout?
556+
557+
* **What specific metrics should inform a rollback?**
558+
559+
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
560+
Describe manual testing that was done and the outcomes.
561+
Longer term, we may want to require automated upgrade/rollback tests, but we
562+
are missing a bunch of machinery and tooling and can't do that now.
563+
564+
* **Is the rollout accompanied by any deprecations and/or removals of features, APIs,
565+
fields of API types, flags, etc.?**
566+
Even if applying deprecation policies, they may still surprise some users.
567+
568+
### Monitoring Requirements
569+
570+
_This section must be completed when targeting beta graduation to a release._
571+
572+
* **How can an operator determine if the feature is in use by workloads?**
573+
Ideally, this should be a metric. Operations against the Kubernetes API (e.g.,
574+
checking if there are objects with field X set) may be a last resort. Avoid
575+
logs or events for this purpose.
576+
577+
* **What are the SLIs (Service Level Indicators) an operator can use to determine
578+
the health of the service?**
579+
- [ ] Metrics
580+
- Metric name:
581+
- [Optional] Aggregation method:
582+
- Components exposing the metric:
583+
- [ ] Other (treat as last resort)
584+
- Details:
585+
586+
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
587+
At a high level, this usually will be in the form of "high percentile of SLI
588+
per day <= X". It's impossible to provide comprehensive guidance, but at the very
589+
high level (needs more precise definitions) those may be things like:
590+
- per-day percentage of API calls finishing with 5XX errors <= 1%
591+
- 99% percentile over day of absolute value from (job creation time minus expected
592+
job creation time) for cron job <= 10%
593+
- 99,9% of /health requests per day finish with 200 code
594+
595+
* **Are there any missing metrics that would be useful to have to improve observability
596+
of this feature?**
597+
Describe the metrics themselves and the reasons why they weren't added (e.g., cost,
598+
implementation difficulties, etc.).
599+
600+
### Dependencies
601+
602+
_This section must be completed when targeting beta graduation to a release._
603+
604+
* **Does this feature depend on any specific services running in the cluster?**
605+
Think about both cluster-level services (e.g. metrics-server) as well
606+
as node-level agents (e.g. specific version of CRI). Focus on external or
607+
optional services that are needed. For example, if this feature depends on
608+
a cloud provider API, or upon an external software-defined storage or network
609+
control plane.
610+
611+
For each of these, fill in the following—thinking about running existing user workloads
612+
and creating new ones, as well as about cluster-level services (e.g. DNS):
613+
- [Dependency name]
614+
- Usage description:
615+
- Impact of its outage on the feature:
616+
- Impact of its degraded performance or high-error rates on the feature:
617+
618+
619+
### Scalability
620+
621+
_For alpha, this section is encouraged: reviewers should consider these questions
622+
and attempt to answer them._
623+
624+
_For beta, this section is required: reviewers must answer these questions._
625+
626+
_For GA, this section is required: approvers should be able to confirm the
627+
previous answers based on experience in the field._
628+
629+
* **Will enabling / using this feature result in any new API calls?**
630+
Describe them, providing:
631+
- API call type (e.g. PATCH pods)
632+
- estimated throughput
633+
- originating component(s) (e.g. Kubelet, Feature-X-controller)
634+
focusing mostly on:
635+
- components listing and/or watching resources they didn't before
636+
- API calls that may be triggered by changes of some Kubernetes resources
637+
(e.g. update of object X triggers new updates of object Y)
638+
- periodic API calls to reconcile state (e.g. periodic fetching state,
639+
heartbeats, leader election, etc.)
640+
641+
* **Will enabling / using this feature result in introducing new API types?**
642+
Describe them, providing:
643+
- API type
644+
- Supported number of objects per cluster
645+
- Supported number of objects per namespace (for namespace-scoped objects)
646+
647+
* **Will enabling / using this feature result in any new calls to the cloud
648+
provider?**
649+
650+
* **Will enabling / using this feature result in increasing size or count of
651+
the existing API objects?**
652+
Describe them, providing:
653+
- API type(s):
654+
- Estimated increase in size: (e.g., new annotation of size 32B)
655+
- Estimated amount of new objects: (e.g., new Object X for every existing Pod)
656+
657+
* **Will enabling / using this feature result in increasing time taken by any
658+
operations covered by [existing SLIs/SLOs]?**
659+
Think about adding additional work or introducing new steps in between
660+
(e.g. need to do X to start a container), etc. Please describe the details.
661+
662+
* **Will enabling / using this feature result in non-negligible increase of
663+
resource usage (CPU, RAM, disk, IO, ...) in any components?**
664+
Things to keep in mind include: additional in-memory state, additional
665+
non-trivial computations, excessive access to disks (including increased log
666+
volume), significant amount of data sent and/or received over network, etc.
667+
This through this both in small and large cases, again with respect to the
668+
[supported limits].
669+
670+
### Troubleshooting
671+
672+
The Troubleshooting section currently serves the `Playbook` role. We may consider
673+
splitting it into a dedicated `Playbook` document (potentially with some monitoring
674+
details). For now, we leave it here.
675+
676+
_This section must be completed when targeting beta graduation to a release._
677+
678+
* **How does this feature react if the API server and/or etcd is unavailable?**
679+
680+
* **What are other known failure modes?**
681+
For each of them, fill in the following information by copying the below template:
682+
- [Failure mode brief description]
683+
- Detection: How can it be detected via metrics? Stated another way:
684+
how can an operator troubleshoot without logging into a master or worker node?
685+
- Mitigations: What can be done to stop the bleeding, especially for already
686+
running user workloads?
687+
- Diagnostics: What are the useful log messages and their required logging
688+
levels that could help debug the issue?
689+
Not required until feature graduated to beta.
690+
- Testing: Are there any tests for failure mode? If not, describe why.
691+
692+
* **What steps should be taken if SLOs are not being met to determine the problem?**
693+
694+
[supported limits]: https://git.k8s.io/community//sig-scalability/configs-and-limits/thresholds.md
695+
[existing SLIs/SLOs]: https://git.k8s.io/community/sig-scalability/slos/slos.md#kubernetes-slisslos
696+
697+
<<[/UNRESOLVED]>>
698+
```
699+
479700
## Implementation History
480701

481702
- *2019-08-06*: Initial KEP draft
482703
- *2019-12-05*: Updated KEP for expanded debug targets.
483704
- *2020-01-09*: Updated KEP for debugging nodes and mark implementable.
484705
- *2020-01-15*: Added test plan.
485706

707+
## Drawbacks
708+
709+
<!--
710+
Why should this KEP _not_ be implemented?
711+
-->
712+
486713
## Alternatives
487714

488715
An exhaustive list of alternatives to ephemeral containers is included in the

0 commit comments

Comments
 (0)