I have a local k8s cluster with 1 cp and 2 worker nodes ( all three in different VMs). I have deployed k8s-dashboard and now I want to access it on my host’s browser. I have created a nodeport service, but I am unable to access the service anywhere (on cp, worker nodes or on host).
My k8s-service-definition.yaml file
apiVersion: v1
kind: Service
metadata:
name: kubernetes-dashboard-service
spec:
type: NodePort
ports:
- targetPort: 8443
port: 8443
nodePort: 30009
selector:
name: kubernetes-dashboard
k8s-app: kubernetes-dashboard