Rancher Kubernetes Engine#
Overview#
This is a tutorial to walk you through installing Gluu cloud native edition on RKE on a ubuntu 20.04.
Instructions#
Note
Please use a registered FQDN. If you don't, follow instructions here.
-
Create instances to cover at minimum 8 cpu and 16 GB ram.
-
Follow instructions here to install RKE. Please do not run
./rke up
until next step is executed. -
You should have generated a
cluster.yml
following instructions above. Please open that file and add the following under theservices
-->kubelet
-->extra_binds
, as we use OpenEBS for volumes on RKE.services: kubelet: extra_binds: - /var/openebs/local:/var/openebs/local - /etc/iscsi:/etc/iscsi - /bin/iscsiadm:/bin/iscsiadm - /var/lib/iscsi:/var/lib/iscsi - /lib/modules - /var/openebs/sparse:/var/openebs/sparse - /var/openebs/local:/var/openebs/local - /mnt/openebs/local:/mnt/openebs/local - /opt/openebs/local:/opt/openebs/local
-
Now you can bring your cluster up
./rke up
. -
You should have a running Kubernetes cluster now. You may add or remove nodes as necessary.
-
Follow instructions here to install openEBS.
-
Make sure that the instances has permissions as required by RKE to fully communicate with the intended cloud.
-
Download
pygluu-kubernetes.pyz
. This package can be built manually. -
Optional: If using couchbase as the persistence backend. Download the couchbase kubernetes operator package for linux and place it in the same directory as
pygluu-kubernetes.pyz
-
Run :
./pygluu-kubernetes.pyz install
Note
Use local deployment on a manually created kubernetes cluster when prompted.
Exposing the UI:#
Exposing the UI is not necessary but you may do so by following these steps:
-
Create a single point of entry ( Load balancer) for your cluster. Please note that if you have given the instances permissions to act on the cloud the load balancer should have already been created and hence the following steps are not needed, otherwise a
NodePort
would have been created and you would need to follow with the next steps.. -
Get the port number nginx is using for forwarding
443
connections, here that would be31822
kubectl get svc -n ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default-http-backend ClusterIP 10.43.60.162 <none> 80/TCP 131m
ningress-ingress-nginx-controller LoadBalancer 10.43.55.137 <pending> 80:30925/TCP,443:31822/TCP 18m
ningress-ingress-nginx-controller-admission ClusterIP 10.43.8.231 <none> 443/TCP 18m
Forexample, Using AWS UI create an LB with TCP
port 443
pointing to your nodeport i.e TCP
31822
. If this is a FQDN create an https
listener rule instead and attach your arn certificate. If you used TCP
, add to your local computer ip of your loadbalancer and map it to your FQDN, then head to your browser at https://<gluu-FQDN>
i.e https://demoexample.gluu.org
- You must add a record to point your FQDN to the loadbalancer / ip used as a the single point of entry.
Non-FQDN setup:#
oxTrust will likely fail as it calls to check the ssl certificate. You will have to make sure to add to oxtrust statefulset a hostAlias entry to point your FQDN to the ip of the loadbalancer.
Using Rancher#
-
Follow instructions here to install Rancher in the environment of your choice
-
In the Rancher UI ,create your cluster by going to
Global
-->Add Cluster
and choosing from any of the providers,AKS
,EKS
,GKE
,EC2
,Azure
,Linode
, andvSphere
-
After the cluster has been created, copy
kubeconfig
to a vm or laptop withkubectl
,helm
andpython3
installed. -
Download
pygluu-kubernetes.pyz
. This package can be built manually. -
Optional: If using couchbase as the persistence backend. Download the couchbase kubernetes operator package for linux and place it in the same directory as
pygluu-kubernetes.pyz
-
Run :
./pygluu-kubernetes.pyz install
Note
If using EC2 or EKS please use the AWS deployment path.