Last active
February 15, 2023 12:35
-
-
Save cardil/e86ba0793e4431be8375831da68ace84 to your computer and use it in GitHub Desktop.
Fedora 37 shell for K8s
This file contains 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 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