Skip to content

Instantly share code, notes, and snippets.

@surajssd
Last active March 19, 2020 12:22
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 surajssd/8bb92f2a2489fd5ce70fa37be89efdf7 to your computer and use it in GitHub Desktop.
Save surajssd/8bb92f2a2489fd5ce70fa37be89efdf7 to your computer and use it in GitHub Desktop.
A deployment that fails constantly
echo '
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: bash
name: bash
spec:
replicas: 1
selector:
matchLabels:
run: bash
template:
metadata:
labels:
run: bash
spec:
containers:
- image: debian
name: bash
command: ["/bin/sh"]
args: ["-c", "sleep 5 && exit 1"]
' | k apply -f -
echo '
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: privileged-psp-default
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-psp
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:serviceaccounts:default
' | k apply -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment