NodePort This way of accessing Dashboard is only recommended for development environments in a single node setup.
Edit kubernetes-dashboard service.
$ kubectl -n kube-system edit service kubernetes-dashboard You should see yaml representation of the service. Change type: ClusterIP to type: NodePort and save file.
Can change clusterip to nodeport command line without editor? Thanks!
NodePort This way of accessing Dashboard is only recommended for development environments in a single node setup. Edit kubernetes-dashboard service. $ kubectl -n kube-system edit service kubernetes-dashboard You should see yaml representation of the service. Change type: ClusterIP to type: NodePort and save file.
If you set the type field to NodePort, the Kubernetes master will allocate a port from a range specified by --service-node-port-range flag (default: 30000-32767), and each Node will proxy that port (the same port number on every Node) into your Service. That port will be reported in your Service's . spec.
ClusterIP : Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType . NodePort : Exposes the Service on each Node's IP at a static port (the NodePort ).
you can change it like this
kubectl patch svc kubernetes-dashboard --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With