Skip to content

Instantly share code, notes, and snippets.

@wlan0
Created December 6, 2019 20:20
Show Gist options
  • Save wlan0/710377c3ad1fca20fdc1ccfa37c057ee to your computer and use it in GitHub Desktop.
Save wlan0/710377c3ad1fca20fdc1ccfa37c057ee to your computer and use it in GitHub Desktop.
#!/bin/bash
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 3
template:
metadata:
labels:
app: demo
spec:
serviceAccountName: kubectl-role
containers:
- name: demo
imagePullPolicy: Always
image: wlan0/ubuntu:fully-loaded
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: demo
subjects:
- kind: ServiceAccount
name: demo
namespace: default
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment