Kubernetes ecosystem

From Luis Gallego Hurtado - Not Another IT guy
Jump to: navigation, search


Useful Commands for Kubernetes

Tools

Kubernetes dashboard

Web (UI) for monitoring and managing a Kubernetes cluster.

Installing Kubernetes Dashboard

  1. Install the dashboard
    kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta1/aio/deploy/recommended.yaml
    
  2. Create the admin service account for dashboard
    kubectl create serviceaccount cluster-admin-dashboard-sa
    
  3. Assign the ClusterAdmin role to created account
    kubectl create clusterrolebinding cluster-admin-dashboard-sa --clusterrole=cluster-admin --serviceaccount=default:cluster-admin-dashboard-sa
    
  4. Retrieve the token
    kubectl get secret
    

    kubectl describe secret <TOKEN_NAME>
    
  5. Run the Kubernetes HTTP Proxy
    kubectl proxy
    

Launching Kubernetes Dashboard

Launch the following URL in a Web Browser
Launch http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
Input the retrieved token.