How to deploy a self-managed Kubernetes cluster using Azure VMs with Kubeadm?

Ali Raza 0 Reputation points
2024-01-29T09:29:06.61+00:00

Hello, I am trying to deploy a self-managed Kubernetes cluster in Azure VMs using Kubeadm with one master and one worker node. However, when I create an nginx ingress, its load balancer service doesn't get a public IP and remains in a pending state, even though both VMs are behind the same load balancer. Is there any way to resolve this issue without using AKS, and deploying the cluster only with VMs?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anveshreddy Nimmala 3,550 Reputation points Microsoft External Staff Moderator
    2024-01-31T12:42:54.9566667+00:00

    Hello Ali Raza, Thankyou for providing configuration details, Based on the provided YAML manifest, it seems that you have created an Ingress resource for the admin-lite namespace with a host of tracks.mysite.live. The Ingress resource is configured to use the nginx ingress class and has a TLS secret named tls-secret. The Ingress resource also has a rewrite target annotation that rewrites the URL path to / and a path type of Prefix. The backend service for the Ingress resource is named admin-ui and listens on port 3001. However, it's not clear from the provided YAML manifest whether you have created a Service resource for the admin-ui backend service. you need to create a Service resource that exposes the admin-ui backend service. You can create a Service resource by running the following command: kubectl create service clusterip admin-ui --tcp=3001:3001 -n admin-lite This command creates a Service resource named admin-ui in the admin-lite namespace that exposes the admin-ui backend service on port 3001. The Service resource is of type ClusterIP, which means that it's only accessible from within the cluster. Once you have created the Service resource, you should be able to access the admin-ui backend service through the Ingress resource at the tracks.mysite.live host. if the load balancer service for the Ingress resource is still in a pending state, it's possible that there is an issue with the load balancer configuration. You may need to check the logs for the load balancer to see if there are any errors. Hope this helps you, please consider accepting the answer to help increase visibility of this question for other members of the Microsoft Q&A community. If not, please let us know what is still needed in the comments so the question can be answered.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.