Skip to content

Instantly share code, notes, and snippets.

@blessedwithsins
blessedwithsins / README.md
Created May 27, 2021 03:47 — forked from xandout/README.md
Kubernetes DaemonSet that enables a direct shell on each Node using SSH to localhost

Getting a shell on each node

I run several K8S cluster on EKS and by default do not setup inbound SSH to the nodes. Sometimes I need to get into each node to check things or run a one-off tool.

Rather than update my terraform, rebuild the launch templates and redeploy brand new nodes, I decided to use kubernetes to access each node directly.

Alternative option

https://github.com/alexei-led/nsenter

kind: DaemonSet
apiVersion: apps/v1
metadata:
name: downgradecontainerd
namespace: kube-system
labels:
app: downgradecontainerd
spec:
selector:
matchLabels:
@blessedwithsins
blessedwithsins / nginx.yaml
Created April 3, 2021 06:59 — forked from alexeldeib/nginx.yaml
rbac with raw token demo
---
apiVersion: v1
kind: Namespace
metadata:
name: nginx
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: nginx-service-account