...
Code Block |
---|
language | bash |
---|
title | Edit fileEntry in edit mode |
---|
|
$ kubectl -n kubernetes-dashboard edit svc kubernetes-dashboard |
Once the above command has been launched, a .yaml
file will appear. If not already present, make the following change (here an extract of the file already modified)
Code Block |
---|
language | yml |
---|
title | Insert nodePort |
---|
|
noformat |
spec:
clusterIP: 10.107.65.54
externalTrafficPolicy: Cluster
ports:
- nodePort: 30000 # <--- pay attention to this field
port: 443
protocol: TCP
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard
sessionAffinity: None
type: NodePort # <--- Enter NodePort in place of ClusterIP
status:
loadBalancer: |
...