Deckhouse Platform on VMware vSphere: Getting access to the cluster

Accessing the master node

Deckhouse has finished the installation process. It remains to make some settings, for which you need to connect to the master node.

Connect to the master node via SSH (the IP address of the master node was printed by the installer upon completion of the installation, but you can also find it using the cloud provider web interface/CLI tool):

ssh ubuntu@<MASTER_IP>

Check that d8 k works by displaying a list of cluster nodes:

sudo -i d8 k get nodes

Example of the output...

$ sudo -i d8 k get nodes
NAME                                     STATUS   ROLES                  AGE   VERSION
cloud-demo-master-0                      Ready    control-plane,master   12h   v1.33.13
cloud-demo-worker-01a5df48-84549-jwxwm   Ready    worker                 12h   v1.33.13

To increase the number of worker nodes, modify the parameter maxPerZone in the worker NodeGroup using CLI (d8 k edit ng worker) or the admin web UI. To add additional nodes, refer to the cluster scaling guide.

It may take some time to start the Ingress controller after installing Deckhouse. Make sure that the Ingress controller has started before continuing:

sudo -i d8 k -n d8-ingress-nginx get po

Wait for the pods to switch to the Ready state.

Example of the output...

$ sudo -i d8 k -n d8-ingress-nginx get po
NAME                                       READY   STATUS    RESTARTS   AGE
controller-nginx-r6hxc                     3/3     Running   0          16h
kruise-controller-manager-78786f57-82wph   3/3     Running   0          16h

DNS

To access the web interfaces of Deckhouse services, you need to:

The DNS names template is used to configure Ingress resources of system applications. For example, the name grafana is assigned to the Grafana interface. Then, for the template %s.kube.company.my Grafana will be available at grafana.kube.company.my, etc.

Configure DNS for Deckhouse services using one of the following methods:

  • Wildcard DNS record
  • Individual DNS records
  • Hosts file

Use this option if you have a DNS server and your cluster DNS name template is a wildcard template (e.g., %s.kube.company.my).

On the DNS server, add a wildcard A record containing the IP address of the master node.

Use this option if you have a DNS server and your cluster DNS name template is not a wildcard template (e.g., %s-kube.company.my).

On the DNS server, add A or CNAME records containing the address of the master node for the following DNS names:

  • api
  • code
  • commander
  • console
  • dex
  • documentation
  • grafana
  • hubble
  • istio
  • istio-api-proxy
  • kubeconfig
  • openvpn-admin
  • prometheus
  • registry
  • status
  • stronghold
  • tools
  • upmeter

The list above contains the DNS names that a cluster deployed using this guide requires. The complete list is given in the “List of Reserved Deckhouse Platform DNS Names” section of the documentation.

Use this option if you don’t have a DNS server. On the computer from which you need access to Deckhouse services, add static records to the hosts file (/etc/hosts for Linux, %SystemRoot%\system32\drivers\etc\hosts for Windows).

To get the command for adding the records, use the hosts file data generator: enter the DNS name template and the IP address of the master node.

Then, run the following command on the master node (specify the template for DNS names to use in the DOMAIN_TEMPLATE variable):

DOMAIN_TEMPLATE='<DOMAIN_TEMPLATE>'
sudo -i d8 k patch mc global --type merge -p "{\"spec\": {\"settings\":{\"modules\":{\"publicDomainTemplate\":\"${DOMAIN_TEMPLATE}\"}}}}"

Configuring remote access to the cluster

On a personal computer follow these steps to configure the connection of kubectl to the cluster:

  • Open Kubeconfig Generator web interface. The name kubeconfig is reserved for it, and the address for access is formed according to the DNS names template (which you set up earlier). For example, for the DNS name template %s.1.2.3.4.sslip.io, the Kubeconfig Generator web interface will be available at https://kubeconfig.1.2.3.4.sslip.io.
  • Log in as a user admin@deckhouse.io. The user password generated in the previous step is <GENERATED_PASSWORD> (you can also find it in the User manifest in the config.yml file).
  • Select the tab with the OS of the personal computer.
  • Sequentially copy and execute the commands given on the page.
  • Check that kubectl connects to the cluster (for example, execute the command kubectl get no).