Skip to content

Instantly share code, notes, and snippets.

@dahlsailrunner
Last active August 13, 2024 10:48
Show Gist options
  • Save dahlsailrunner/1a47b0e38f6e3ba64d4d61835c73b7e2 to your computer and use it in GitHub Desktop.
Save dahlsailrunner/1a47b0e38f6e3ba64d4d61835c73b7e2 to your computer and use it in GitHub Desktop.

Revisions

  1. dahlsailrunner revised this gist Jan 7, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Local-Kubernetes.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ Actual repo is here: https://github.com/kubernetes/dashboard

    ### 1. Install the Dashboard
    ```
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.1.0/aio/deploy/recommended.yaml
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
    ```
    ### 2. Create a Sample User Account that can Access the Dashboard via Token
    ```
  2. dahlsailrunner revised this gist Jan 6, 2021. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions Local-Kubernetes.md
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    # Using the K8s Dashboard Locally
    Actual repo is here: https://github.com/kubernetes/dashboard

    1. Install the Dashboard
    ### 1. Install the Dashboard
    ```
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.1.0/aio/deploy/recommended.yaml
    ```
    2. Create a Sample User Account that can Access the Dashboard via Token
    ### 2. Create a Sample User Account that can Access the Dashboard via Token
    ```
    kubectl apply -f https://gist.github.com/dahlsailrunner/bbd453f3bb6259b66c08a70d0908283f/raw/5727723217e2df4b65d8933adf04d009cfb0fe3f/local-dashboard-account.yml
    ```
    3. Grab the Token for the Sample User
    ### 3. Grab the Token for the Sample User

    *It's the `token` value from the output of the below command.*

    @@ -24,11 +24,11 @@ kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboar
    kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')
    ```

    4. Enable Access to the Dashboard Service
    ### 4. Enable Access to the Dashboard Service
    ```
    start kubectl proxy
    ```
    5. Explore the Dashboard
    ### 5. Explore the Dashboard
    Link is here: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

    Use the `token` you found in step 3 to login.
  3. dahlsailrunner revised this gist Jan 6, 2021. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions Local-Kubernetes.md
    Original file line number Diff line number Diff line change
    @@ -13,14 +13,26 @@ kubectl apply -f https://gist.github.com/dahlsailrunner/bbd453f3bb625

    *It's the `token` value from the output of the below command.*

    **Powershell:**
    ```
    kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | sls admin-user | ForEach-Object { $_ -Split '\s+' } | Select -First 1)
    ```
    **TIP:** Create a PowerShell function in your $PROFILE (like `Get-K8s-Dashboard-Token`) to make this easier to remember / perform.

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

    4. Enable Access to the Dashboard Service
    ```
    start kubectl proxy
    ```
    5. Explore the Dashboard
    Link is here: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

    Use the `token` you found in step 3 to login.


    # Install the Community nginx Ingress Controller
    ```
  4. dahlsailrunner revised this gist Jan 6, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Local-Kubernetes.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.1.0/a
    kubectl apply -f https://gist.github.com/dahlsailrunner/bbd453f3bb6259b66c08a70d0908283f/raw/5727723217e2df4b65d8933adf04d009cfb0fe3f/local-dashboard-account.yml
    ```
    3. Grab the Token for the Sample User

    *It's the `token` value from the output of the below command.*

    ```
  5. dahlsailrunner created this gist Jan 6, 2021.
    27 changes: 27 additions & 0 deletions Local-Kubernetes.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # Using the K8s Dashboard Locally
    Actual repo is here: https://github.com/kubernetes/dashboard

    1. Install the Dashboard
    ```
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.1.0/aio/deploy/recommended.yaml
    ```
    2. Create a Sample User Account that can Access the Dashboard via Token
    ```
    kubectl apply -f https://gist.github.com/dahlsailrunner/bbd453f3bb6259b66c08a70d0908283f/raw/5727723217e2df4b65d8933adf04d009cfb0fe3f/local-dashboard-account.yml
    ```
    3. Grab the Token for the Sample User
    *It's the `token` value from the output of the below command.*

    ```
    kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | sls admin-user | ForEach-Object { $_ -Split '\s+' } | Select -First 1)
    ```

    4. Enable Access to the Dashboard Service
    ```
    start kubectl proxy
    ```

    # Install the Community nginx Ingress Controller
    ```
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.43.0/deploy/static/provider/cloud/deploy.yaml
    ```