Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

NOTE: applicable for test sytems, otherwise consider security implications

https://github.com/kubernetes/dashboard

...

Code Block
languagebash
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc1/aio/deploy/recommended.yaml
# verifiy
ubuntu@sb4-rancher:~/rke$ kubectl get pods -n kubernetes-dashboard
NAME                                         READY     STATUS    RESTARTS   AGE
dashboard-metrics-scraper-769d6ffc98-c7kjg   1/1       Running   0          78m
kubernetes-dashboard-67659748c4-h7nnp        1/1       Running   0          7m58s

Create a serviceEnhance the service for external access

Code Block
languagebash
cat > k8s-dashboard-service << EOF
---
# ------------------- Dashboard Service ------------------- #

kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
    kubernetes.io/cluster-service: "true"
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
spec:
  type: NodePort
  ports:
    - port: 443
      targetPort: 8443
      nodePort: 3111530008
  selector:
    k8s-app: kubernetes-dashboard

EOF
kubectl apply -f k8s-dashboard-service

...