Last active
December 17, 2024 17:51
-
-
Save cardil/e86ba0793e4431be8375831da68ace84 to your computer and use it in GitHub Desktop.
Fedora 41 shell for K8s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 fedora-k8s-shell.yml | |
# kubectl exec -it shell | |
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: shell | |
labels: | |
purpose: manual-inspection | |
spec: | |
containers: | |
- name: shell | |
image: quay.io/fedora/fedora:41 | |
command: ["/usr/bin/bash", "-c", "while true; do sleep 10; done"] | |
securityContext: | |
runAsUser: 0 | |
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