How can I check if my pod identity is working for node.js application?

8/13/2020

I have used this script to implement manage identity for NODE.js application by using below script. How can I check if it is working properly ?

-- Venki
azure-active-directory
azure-aks
kubernetes
node.js

1 Answer

8/13/2020

You can do few activities to confirm that it's using Pod Identity is working properly.

  1. Print the token which you get from MSI token endpoint http://169.254.169.254/metadata/identity/oauth2/token
  2. Make a GET call to instance metadata endpoint http://169.254.169.254/metadata/instance?api-version=2017-08-01

For more details refer doc and code which is written in GoLang but easy to translate to nodejs or any other language.

-- Arghya Sadhu
Source: StackOverflow