Instance metadata on IBM Cloud

5/17/2019

Is there any way to get instance metadata on IBM Cloud Kubernetes cluster, from internal pod? Something like doing curl to http://metadata.google.internal/computeMetadata/v1/instance/... on GKE clusters, or http://169.254.169.254/latest/... on EKS clusters.

Any help will be appreciated. Thanks!

-- mcruz2401
cloud
ibm-cloud
kubernetes
metadata

1 Answer

5/17/2019

I think I follow what you're after.. you're able to get details/metadata about your worker node from the SoftLayer APIs available - https://sldn.softlayer.com/reference/softlayerapi/

For k8s specific info you can utilize the k8s api-server to query metadata about things like the node, pods, etc at the Kubernetes.default.svc.cluster.local address from inside a pod. You can find the service account and token from within your pod at /var/run/secrets/kubernetes.io

Hope that helps.

-- John Pape
Source: StackOverflow