Single host deployment

This deployment is only for learning and testing purposes.

The following instructions will help you set up a standalone Kubernetes cluster with Microk8s to deploy SD Elements on an Ubuntu based system that supports snaps.

Requirements

Minimal specifcations to support a single-node Kubernetes cluster and SD Elements

Software

  • Ubuntu 18.04 LTS or newer

    • snapd package installed

  • Helm 3.2 or newer

  • Microk8s v1.18.2 or newer

Hardware

  • 4 vCPU/cores

  • 8GB RAM

  • 40GB disk

Install Kubernetes (Microk8s)

  1. Install snaps

    sudo snap install microk8s --classic
    sudo snap install helm --classic
  2. Add current user to microk8s group

    sudo usermod -a -G microk8s "${USER}" && su - "${USER}"
  3. Enable required microk8s addons

    microk8s.enable dns dashboard storage ingress
  4. Configure kube

    microk8s.kubectl config view --raw > "${HOME}/.kube/config"

Configure and deploy SD Elements

  • See Helm for a guide on deploying, accessing, upgrading and undeploying SD Elements

  • See Configuration for a guide on configuring SD Elements

Accessing Microk8s Kubernetes Dashboard

By default, access is restricted to the virtual machine or host where Microk8s is deployed and running
  • Retrieve the Kubernetes admin credentials:

    grep -E "username|password" ~/.kube/config
  • Retrieve the Kubernetes token. Store the token name in a variable, then print token:

    token="$(microk8s.kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)" && microk8s.kubectl -n kube-system describe secret "${token}"  | grep "token:"
  • Browse to the Kubernetes dashboard at the following url (same IP_or_hostname used for link:Access SDE] above):

    https://<IP_or_hostname>:16443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#/login
    • Enter the admin username and password to login when prompted

    • On the Kubernetes Dashboard screen, select Token and enter it

    • Click Sign in

Common tasks

See the Common Tasks page for detailed information on tasks that you may need to perform to manage SD Elements.

Remember to use the microk8s.kubectl command when you need to run kubectl in a single-host Microk8s deployment.

results matching ""

    No results matching ""