Minor updates after LKE testing

This commit is contained in:
Jerome Petazzoni
2020-08-12 19:22:57 +02:00
parent 4ded8c699d
commit 7d96562042
6 changed files with 17 additions and 9 deletions

View File

@@ -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

View File

@@ -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.")

View File

@@ -338,7 +338,7 @@ class: extra-details
kubectl get all
```
<!-- ```hide kubectl wait pod --selector=run=pingpong --for condition=ready ``` -->
<!-- ```hide kubectl wait pod --selector=app=pingpong --for condition=ready ``` -->
]
@@ -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```
-->
]

View File

@@ -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
```
]

View File

@@ -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
```
<!--
@@ -577,7 +577,7 @@ By "disrupt" we mean: "disconnect it from the network".
- Get a shell on the pod:
```bash
kubectl exec -ti postgres-0 su postgres
kubectl exec -ti postgres-0 -- su postgres
```
<!--

View File

@@ -297,7 +297,7 @@ nodes and encryption of gossip traffic) were removed for simplicity.
- Check the health of the cluster:
```bash
kubectl exec consul-0 consul members
kubectl exec consul-0 -- consul members
```
]