T
T
thunder20042020-11-08 19:15:12
Kubernetes
thunder2004, 2020-11-08 19:15:12

Publishing kubernetes Dashboard via NodePort, how?

How to allow dashboard in cube to connect via NodePort? An attempt to add Yaml failed. the cube swears that this is forbidden :(
deployment.apps/dashboard-metrics-scraper unchanged
The Service "kubernetes-dashboard" is invalid: spec.ports[0].nodePort: Forbidden: may not be used when `type` is 'ClusterIP'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
thunder2004, 2020-11-09
@thunder2004

figured it out, it's my own fault that I wrote the parameter incorrectly in the configuration file,
here is a working version
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kubernetes-dashboard
spec:
type: NodePort
ports:
- port: 443
targetPort: 8443
nodePort: 32320
selector:
k8s-app: kubernetes-dashboard

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question