-
-
Save mik-laj/63782fce754b9c64c6f6d1ad14fa00a4 to your computer and use it in GitHub Desktop.
API Request to GKE cluster using curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GCP_CLUSTER_NAME=europe-west1-fluffy-bcad8335-gke | |
GCP_CLUSTER_ZONE=europe-west1-b | |
curl --cacert <(gcloud container clusters describe "${GCP_CLUSTER_NAME}" \ | |
--zone "${GCP_CLUSTER_ZONE}" \ | |
--format='value(masterAuth.clusterCaCertificate)' | base64 -d\ | |
) \ | |
--header "Authorization: Bearer $(gcloud auth print-access-token)" \ | |
https://$(gcloud container clusters describe "${GCP_CLUSTER_NAME}" \ | |
--zone "${GCP_CLUSTER_ZONE}" \ | |
--format='value(endpoint)'\ | |
)/logs/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment