Hi,
Today I am testing out vSphere with Kubernetes, and came across this error:
Error from server: error when creating "https://raw.githubusercontent.com/lamw/vmware-k8s-app-demo/master/yelb.yaml": admission webhook "admission.vmware.com" denied the request: Using ServiceType NodePort is not allowed
This is when trying to deploy the yelb application from this URL: https://raw.githubusercontent.com/lamw/vmware-k8s-app-demo/master/yelb.yaml
To set up the lab, I used the Automated vSphere 7 and vSphere with Kubernetes Lab Deployment Script.
Any idea what could be going wrong?
That demo appliance is for TKG multicloud, which is different from vSphere 7 with K8s. If you already have the latter, you're all set. You will still have to deploy TKG clusters to use NodePort, but this shouldn't be your first choice. Service of type LoadBalancer is usually preferred with or without an Ingress service.
Any idea what could be going wrong?
Yes, when deploying to the supervisor (vSphere Pods), service of type NodePort is not supported. To use NodePort you need to be using Tanzu Kubernetes Grid clusters or some other upstream-compliant K8s distro.
Hi,
That makes sense. When I tried to deploy Tanzu Kubernetes Grid using the UI build into the Demo Appliance, it did say that I didn't need it though, I'll have to see if there is a way to bypass that.
Didn't need what? What exactly are you trying to do, and with what?
My apologies.
I was attempting to deploy Tanzu Kubernetes Grid using the UI in the Demo Appliance, but it says that deployment is not needed if you have vSphere for Kubernetes set up already. I'll have to go with the CLI and see if that bypasses that so I can deploy it anyway and then try again.
That demo appliance is for TKG multicloud, which is different from vSphere 7 with K8s. If you already have the latter, you're all set. You will still have to deploy TKG clusters to use NodePort, but this shouldn't be your first choice. Service of type LoadBalancer is usually preferred with or without an Ingress service.
I see, many thanks!
Use this ->
./kubectl apply -f https://raw.githubusercontent.com/lamw/vmware-k8s-app-demo/master/yelb-lb.yaml