I'm trying to debug a distroless POD by trying kubectl debug
which uses ephemeral containers that are disabled by default in aws eks. I'm using aws eks 1.21
✗ kubectl debug -it opentelemetry-collector-agent-6hqvf --image=busybox --target=some-app
error: ephemeral containers are disabled for this cluster (error from server: "the server could not find the requested resource")
So how to enable them for EKS?
The Kubernetes v1.23 release (not yet available on EKS) moved the ephemeral containers feature from alpha to beta.
When EKS adds support for Kubernetes v1.23, it's possible that this will include the ephemeral container API. It's not possible to say with confidence which way AWS will go here.
If EKS does add support for this API, make sure that you're applying appropriate restrictions. The ability to run an ephemeral container changes the attack surface for your workload and for the cluster it runs on.