Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Problem

Anonymous users were not able to access Kube API server from outside. To enable this access execute following commands

Cause

 No user management required/setup for the cluster

Fix

# kubectl create rolebinding bob-admin-binding --clusterrole=admin --user=system:anonymous --namespace=default   (any user can access Kube API)

(OR) use authentication token  (preferred one)

curl -k `(kubectl config view | grep server | cut -f 2- -d ":" | tr -d " ")`/api/v1/namespaces/default/pods/web/log --header "Authorization: Bearer `(kubectl describe secret $(kubectl get secrets | grep default | cut -f1 -d ' ') | grep -E '^token' | cut -f2 -d':' | tr -d '\t')`" 

  • No labels