Rancher is a software for easy control of k8s cluster.
NOTE. Main cluster nodes will be further designated as kn0, kn1, kn2, work nodes will be designated as kn3, kn4, kn5.
To install and set up Rancher:
Create a folder to store Rancher information at the kn4 node:
% sudo mkdir –p /opt/rancher
Start Rancher with mounting to host:
% sudo docker run -d --restart=unless-stopped -p 8180:80 -p 8446:443 -v /opt/rancher:/var/lib/rancher rancher/rancher:stable
Open the browser and open the URL: https://ip-address-of-kn0:8446, where ip-address-of-kn0 is IP address of the kn0 node. Set password for the Rancher administrator role in the web interface:
Add the created cluster to Rancher. Click the Add Cluster button:
Copy the last command on the page:
General command view:
% curl --insecure -sfL https://<IP address or node>:8446/v3/import/dtdsrjczmb2bg79r82x9qd8g9gjc8d5fl86drc8m9zhpst2d9h6pfn.yaml | kubectl apply -f -
Execute the copied command in the console of the kn0 node. The following is displayed in the console:
namespace/cattle-system created
serviceaccount/cattle created
clusterrolebinding.rbac.authorization.k8s.io/cattle-admin-binding created
secret/cattle-credentials-3035218 created
clusterrole.rbac.authorization.k8s.io/cattle-admin created
deployment.extensions/cattle-cluster-agent created
daemonset.extensions/cattle-node-agent created
Wait until the system starts:
After the initialization ends, cluster status changes to Active:
General state of clusters:
Go to the Projects/Namespaces section and create platform projects:
Click the Add Project button. Fill in the Project Name box, add description in the Description box and click the Create button:
Click the Add Namespace button. Fill in the Name box and click the Create button:
After executing the operations, Rancher is installed and set up, next prepare to start Foresight Mobile Platform.
See also:
Preparing Environment for Foresight Mobile Platform | Preparing to Start Foresight Mobile Platform