Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

Explore

mawinkler edited this page Jan 28, 2020 · 5 revisions

SSH to the instances

If you want to ssh to instances with a public ip simply do

ssh <Instance IP>

while being logged on to your Ansible server as the user ansible.

To ssh to a private instance you need to use the jumphost as a ssh proxy. The command for this is

ssh -o ProxyCommand="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p ansible@< Public Jumphost IP >" ansible@< Private Instance IP >

Remember:

  • SSH user is always ansible
  • Workload user is either root (RedHat) or ubuntu (Ubuntu)

Query Kubernetes

SSH to the kubernetes master and switch to user ubuntu.

ssh <Kubernetes Master Public IP>
sudo su - ubuntu

Afterwards you have admin privileges on the cluster.

Some basic queries:

kubectl get nodes
watch 'kubectl get pods --all-namespaces -o wide'
watch 'kubectl get pods -n smartcheck -o wide && echo && kubectl get services -n smartcheck -o wide'
kubectl get pods --all-namespaces -o wide --show-labels && \
    echo && kubectl get services --all-namespaces -o wide && \
    echo && kubectl get nodes
kubectl -n jenkins get pod --no-headers -o custom-columns=":metadata.name" | grep jenkins

Query the Cluster Registry

From any location do a curl with the following syntax:

  • Username and Password as configured in your site_secrets.yml
  • If the jumphost does own the public IP address 3.125.0.91
  • Replace the dots with dashes (3-125-0-91)

The full curl command will then look like:

curl -X GET https://username:password@registry.3-125-0-91.nip.io/v2/_catalog
Clone this wiki locally