Deckhouse Platform in Yandex.Cloud

Access cluster Kubernetes API

Deckhouse have just finished installation process of your cluster. Now you can connect to master via ssh. To do, so you need to get master IP either from dhctl logs or from cloud provider web interface/cli tool.

ssh ubuntu@<MASTER_IP>
ssh ubuntu@<MASTER_IP>

You can run kubectl on master node from the root user. This is not secure way and we recommend to configure external access to Kubernetes API later.

sudo -i
kubectl get nodes
sudo -i kubectl get nodes

Access cluster using NGINX Ingress

IngressNginxController was created during the installation process of the cluster. The only thing left is to configure access to web interfaces of components that are already installed in the cluster (Grafana, Prometheus, Dashboard, etc.). LoadBalancer is already created, and you just need to point a DNS domain to it. First, you need to connect to your master node as described previously.

Get the IP address of the load balancer. Run the following command from the root user:

BALANCER_IP=$(kubectl -n d8-ingress-nginx get svc nginx-load-balancer -o json | jq -r '.status.loadBalancer.ingress[0].ip')
echo "$BALANCER_IP"
BALANCER_IP=$(kubectl -n d8-ingress-nginx get svc nginx-load-balancer -o json | jq -r '.status.loadBalancer.ingress[0].ip') echo "$BALANCER_IP"

Point a DNS domain you specified in the “Cluster Installation” step to Deckhouse web interfaces in one of the following ways:

  • If you have the DNS server and you can add a DNS records:
    • If your cluster DNS name template is a wildcard DNS (e.g. - %s.kube.my), then add a corresponding wildcard A record containing the IP of load balancer (BALANCER_IP), you've discovered previously.
    • If your cluster DNS name template is NOT a wildcard DNS (e.g. - %s-kube.company.my), then add А or CNAME records containing the IP of load balancer (BALANCER_IP), you've discovered previously, for the following Deckhouse service DNS names:
      dashboard.example.com
      deckhouse.example.com
      dex.example.com
      grafana.example.com
      kubeconfig.example.com
      status.example.com
      upmeter.example.com
      
  • If you don't have a DNS server, add static records to the file /etc/hosts on your PC (%SystemRoot%\system32\drivers\etc\hosts for Windows).

    To add records to the /etc/hosts file locally, follow these steps:

    • Export the BALANCER_IP variable by specifying the IP address you got:

      export BALANCER_IP="<PUT_BALANCER_IP_HERE>"
      
      export BALANCER_IP="<PUT_BALANCER_IP_HERE>"
    • Add DNS records for the Deckhouse services:

      sudo -E bash -c "cat <<EOF >> /etc/hosts
      $BALANCER_IP dashboard.example.com
      $BALANCER_IP deckhouse.example.com
      $BALANCER_IP dex.example.com
      $BALANCER_IP grafana.example.com
      $BALANCER_IP kubeconfig.example.com
      $BALANCER_IP status.example.com
      $BALANCER_IP upmeter.example.com
      EOF
      "
      
      sudo -E bash -c "cat <<EOF >> /etc/hosts $BALANCER_IP dashboard.example.com $BALANCER_IP deckhouse.example.com $BALANCER_IP dex.example.com $BALANCER_IP grafana.example.com $BALANCER_IP kubeconfig.example.com $BALANCER_IP status.example.com $BALANCER_IP upmeter.example.com EOF "