Thank you for responding! I thought I should give an update on how I got it working. I’m not too familiar with Kubernetes so please correct me if im wrong.
My mistake was I was trying to run my Rancher Server on the same server as my cluster. In order to connect to my rancher server I exposed port 80 so I could access it via my domain. Because I was already using port 80 all of my domains that was pointing to what I thought was my load balancer but was actually just loading my rancher server. At the time I didn’t see the issue but now it’s so obvious. So my original issue was my domains were loading rancher server and not my pods
My setup is this.
- I have one digital ocean droplet running just rancher.
- When I create a new cluster in Rancher, I go to the Digital ocean option (added the API in on my DO account), and it will spin up a DO droplet in which Kubernetes is installed.
- I add my workloads (pods/images) and then add my load balancer. I used nginx for the image and exposed port 80 for the container/listening port. I also used NodePort. For my load balancer, I added all my domains. So in my case I had 3 rules which pointed my hosts to their containers
- I point my domains in Cloudflare to the IP of my new server that Rancher spun up. Not my rancher server IP.
If you are adding a new cluster in Rancher and use DO, you must use the IP of the server while adding the API key.