So you are following a long tutorial…
And you are getting bloody tired of copying and pasting all the YAMLs… urgh.
What if I told you I can make your work 50% less painful? Would you pay me a coffee? β
Here’s the YAML:
apiVersion: v1
kind: Pod
metadata:
name: definitely-not-prod
labels:
owner: "friday-5pm-dev"
spec:
containers:
- name: chaos-container
image: busybox
command: ["sh", "-c", "echo 'Deploying... just kidding!' && sleep 3600"]
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo 'Context set correctly?'"]
preStop:
exec:
command: ["/bin/sh", "-c", "echo 'Goodbye, cruel cluster!'"]
restartPolicy: Never
nodeSelector:
coffee-supply: "critical"
Copy it, then pipe your clipboard straight into kubectl:
pbpaste | k apply -f-
TadΓ‘! Works like a charm

Now be careful with what you copy π«‘