OCF's kubernetes setup can be intimidating to newcomers, but it's important to learn because a good amount of our infra is on there!
OCF ArgoCD URL: https://argo.ocf.io
Accessing the k8s cluster:¶
- SSH into the staff login server (koi)
- Run
tsh login --proxy tele.ocf.io:443 --bind-addr=127.0.0.1:4242 --browser=none --auth=ocfauth tele.ocf.ioon koi. - Then, run
ssh -L 4242:localhost:4242 -N koion your local host that can open a browser. - Open the URL which tsh login had outputted on
koiin your local browser, which should log you into Teleport. You can now close the ssh tunnel on local host. - Now, back on koi from now on:
export KUBECONFIG=${HOME?}/teleport-kubeconfig.yaml tsh kube login dna.ocf.io- If running
kubectl get podsshowsNo resources found in default namespace., you're good to go!
There is a web dashboard available at tele.ocf.io that also contains similar instructions. Be sure to use OCF OIDC to log in (at the bottom of the options).
k9s¶
You can continue using kubectl to interact with the cluster, but k9s is also a nice tui option. Run k9s to open it.
k9s has vim-like keybinds:
:qto quit:nsto view available namespaces- scroll with
jandkdown to theocfwebnamespace (you can also scroll with your mouse). Press enter. - You are now viewing the pods for
ocfweb; press enter on one to see its containers. Pressesc(maybe twice) to go back to the previous page. - Press
lto see the logs for that pod. Usejandkto scroll through them. - Press
don the pod to get additional information about it. - see more keybinds: k9scli.io/topics/commands
If you kill a pod, argocd should recreate it according to the cluster state defined in ocf/kubernetes. Don't go around restarting or deleting pods unless you have time to fix them, in case it isn't restarted properly!!