Managing the Deployment with Rancher
With your User Authentication Service successfully deployed on a Kubernetes cluster, it's now time to set up Rancher for efficient management of your deployments. As you're hosting this on a dedicated server provided by DomainIndia, ensure that the server meets the prerequisites needed for a Rancher installation. Let's go step-by-step through this process.
5.1: Setting up Rancher on Your DomainIndia Server
Before we get started, make sure Docker is installed on your CentOS server provided by DomainIndia. If not, follow the instructions from Step 1 to get Docker set up.
Once Docker is running smoothly, install Rancher with the following Docker command:
docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
This command pulls the latest Rancher server image and runs it as a container on your server.
5.2: Accessing Rancher Dashboard
Access the Rancher Dashboard using the IP address of your dedicated server. Open a web browser and enter
You'll be greeted by the Rancher UI. The first time you access the UI, you will be asked to set a password for the admin user. It's recommended to also set up an email for password recovery.
5.3: Adding Your Kubernetes Cluster to Rancher
- Navigate to the "Global" view by clicking on the Rancher logo in the top-left corner.
- Click "Add Cluster".
- As we are importing an existing cluster, choose "Import Existing".
- Name your cluster and then click "Create".
After clicking "Create", Rancher will provide a
kubectl command with a generated token. Run this command on your CentOS server to import your cluster to Rancher.
5.4: Observing Your Deployed Microservices
Now that you've added your Kubernetes cluster to Rancher, you can observe your running services. Navigate to your cluster and then to the namespace where your service is running. Here you can see the current status of your service, as well as other details such as the number of pods, CPU usage, and memory usage.
5.5: Managing Your Deployments
Rancher makes it easy to manage your deployments. You can scale up or down your service, roll out updates, or roll back to a previous version, all from the Rancher dashboard.
Congratulations! You've now set up Rancher on your dedicated server from DomainIndia, and you're managing your Kubernetes deployments more efficiently. This is a major step in maintaining control and visibility over your microservices deployments. Happy managing!