Skip to content

Instantly share code, notes, and snippets.

@robgmills
Last active July 29, 2020 21:12
Show Gist options
  • Select an option

  • Save robgmills/9beeb901d94de3a1be43ef00d63510aa to your computer and use it in GitHub Desktop.

Select an option

Save robgmills/9beeb901d94de3a1be43ef00d63510aa to your computer and use it in GitHub Desktop.

Revisions

  1. robgmills revised this gist Jul 29, 2020. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -17,4 +17,20 @@ Run the following in a terminal:
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/netbox.yaml && \
    kubectl exec -it -n default netbox -- /bin/bash && \
    kubectl delete pod -n default netbox
    ```

    Or, add the following to your `.bashrc` or `.zshrc`:

    ```sh
    function debugk() {
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/netbox.yaml && \
    kubectl exec -it -n default netbox -- /bin/bash && \
    kubectl delete pod -n default netbox
    }
    ```

    And call it like so:

    ```sh
    debugk
    ```
  2. robgmills revised this gist Jul 29, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ It contains common network troubleshooting tools:
    Run the following in a terminal:

    ```sh
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/netbox.yaml/netbox.yaml && \
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/netbox.yaml && \
    kubectl exec -it -n default netbox -- /bin/bash && \
    kubectl delete pod -n default netbox
    ```
  3. robgmills revised this gist Jul 29, 2020. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ It contains common network troubleshooting tools:
    Run the following in a terminal:

    ```sh
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/c4f8f6fec6d19b0bd39775d54c058615fd375776/netbox.yaml && \
    kubectl exec -it -n default netbox -- /bin/bash
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/netbox.yaml/netbox.yaml && \
    kubectl exec -it -n default netbox -- /bin/bash && \
    kubectl delete pod -n default netbox
    ```
  4. robgmills revised this gist Jul 29, 2020. 2 changed files with 20 additions and 1 deletion.
    19 changes: 19 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    # Network Troubleshooting For Kubernetes

    This Kubernetes Pod descriptor will deploy a pod to your kubernetes cluster.

    It contains common network troubleshooting tools:

    - dig
    - netcat
    - curl
    - nslookup

    ## Instructions

    Run the following in a terminal:

    ```sh
    kubectl apply -f https://gist.githubusercontent.com/robgmills/9beeb901d94de3a1be43ef00d63510aa/raw/c4f8f6fec6d19b0bd39775d54c058615fd375776/netbox.yaml && \
    kubectl exec -it -n default netbox -- /bin/bash
    ```
    2 changes: 1 addition & 1 deletion netbox.yaml
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ apiVersion: v1
    kind: Pod
    metadata:
    name: netbox
    namespace: ops
    namespace: default
    spec:
    containers:
    - name: netbox
  5. robgmills created this gist Jul 29, 2020.
    14 changes: 14 additions & 0 deletions netbox.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    apiVersion: v1
    kind: Pod
    metadata:
    name: netbox
    namespace: ops
    spec:
    containers:
    - name: netbox
    image: dj80hd/mybb
    command:
    - sleep
    - "3600"
    imagePullPolicy: IfNotPresent
    restartPolicy: Always