Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
minLevel1
maxLevel7

Prerequisites

Please check here for installation requirements

K3s Installation

Installation

All the commands in this runbook were tested against a VM with Canonical, Ubuntu, 20.04 LTS, amd64 as root.

Document Details

...

Prepared By

...

Reviewed By

...

Date

...

Document Version

...

Software Version

...

Christopher Oliver

...

Artem Kalaitan

...

11-July-2022

...

V 1

...

.

...

Introduction

...

  1. Install K3s and wait for the pods to become ready:

    Code Block
    languagebash

...

  1. curl -sfL https://

...

  1. assets.master.k3s

...

  1. .getvisibility.com/k3s/k3s.sh | INSTALL_K3S_VERSION="v1.

...

  1. 26.

...

  1. 10+k3s1" K3S_KUBECONFIG_MODE="644" sh -s - server --node-name=local-01
    

...

  1. 
    kubectl get deploy -n kube-system --output name | xargs -n1 -t kubectl rollout status -n kube-system
  2. Install Helm 3:

    Code Block
    languagebash

...

  1. wget --quiet https://raw.githubusercontent.com/helm/helm/master/scripts/get -O /tmp/get_helm.sh \
    && chmod 0755 /tmp/get_helm.sh \
    && /tmp/get_helm.sh -v v3.8.2
  2. Configure GetVisibility private Docker image registry (replace $USERNAME and $PASSWORD with the Docker credentials provided):

    Code Block
    languagebash

...

  1. kubectl create secret docker-registry gv-docker-registry \
      --docker-server=https://images.master.k3s.getvisibility.com \
      --docker-username=

...

  1. gvimages \
      --docker-password=

...

  1. $GVIMAGES_PASSWORD \
      --docker-email=no@email.com
  2. Configure GetVisibility private Helm repository (replace $USERNAME and $PASSWORD with the Helm credentials provided):

    Code Block
    languagebash

...

  1. helm repo add gv_stable https://charts.master.k3s.getvisibility.com/stable --username 

...

  1. gvcharts --password 

...

  1. $GVCHARTS_PASSWORD
    

...

  1. 
    helm repo update
  2. Install chart GetVisibility Essentials and wait for the pods to become ready.
    For Synergy (32 GB RAM machines), please replace keycloak.url= IPADDRESS/DNS/FQDN with IP Adress or FQDN or DNS name for Keycloak in formats like below
    https://192.168.10.1 or https://gv.domain.local or https://gv.getvisibility.com

    Code Block
    languagebash

...

  1. helm upgrade --install gv-essentials gv_stable/gv-essentials --wait \
    --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --set eck-operator.enabled=true --set eck-operator.settings.cpu=1 \
    --set eck-operator.settings.memory=1 --set eck-operator.settings.storage=40 \
    --set updateclusterid.enabled=false --set keycloak.url=IPADDRESS/DNS/FQDN
    
    kubectl get deploy --output name | xargs -n1 -t kubectl rollout status

    For Focus and Enterprise (48+ GB RAM machines), please replace keycloak.url= IPADDRESS/DNS/FQDN with IP Adress or FQDN or DNS name for Keycloak in formats like below
    https://192.168.10.1 or https://gv.domain.local or https://gv.getvisibility.com

    Code Block
    helm upgrade --install gv-essentials gv_stable/gv-essentials --wait \
    --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml

...

  1.  \
    --set eck-operator.enabled=true --set eck-operator.settings.cpu=8 \
    --set eck-operator.settings.memory=20 --set eck-operator.settings.storage=160 \
    --set updateclusterid.enabled=false --set keycloak.url= IPADDRESS/DNS/FQDN
    
    kubectl get deploy --output name | xargs -n1 -t kubectl rollout status
  2. Depending on the theme you want to use, run one of the commands below to install the chart GV Platform (don’t forget to replace $PRODUCT with either synergy or focus or enterprise):

    1. GetVisibility theme:

      Code Block
      languagebash

...

    1. helm upgrade --install gv-platform gv_stable/gv-platform --wait \
      --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \
      --set-string clusterLabels.environment=prod \
      --set-string clusterLabels.cluster_reseller=getvisibility \
      --set-string clusterLabels.cluster_name=mycluster \
      --set-string clusterLabels.product=

...

    1. $PRODUCT
    2. Forcepoint theme:

      Code Block
      languagebash

...

    1. helm upgrade --install gv-platform gv_stable/gv-platform --wait \
      --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \
      --set-string clusterLabels.environment=prod \
      --set-string clusterLabels.cluster_reseller=forcepoint \
      --set-string clusterLabels.cluster_name=mycluster \
      --set-string clusterLabels.product=

...

    1. $PRODUCT

Upgrade

GV Essentials

In order to upgrade the essential services (e.g. Postgres, Kafka, MongoDB, Consul) run helm repo update and then the same command you used in step 5.

Synergy/Focus/Enterprise

In order to upgrade Synergy/Focus/Enterprise run helm repo update and then the same command you used in step 6.

Monitoring

You can optionally also install monitoring tools to collect metrics and logs of all services that are running inside the cluster:

  1. Install the CRDs:

    Code Block
    languagebash

...

  1. helm upgrade --install rancher-monitoring-crd gv_stable/rancher-monitoring-crd --wait \
    --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --namespace=cattle-monitoring-system \
    --version=100.

...

  1. 6.

...

  1. 6+up19.0.

...

  1. 18 \
    --create-namespace
  2. Install the monitoring tools:

    Code Block
    languagebash

...

  1. helm upgrade --install rancher-monitoring gv_stable/rancher-monitoring --wait \
    --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --namespace=cattle-monitoring-system \
    --version=100.

...

  1. 6.

...

  1. 6+up19.0.

...

  1. 18 \
    --set k3sServer.enabled=true \
    --set k3sControllerManager.enabled=true \
    --set k3sScheduler.enabled=true \
    --set k3sProxy.enabled=true
    --set prometheus.retention=5

To access the Grafana dashboard run the command kubectl port-forward svc/rancher-monitoring-grafana -n cattle-monitoring-system 3001:80 --address='0.0.0.0' and in your browser type the address http://$SERVER_IP:3001.

To access Prometheus dashboard run the command kubectl port-forward svc/rancher-monitoring-prometheus -n cattle-monitoring-system 3001:9090 --address='0.0.0.0' and in your browser type the address http://$SERVER_IP:3001.

...

Info

To expose Grafana via an ingress on the path /grafana (allowing access through https://IPADDRESS_or_DNSNAME/grafana), add the following flag to the monitoring installation command:

Code Block
--set global.grafana_ingress.enabled=true

Info

Add --debug to any helm upgrade command to show exactly what it’s waiting for. This is particularly useful to troubleshoot timeout limit exceeded errors.