-
-
Save sirdarckcat/568934df2b33a125b0b0f42a5366df8c to your computer and use it in GitHub Desktop.
# Obtain the following values from /etc/node-os-release | |
BUILD_ID=16108.470.1 | |
VERSION=89 | |
KERNEL_COMMIT_ID=490ca207fb0f23bca9d21c04e309502e1ed8b58d | |
# Source code: | |
echo visit https://cos.googlesource.com/third_party/kernel/+/$KERNEL_COMMIT_ID | |
# This command will print an Image ID | |
gcloud container get-server-config --format json \ | |
| jq -r '.channels|map(select(.channel=="REGULAR"))|.[].validVersions[]' \ | |
| sed 's/\(.*\)-gke.\(.*\)/gke-\1-gke\2/g' | sed s/[.]//g \ | |
| xargs -i gcloud compute images list --project gke-node-images --filter "name~'{}-cos-"$VERSION"-"$BUILD_ID"-v[0-9]*-pre$'" --format 'get(name)' | |
# Once you get the image, visit | |
# https://console.cloud.google.com/compute/imagesDetail/projects/gke-node-images/global/images/$IMAGE_ID | |
# Clicking on Create Instance will boot a VM with the exact same VM ran on the cluster. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment