This repo includes a Dockerfile and Kubernetes StatefulSet to set up a pod that can be used as a shared pairing environment. To use it, follow the following steps:
-
Build the
Dockerfile
withdocker build -t some/tag .
-
Edit
statefulset.yaml
to use image tag you specified when building the image (TODO: can we publish a shared image tokubernetes-dev
?)- NOTE: you may also have to edit the
storageClassName
for thevolumeClaimTemplate
to match a valid storage class where you are running the image. For example, to run this on a localk3s
cluster you would need to change it to belocal-disk
.
- NOTE: you may also have to edit the
-
Run
kubectl apply -f statefulset.yaml
-
Run
k exec -it -n grafana-dev pair-box-0 -- /bin/bash
in order to set up a few things in the box:-
Run
passwd pair
to setup a password for the pair account -
Copy your public ssh key into
/home/pair/.ssh/authorized_keys
-
-
Put the following in your SSH config (
~/.ssh/config
)Host pair-box ProxyCommand kubectl --kubeconfig=$HOME/.kube/config exec -i pods/pair-box-0 -- /usr/sbin/sshd -i HostName pair-box User pair ServerAliveInterval 300 ServerAliveCountMax 2