The following example shows how to run the sshare server
on a Kubernetes cluster.
- nginx-ingress
-
Adjust the
sshare_server.yaml
to your Kubernetes cluster configuration. The thing that has to be changed is the domain name supported by your nginx-ingress configuration. You can do this by changing the value of the--backend-domain
flag. -
Generate TLS certificates
You can use the certs.sh
script to generate TLS certificates. In the san.cnf
configuration file you can define the DNS name that is used to connect to the server..
$ ./certs.sh
- Create a secret with certificates
$ kubectl create ns sshare
$ kubectl -n sshare create secret generic tls --from-file=ca.pem=./ca-cert.pem --from-file=cert.pem=./server-cert.pem --from-file=key.pem=./server-key.pem
- Deploy the
sshare server
.
$ kubectl create -f sshare_server.yaml
The server is exposed by a service of the LoadBalancer
type
That's all. The only thing left to do is add a record to your DNS that will be used to connect to the server.