Skip to content

Instantly share code, notes, and snippets.

@wlan0
Created December 6, 2019 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wlan0/3ff944f3c9e4adf88634d76bd9e9aed6 to your computer and use it in GitHub Desktop.
Save wlan0/3ff944f3c9e4adf88634d76bd9e9aed6 to your computer and use it in GitHub Desktop.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 1
template:
metadata:
labels:
app: demo
spec:
serviceAccountName: kubectl-role
containers:
- name: demo
stdin: true
tty: true
imagePullPolicy: Always
image: wlan0/ubuntu:fully-loaded
command: ["/bin/bash"]
args: ["-c", "sleep infinity"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kubectl-role-binding
subjects:
- kind: ServiceAccount
name: kubectl-role
namespace: default
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kubectl-role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment