# Enterprise HA Cluster

# Need HA/Failover? High Performance Load Balancing?

Email [email protected]

# Professional Installation support is available for clustered installs.

"Please contact [email protected] for the latest guidelines around Kubernetes installations.

# Architecture


# Deploy 3 Linux Servers

I am using CentOS 9 Stream in this example, you can use any distro you want, contact [email protected] to discuss the minor changes around your preferred distro.

Configure your own DNS, Static IPs, etc.

# On ALL Nodes - Bootstrap script

CentOS only Run this script to install kubectl, helm, and k9s, git and disable firewall.

curl https://raw.githubusercontent.com/calltelemetry/calltelemetry/master/ha-scripts/centos_prep.sh | sh

# Install First K3s Master Node

cd calltelemetry/ha-scripts
# Edit your master.sh file with your own variables. Just a couple IPs and passwords. See comments inside the file.

# Install K3s Masters 2 and 3

# On secondary nodes:
cd calltelemetry/ha-scripts
# Edit the secondary.sh file - change the IP to be your master

Check the health of the nodes before continuing - all should say running.

calltelemetry@hp-k3s-1:~$ kubectl get nodes
NAME       STATUS   ROLES                       AGE     VERSION
ct-node-1   Ready    control-plane,etcd,master   4m36s   v1.20.0+k3s2
ct-node-2   Ready    control-plane,etcd,master   40s     v1.20.0+k3s2
ct-node-3   Ready    control-plane,etcd,master   19s     v1.20.0+k3s2

# Run Post-Install Script

Scales up a couple resources to fill out your 3 node cluster. (Run this on Node 1)

kubectl port-forward -n pgo svc/postgres-operator 8443:8443 &
curl https://raw.githubusercontent.com/calltelemetry/calltelemetry/master/ha-scripts/post_install.sh | sh

Wait a moment and check your SQL cluster

pgo test ctsql

cluster : ctsql
		primary ( UP
		replica ( UP
		primary (ctsql-6895cd4bb-2f524): UP
		replica (ctsql-iulc-75ccc767c7-wwd2k): UP
		replica (ctsql-yzgz-8689bb9998-c2mlf): UP

Check the deployment - you should see 3 CallTelemetry-web servers running.

kubectl get pods

NAME                      READY   STATUS    RESTARTS   AGE
calltelemetry-web-fqlv5   1/1     Running   0          4m21s
calltelemetry-web-gp2f9   1/1     Running   0          4m21s
calltelemetry-web-zbkk6   1/1     Running   0          4m21s
svclb-traefik-4ngn8       2/2     Running   0          16m
svclb-traefik-6pmjw       2/2     Running   0          16m
svclb-traefik-chqsw       2/2     Running   0          16m
traefik-99bfb8458-8xdvj   1/1     Running   0          16m

Check your IPs assigned, you should see your IPs listed here

kubectl get services

NAME                      TYPE           CLUSTER-IP      EXTERNAL-IP       PORT(S)                      AGE
calltelemetry-primary     LoadBalancer   80:30609/TCP,22:32207/TCP    13m
calltelemetry-secondary   LoadBalancer   80:32049/TCP,22:32124/TCP    13m
kubernetes                ClusterIP       <none>            443/TCP                      2d18h
traefik                   LoadBalancer   80:31050/TCP,443:30731/TCP   22h

Setup DNS records to point to your 2 VIP IP Addresses for load balancing- primary and secondary. Open a web browser to http://admin_cluster_IP and create an account.

Use these 2 VIP ecords for the CURRI API and CDR, and the cluster admin for management.

# Appendix / Troubleshooting

# If you need to find your SQL Password

In our case, the password for postgres user is calltelemetry

/snap/bin/kubectl port-forward -n pgo svc/postgres-operator 8443:8443 &
pgo show user -n pgo ctsql --show-system-accounts

------- ----------- ------------------------ ------- ------ -----
ctsql   crunchyadm                           never   ok
ctsql   postgres    calltelemetry            never   ok
ctsql   primaryuser random_pass never   ok
ctsql   testuser    random_pass never   ok

# SQL - Crunchy Data PostgreSQL Operator

Cruncy Data PostgreSQL Operator Github (opens new window)

Crunch Data PostgreSQL Operator Docs (opens new window)

Cruncy Data PostgreSQL Quickstart (opens new window)

Last Updated: 9/1/2023, 6:09:25 PM