Good morning, I am trying to do something simple for a school project, to create three VMs on Azure, and then create a Kubernetes cluster with Kubeadm. I managed to create the VMs and deploy the cluster. However, when I went to do a simple test:
Kubectl create deployment nginx --image nginx
Kubectl expose deployment nginx --type NodePort --port 80
I can’t access the Nginx service. Everything seems fine from what I’ve checked, the service is running, and the pod logs don’t show any errors, so I believe the problem might be with the network.
My Azure setup is quite simple: I created a resource group, within this group I created a VNet, a subnet, three network interfaces, three Linux VMs with Ubuntu, and public IPs for all three VMs. I would like to know if there is anything I can do to address this situation?”
root@masternode:~# kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-676b6c5bbc-p8vq7 1/1 Running 0 2m49s
root@masternode:~# kubectl get svc nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx NodePort 10.106.99.86 <none> 80:32201/TCP 2m52s
root@masternode:~# kubectl logs nginx-676b6c5bbc-p8vq7
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/12/03 16:18:19 [notice] 1#1: using the "epoll" event method
2024/12/03 16:18:19 [notice] 1#1: nginx/1.27.3
2024/12/03 16:18:19 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
2024/12/03 16:18:19 [notice] 1#1: OS: Linux 6.8.0-1017-azure
2024/12/03 16:18:19 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/12/03 16:18:19 [notice] 1#1: start worker processes
2024/12/03 16:18:19 [notice] 1#1: start worker process 29
2024/12/03 16:18:19 [notice] 1#1: start worker process 30
Luiz Alves is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1