Skip to content

Instantly share code, notes, and snippets.

@marcelobrake
Last active October 15, 2020 20:35
Show Gist options
  • Save marcelobrake/7ee90122471d39ffee52425b3cdad589 to your computer and use it in GitHub Desktop.
Save marcelobrake/7ee90122471d39ffee52425b3cdad589 to your computer and use it in GitHub Desktop.

Revisions

  1. marcelobrake revised this gist Oct 15, 2020. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -45,6 +45,10 @@ EOF
    kubectl -n default describe secret $(kubectl -n default get secret | awk '/^dashboard-admin-sa-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```

    ```bash
    kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')
    ```

    ### Habilitar proxy

    ```bash
  2. marcelobrake revised this gist Oct 15, 2020. 1 changed file with 29 additions and 0 deletions.
    29 changes: 29 additions & 0 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,35 @@ kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin

    ```

    #### Service Account e Cluster Role Binding
    ```bash
    cat <<EOF | kubectl apply -f -
    apiVersion: v1
    kind: ServiceAccount
    metadata:
    name: admin-user
    namespace: kubernetes-dashboard
    EOF
    ```

    ```bash
    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
    ```


    ### Pegar o token para autenticar

    ```bash
  3. marcelobrake revised this gist Oct 15, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    ### Instalando

    ```bash
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.4/aio/deploy/recommended.yaml

    kubectl create serviceaccount dashboard-admin-sa
    kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa
  4. marcelobrake revised this gist May 7, 2020. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,6 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/a
    kubectl create serviceaccount dashboard-admin-sa
    kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa


    ```

    ### Pegar o token para autenticar
  5. marcelobrake revised this gist Apr 30, 2020. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -4,12 +4,17 @@

    ```bash
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml

    kubectl create serviceaccount dashboard-admin-sa
    kubectl create clusterrolebinding dashboard-admin-sa --clusterrole=cluster-admin --serviceaccount=default:dashboard-admin-sa


    ```

    ### Pegar o token para autenticar

    ```bash
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^kube-proxy-token-/{print $1}') | awk '$1=="token:"{print $2}'
    kubectl -n default describe secret $(kubectl -n default get secret | awk '/^dashboard-admin-sa-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```

    ### Habilitar proxy
    @@ -19,6 +24,6 @@ kubectl proxy
    ```

    ### Abrir no navegador
    http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/error?namespace=application-service
    http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/overview?namespace=application-service


  6. marcelobrake revised this gist Apr 30, 2020. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -2,19 +2,19 @@

    ### Instalando

    ```shell
    ```bash
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
    ```

    ### Pegar o token para autenticar

    ```shell
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^clusterrole-aggregation-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```bash
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^kube-proxy-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```

    ### Habilitar proxy

    ```shell
    ```bash
    kubectl proxy
    ```

  7. marcelobrake revised this gist Apr 30, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,6 @@ kubectl proxy
    ```

    ### Abrir no navegador
    http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview?namespace=application-service
    http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/error?namespace=application-service


  8. marcelobrake revised this gist Apr 30, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    ### Instalando

    ```shell
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc2/aio/deploy/recommended.yaml
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
    ```

    ### Pegar o token para autenticar
  9. marcelobrake revised this gist Feb 20, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-r
    ### Pegar o token para autenticar

    ```shell
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^clusterrole-aggregation-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```

    ### Habilitar proxy
  10. marcelobrake revised this gist Feb 20, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -19,4 +19,6 @@ kubectl proxy
    ```

    ### Abrir no navegador
    http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
    http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview?namespace=application-service


  11. marcelobrake revised this gist Jan 17, 2020. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,22 @@
    # Install Kubernetes Dashboard

    Instalando
    ### Instalando

    ```shell
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc2/aio/deploy/recommended.yaml
    ```

    Pegar o token para autenticar
    ### Pegar o token para autenticar

    ```shell
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```

    Habilitar proxy
    ### Habilitar proxy

    ```shell
    kubectl proxy
    ```

    Abrir no navegador
    ### Abrir no navegador
    http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
  12. marcelobrake revised this gist Jan 17, 2020. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -7,3 +7,16 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-r
    ```

    Pegar o token para autenticar

    ```shell
    kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}'
    ```

    Habilitar proxy

    ```shell
    kubectl proxy
    ```

    Abrir no navegador
    http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
  13. marcelobrake created this gist Jan 17, 2020.
    9 changes: 9 additions & 0 deletions install-kubernetes-dashboard.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Install Kubernetes Dashboard

    Instalando

    ```shell
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc2/aio/deploy/recommended.yaml
    ```

    Pegar o token para autenticar