Skip to content

Instantly share code, notes, and snippets.

@cardil
Last active February 15, 2023 12:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cardil/e86ba0793e4431be8375831da68ace84 to your computer and use it in GitHub Desktop.
Save cardil/e86ba0793e4431be8375831da68ace84 to your computer and use it in GitHub Desktop.
Fedora 37 shell for K8s
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: shell-cluster-admin
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: shell-cluster-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: shell-cluster-admin
namespace: REPLACE-ME
---
# kubectl apply -f f37-k8s-shell.yml
# kubectl exec -it shell
kind: Pod
apiVersion: v1
metadata:
name: shell
labels:
purpose: manual-inspection
spec:
containers:
- name: shell-f37
image: quay.io/fedora/fedora:37
command: ["/usr/bin/bash", "-c", "while true; do sleep 10; done"]
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "2Gi"
cpu: "1"
serviceAccount: shell-cluster-admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment