4 ms·
The one thing I have found tedious with k8s clusters is when you need to work on the host system in relation to a specific pod. E.g. to diagnose kernel issues o
by the8472 7y ago
The one thing I have found tedious with k8s clusters is when you need to work on the host system in relation to a specific pod. E.g. to diagnose kernel issues or for profiling/debugging tools that need unrestricted root.
This can require jumping through several hoops. Find the node, get through some bastion host, inject SSH keys into target node, build an SSH chain to get into the host, then escalate from admin to root account.
It would be nice if kubectl offered an escape hatch for these kinds of things, assuming one has sufficient permissions.
- majewsky 7y agoRun a privileged container with the host's procfs mounted into it via hostPath volume. Then you can use nsenter to break out of the container into the host system.
- the8472 7y agoI already used a host mount to inject SSH keys. I guess I can just skip the rest and automate the steps to pivot fully into the host.