Skip to content

Instantly share code, notes, and snippets.

@geekbass
Last active June 29, 2021 19:06
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 geekbass/acbd8f9bcc83ab3e4264da6be77c147f to your computer and use it in GitHub Desktop.
Save geekbass/acbd8f9bcc83ab3e4264da6be77c147f to your computer and use it in GitHub Desktop.
kubectl debug Commands

Useful Kubectl Commands

kubectl run -i --tty --rm debug --image=curlimages/curl --restart=Never -- www.google.com -vvv

kubectl run -i --tty --rm debug --image=busybox --restart=Never -- sh


Testing Volume Mount from Configmap

---
apiVersion: v1
kind: Pod
metadata:
  name: busybox1
  namespace: spark
  labels:
    app: busybox1
spec:
  containers:
  - image: busybox
    command:
      - sleep
      - "3600"
    imagePullPolicy: IfNotPresent
    name: busybox
    volumeMounts:
      - name: executor-template
        mountPath: "/opt/spark/configs"
        readOnly: true
  restartPolicy: Always
  volumes:
    - name: executor-template
      configMap:
        name: spark-executor-template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment