Last active
September 25, 2020 19:55
-
-
Save leoluz/7a074478734aa5965803f63c54b9b17b to your computer and use it in GitHub Desktop.
create a pod that starts a shell and stops when exiting
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
# Run a pod and exec into it to run curl commands. Pod will self delete on exit. | |
kubectl run curlpod-debug -i --tty --image=appropriate/curl --restart=Never --rm -- sh | |
# To run in a specific node: | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: curlpod-debug | |
labels: | |
app: curl-debug | |
spec: | |
nodeSelector: | |
kubernetes.io/hostname: NODE_NAME | |
containers: | |
- name: curl | |
image: appropriate/curl | |
imagePullPolicy: IfNotPresent | |
command: | |
- sleep | |
- "3600" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment