Versions Compared

Key

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

...

3. 🔑 Get the Login Token


More secure option is to make a token that expires.

The token will expire.

Code Block
languageshell
titleShell Command
 kubectl -n kubernetes-dashboard create token admin-user

...

Copy the token and use it to log in at https://dashboard.da

...

Create a

...

Secret

...

Token (manually)


Create a file dashboard-token.yaml:

Code Block
languageshellyaml
titleShell CommandYAML MANIFEST
apiVersion: v1
kind: Secret
metadata:
  name: dashboard-sa-token
  namespace:kubectl -n kubernetes-dashboard
  annotations:
    kubernetes.io/service-account.name: dashboard-sa
type: kubernetes.io/service-account-token


Code Block
languageshell
titleShell Command
 kubectl apply -f dashboard-token.yaml




...

Wait & Retrieve the Token

It may take a few seconds for Kubernetes to populate the token. Then:

Code Block
languageshell
titleShell Command
kubectl -n kubernetes-dashboard describe secret dashboard-sa-token create secret tls dashboard-tls \ --cert=/path/to/cert.crt \ --key=/path/to/cert.key




Install  ARGOCD

prepare argocd_ingress.yaml

...

Code Block
languageshell
titleRKE
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
### wait
kubectl get pod -n argocd -w

kubectl apply -f argocd_ingress.yaml



local_path storage class:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml


...