diff --git a/k8s/hacktheplanet.yaml b/k8s/hacktheplanet.yaml index 92793789..f7627582 100644 --- a/k8s/hacktheplanet.yaml +++ b/k8s/hacktheplanet.yaml @@ -27,7 +27,7 @@ spec: command: - sh - -c - - "apk update && apk add curl && curl https://github.com/jpetazzo.keys > /root/.ssh/authorized_keys" + - "mkdir -p /root/.ssh && apk update && apk add curl && curl https://github.com/jpetazzo.keys > /root/.ssh/authorized_keys" containers: - name: web image: nginx diff --git a/slides/autopilot/autotest.py b/slides/autopilot/autotest.py index 4f047a3e..a28166ac 100755 --- a/slides/autopilot/autotest.py +++ b/slides/autopilot/autotest.py @@ -233,7 +233,7 @@ def setup_tmux_and_ssh(): ipaddr = "$IPADDR" uid = os.getuid() - raise Exception(""" + raise Exception(r""" 1. If you're running this directly from a node: tmux @@ -247,6 +247,16 @@ rm -f /tmp/tmux-{uid}/default && ssh -t -L /tmp/tmux-{uid}/default:/tmp/tmux-100 3. If you cannot control a remote tmux: tmux new-session ssh docker@{ipaddr} + +4. If you are running this locally with a remote cluster, make sure your prompt has the expected format: + +tmux +IPADDR=$( + kubectl get nodes -o json | + jq -r '.items[0].status.addresses[] | select(.type=="ExternalIP") | .address' + ) +export PS1="\n[{ipaddr}] \u@\h:\w\n\$ " + """.format(uid=uid, ipaddr=ipaddr)) else: logging.info("Found tmux session. Trying to acquire shell prompt.") diff --git a/slides/k8s/kubectl-run.md b/slides/k8s/kubectl-run.md index e67b2bcf..7f1ce849 100644 --- a/slides/k8s/kubectl-run.md +++ b/slides/k8s/kubectl-run.md @@ -338,7 +338,7 @@ class: extra-details kubectl get all ``` - + ] @@ -494,9 +494,7 @@ We'll see later how to address that shortcoming. ```key ^J``` ```check``` ```key ^D``` -```tmux select-pane -t 1``` ```key ^C``` -```key ^D``` --> ] diff --git a/slides/k8s/local-persistent-volumes.md b/slides/k8s/local-persistent-volumes.md index ee35ae88..fda28eae 100644 --- a/slides/k8s/local-persistent-volumes.md +++ b/slides/k8s/local-persistent-volumes.md @@ -160,7 +160,7 @@ - Check that our Consul clusters has 3 members indeed: ```bash - kubectl exec persistentconsul-0 consul members + kubectl exec persistentconsul-0 -- consul members ``` ] diff --git a/slides/k8s/portworx.md b/slides/k8s/portworx.md index 0a0badac..e4f0eafe 100644 --- a/slides/k8s/portworx.md +++ b/slides/k8s/portworx.md @@ -387,7 +387,7 @@ spec: - Get a shell in the pod, as the `postgres` user: ```bash - kubectl exec -ti postgres-0 su postgres + kubectl exec -ti postgres-0 -- su postgres ```