#!/bin/bash APISERVER=$(kubectl config view | grep server | cut -f 2- -d ":" | tr -d " ") TOKEN=$(kubectl config view | grep token | cut -f 2- -d ":" | tr -d " ") echo "APISERVER=$APISERVER" echo "TOKEN=$TOKEN" curl -v -k -H "Authorization: Bearer $TOKEN" $APISERVER/api/v1 curl -v -k -H "Authorization: Bearer $TOKEN" $APISERVER/api/v1/nodes curl -v -k -H "Authorization: Bearer $TOKEN" $APISERVER/api/v1/pods | cs |
Docker/Kubernetes
- How to access k8s APIs 2018.05.02
How to access k8s APIs
2018. 5. 2. 07:23