Spotfire Cloud Deployment Kit HTTPS with Minikube Ingress Quick-Start Guide

Spotfire Cloud Deployment Kit HTTPS with Minikube Ingress Quick-Start Guide

book

Article ID: KB0070420

calendar_today

Updated On:

Products Versions
Spotfire Server 12.4.0 and later

Description

This article assumes you have followed the instructions at..

https://support.tibco.com/s/article/Spotfire-Cloud-Deployment-Kit-with-Minikube-Quick-Start-Guide

..to get a basic Spotfire Server up and running in a local Minikube Kubernetes cluster. 

Follow the steps below to make this server accessible via the secure HTTPS protocol. In this case, the Minikube Ingress addon is used.

Environment

Linux

Resolution

1. First, install the mkcert utility. For example, on AlmaLinux:
 
$ sudo dnf -y install nss-tools
$ curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
$ chmod +x mkcert-v*-linux-amd64
$ sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert

2. Create the certificate and key for your Spotfire host
 
$ mkcert mymachine.company.com

This will create the following files:
  • mymachine.company.com-key.pem
  • mymachine.company.com.pem
  
3. Create a Kubernetes secret using the certificate and key you created in the previous step:
  
$ kubectl -n kube-system create secret tls mymachine --key mymachine.company.com-key.pem  --cert mymachine.company.com.pem

4. Configure the Minikube Ingress addon, and enter the secret name ('kube-system/mymachine') when prompted:
 
$ minikube addons configure ingress

(enter: kube-system/mymachine)

$ minikube addons enable ingress

5. Upgrade the Spotfire Server with the additional options needed to use the Ingress:
 
$ helm upgrade tss1240remotedb . \
    --set acceptEUA=true \
    --set global.spotfire.image.pullPolicy="Never" \
    --set database.bootstrap.databaseUrl="jdbc:postgresql://vanilla-tssdb-postgresql.default.svc.cluster.local/" \
    --set database.create-db.databaseUrl="jdbc:postgresql://vanilla-tssdb-postgresql.default.svc.cluster.local/" \
    --set database.create-db.adminUsername="postgres" \
    --set database.create-db.adminPassword="$POSTGRES_PASSWORD" \
    --set database.create-db.enabled=true \
    --set configuration.site.publicAddress="https://mymachine.company.com:4443" \
    --set ingress.enabled="true" \
    --set ingress.hosts[0].host="mymachine.company.com" \
    --set haproxy.service.type="LoadBalancer" \
    --set ingress.tls[0].hosts[0]="mymachine.company.com" \
    --set ingress.tls[0].secretName="mymachine"

6. Wait a few minutes, then confirm that the Ingress is available:
 
$ kubectl get ing
NAME                              CLASS   HOSTS                        ADDRESS        PORTS     AGE
tss1240remotedb-spotfire-server   nginx   mymachine.company.com        192.168.49.2   80, 443   112s

7. In a separate terminal, forward the local tcp port 4443 to the K8s port configured for the nginx Ingress controller (which is 443 by default):
 
$ kubectl port-forward --address 0.0.0.0 deployment/ingress-nginx-controller 4443:443 --namespace ingress-nginx

8. In a web browser, navigate to the server's public address that you configured above:

https://mymachine.company.com:4443
 

Issue/Introduction

Details the steps needed to upgrade an existing Spotfire Server, deployed in a local Minikube Kubernetes (K8s) cluster, to make it accessible via the secure HTTPS protocol. This is accomplished by using the Spotfire Cloud Deployment Kit (CDK) and the Minikube Ingress addon.