Replace rancher.yourdomain.com with your actual domain.
d. Access Rancher
Set up DNS records to point rancher.yourdomain.com to your cluster's IP.
Assistant
It looks like you're setting up cert-manager and Rancher on your local Kubernetes cluster. I'll provide some additional guidance to help ensure a smooth installation.
Replace the Hostname: Ensure you replace rancher.yourdomain.com with your actual domain name that you control. For example:
bash
--set hostname=rancher.example.com
Number of Replicas: Setting --set replicas=3 is suitable for high availability in a production environment. If you're running this locally or in a test environment, you might set it to 1:
bash
--set replicas=1
Verify the Installation: Check the status of the Rancher pods:
bash
kubectl -n cattle-system rollout status deploy/rancher
You can also list the pods:
bash
kubectl get pods -n cattle-system
d. Access Rancher
To access the Rancher UI:
Set Up DNS Records:
Public Domain: If you have a domain name and can modify its DNS records, create an A record pointing rancher.yourdomain.com to the IP address of your cluster's ingress controller or load balancer.
Local Testing: If you're testing locally or don't have access to DNS management, you can modify your local hosts file.
On Linux/macOS:
bash
sudo nano /etc/hosts
On Windows:
Edit C:\Windows\System32\drivers\etc\hosts with administrative privileges.
Add the Following Line:
code
<CLUSTER_IP> rancher.yourdomain.com
Replace <CLUSTER_IP> with your cluster's IP address (for local setups, this might be 127.0.0.1).
Access via Browser:
Open a web browser and navigate to https://rancher.yourdomain.com.
You may encounter a security warning due to a self-signed certificate. You can proceed by adding an exception.
Initial Setup:
Upon first access, you'll be prompted to set a password for the admin user.
Accept the terms and conditions to proceed.
Additional Tips:
Install a Let's Encrypt Certificate (Optional):
If you have a public domain and want to secure your Rancher installation with a trusted SSL certificate, you can configure Rancher to use Let's Encrypt: