25
25
- [ Profile: restricted] ( #profile-restricted )
26
26
- [ Profile: sysadmin] ( #profile-sysadmin )
27
27
- [ Profile: netadmin] ( #profile-netadmin )
28
- - [ Default Profile and Automation Selection ] ( #default-profile-and-automation-selection )
28
+ - [ Default Profile] ( #default-profile )
29
29
- [ Future Improvements] ( #future-improvements )
30
30
- [ User Stories] ( #user-stories )
31
31
- [ Operations] ( #operations )
@@ -329,15 +329,14 @@ debugging a node to create a pod with the `NET_ADMIN` capaibility.
329
329
330
330
The available profiles will be:
331
331
332
- | Profile | Description |
333
- | ------------ | --------------------------------------------------------------- |
334
- | general | A reasonable set of defaults tailored for each debuging journey |
335
- | baseline | Compatible with baseline [ Pod Security Standard] |
336
- | restricted | Compatible with restricted [ Pod Security Standard] |
337
- | auto | Automatically choose between general, baseline, and restricted |
338
- | sysadmin | System Administrator (root) privileges |
339
- | netadmin | Network Administrator privileges. |
340
- | legacy | Backwards compatibility with 1.22 behavior |
332
+ | Profile | Description |
333
+ | ------------| -----------------------------------------------------------------|
334
+ | general | A reasonable set of defaults tailored for each debuging journey |
335
+ | baseline | Compatible with baseline [ Pod Security Standard] |
336
+ | restricted | Compatible with restricted [ Pod Security Standard] |
337
+ | sysadmin | System Administrator (root) privileges |
338
+ | netadmin | Network Administrator privileges. |
339
+ | legacy | Backwards compatibility with 1.22 behavior |
341
340
342
341
Debugging profiles are intended to work seamlessly with the [ Pod Security Standard]
343
342
enforced by the [ PodSecurity] admission controller. The baseline and restricted
@@ -349,11 +348,11 @@ level.
349
348
350
349
#### Profile: general
351
350
352
- | Journey | Debug Container Behavior |
353
- | ------------------- | -- ------------------------------------------------------------------------ |
354
- | Node | empty securityContext; uses host namespaces, mounts root partition |
355
- | Pod Copy | sets ` SYS_PTRACE ` in debugging container, sets shareProcessNamespace |
356
- | Ephemeral Container | sets ` SYS_PTRACE ` in ephemeral container |
351
+ | Journey | Debug Container Behavior |
352
+ | --------------------- | ----------------------------------------------------------------------|
353
+ | Node | empty securityContext; uses host namespaces, mounts root partition |
354
+ | Pod Copy | sets ` SYS_PTRACE ` in debugging container, sets shareProcessNamespace |
355
+ | Ephemeral Container | sets ` SYS_PTRACE ` in ephemeral container |
357
356
358
357
This profile prioritizes the debugging experience for the general case. For pod debugging it sets
359
358
` SYS_PTRACE ` and uses pod-scoped namespaces. Probes and labels are stripped from Pod copies to
@@ -363,11 +362,11 @@ Node debugging uses host-scoped namespaces but doesn't otherwise request escalat
363
362
364
363
#### Profile: baseline
365
364
366
- | Journey | Debug Container Behavior |
367
- | ------------------- | -- ------------------------------------------------------------------------ |
368
- | Node | empty securityContext; uses isolated namespaces |
369
- | Pod Copy | empty securityContext; sets shareProcessNamespace |
370
- | Ephemeral Container | empty securityContext |
365
+ | Journey | Debug Container Behavior |
366
+ | --------------------- | ---------------------------------------------------|
367
+ | Node | empty securityContext; uses isolated namespaces |
368
+ | Pod Copy | empty securityContext; sets shareProcessNamespace |
369
+ | Ephemeral Container | empty securityContext |
371
370
372
371
This profile is identical to "general" but eliminates privileges that are disallowed under the
373
372
baseline security profile, such as host namespaces, host volume, mounts and ` SYS_PTRACE ` .
@@ -376,11 +375,11 @@ Probes and labels continue to be stripped from Pod copies.
376
375
377
376
#### Profile: restricted
378
377
379
- | Journey | Debug Container Behavior |
380
- | ------------------- | -- ------------------------------------------------------------------------ |
381
- | Node | empty securityContext; uses private namespaces |
382
- | Pod Copy | empty securityContext; sets shareProcessNamespace |
383
- | Ephemeral Container | empty securityContext |
378
+ | Journey | Debug Container Behavior |
379
+ | --------------------- | ---------------------------------------------------|
380
+ | Node | empty securityContext; uses private namespaces |
381
+ | Pod Copy | empty securityContext; sets shareProcessNamespace |
382
+ | Ephemeral Container | empty securityContext |
384
383
385
384
This profile is identical to "baseline" but adds configuration that's required under the restricted
386
385
security profile, such as requiring a non-root user and dropping all capabilities.
@@ -390,7 +389,7 @@ Probes and labels continue to be stripped from Pod copies.
390
389
#### Profile: sysadmin
391
390
392
391
| Journey | Debug Container Behavior |
393
- | ------------------- | -------------------------------------- |
392
+ | --------------------- | ---------------------------------------- |
394
393
| Node | sets privileged; uses host namespaces |
395
394
| Pod Copy | sets privileged on debugging container |
396
395
| Ephemeral Container | sets privileged on ephemeral container |
@@ -402,7 +401,7 @@ Probes and labels are be stripped from Pod copies.
402
401
#### Profile: netadmin
403
402
404
403
| Journey | Debug Container Behavior |
405
- | ------------------- | --------------------------------------------------------------------------------- |
404
+ | --------------------- | ----------------------------------------------------------------------------------- |
406
405
| Node | sets ` NET_ADMIN ` and ` NET_RAW ` ; uses host namespaces |
407
406
| Pod Copy | sets ` NET_ADMIN ` and ` NET_RAW ` on debugging container; sets shareProcessNamespace |
408
407
| Ephemeral Container | sets ` NET_ADMIN ` and ` NET_RAW ` on ephemeral container |
@@ -411,17 +410,12 @@ This profile offers elevated privileges for network debugging.
411
410
412
411
Probes and labels are be stripped from Pod copies.
413
412
414
- #### Default Profile and Automation Selection
413
+ #### Default Profile
415
414
416
- In order to provide a seamless experience and encourage use of [ PodSecurity] , the "auto"
417
- profile will automatically choose a profile that's compatible with the current security profile
418
- by examining the ` pod-security.kubernetes.io/enforce ` annotation on the namespace and
419
- selecting the most permissive of "general", "baseline", and "restricted" that the
420
- controller will allow.
415
+ In order to maintain backwards compatibility the ` legacy ` profile will be the default profile until 1.35.
416
+ When ` --profile ` is not specified ` kubectl debug ` will print a warning about the upcoming change in behavior.
421
417
422
- This will become the default behavior, but in order to maintain backwards compatibility
423
- the "legacy" profile will be the default profile until the 1.25 release. When ` --profile `
424
- is not specified ` kubectl debug ` will print a warning about the upcoming change in behavior.
418
+ Including 1.35 and upwards, ` general ` will be the default profile. ` legacy ` profile will entirely be removed in 1.38.
425
419
426
420
#### Future Improvements
427
421
@@ -443,8 +437,8 @@ be able to inspect the running pod without restarting it, but she doesn't
443
437
necessarily need to enter the container itself. She wants to:
444
438
445
439
1 . Inspect the filesystem of target container
446
- 1 . Execute debugging utilities not included in the container image
447
- 1 . Initiate network requests from the pod network namespace
440
+ 2 . Execute debugging utilities not included in the container image
441
+ 3 . Initiate network requests from the pod network namespace
448
442
449
443
This is achieved by running a new "debug" container in the pod namespaces. Her
450
444
troubleshooting session might resemble:
@@ -1107,6 +1101,7 @@ Definitely stop running `kubectl debug`.
1107
1101
- * 2020-09-23* : Update KEP for mutating multiple container images in debug-by-copy.
1108
1102
- * 2020-09-24* : Update KEP for Production Readiness and beta graduation.
1109
1103
- * 2024-01-16* : Promote kubectl debug to GA
1104
+ - * 2025-10-02* : Update KEP to drop auto profile and default general
1110
1105
1111
1106
## Alternatives
1112
1107
0 commit comments