ct-Open-Source / team-container

A collection of containers to prepare a server for collaboration.
117 stars 39 forks source link

Kubernetes Dashboard and Traefik Dashboard #52

Open eitschalot opened 4 years ago

eitschalot commented 4 years ago

Does there exist an easy method to expose the Kubernetes Dashboard and Traefik Dashboard securely to the WAN?

jamct commented 3 years ago

It's a good idea. I will prepare an update during my next update session. A release candidate may be ready by end of January!

simpsonetti commented 3 years ago

Well, to Kubernetes there is a Dashboard, but for Traefik i don't know... For me its secure, because i ssh it. Here in short for Kubernetes: install: kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml

creating user: cat <<EOF | kubectl apply -f - apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kubernetes-dashboard EOF

Maybe this doesn't, i have:

cat <<EOF | kubectl apply -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: admin-user
  namespace: kubernetes-dashboard
EOF

To get the token: kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}"

start: kubectl proxy

another ssh with -L to your server. Than in Browser: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

Maybe this helps. For me this works. If someone has it for Traefik....

PS: sorry for the history, i'm new here.