Giter Site home page Giter Site logo

microsoft / azureimds Goto Github PK

View Code? Open in Web Editor NEW
52.0 10.0 38.0 65 KB

Azure Instance Metadata Samples

License: Apache License 2.0

C# 24.21% JavaScript 3.03% Go 2.25% C++ 20.66% Perl 1.45% PowerShell 8.48% Python 12.63% Shell 5.99% Ruby 0.71% Java 17.87% Visual Basic .NET 2.73%

azureimds's Introduction

Azure Instance Metadata Samples

This repo contains samples in various languages to call into Azure Instance Metadata Service from within the VM in Azure. Please refer to LICENSE terms for use.

More details on Azure Instance Metadata service can be found here https://aka.ms/azureimds

azureimds's People

Contributors

abatishchev avatar amitchat avatar chhenk avatar cloudbooster avatar garimakhulbe02 avatar gbowerman avatar gjolly avatar goyalankit avatar haroldwongms avatar joshdmcc avatar kumarisupriya avatar littleboxofsunshine avatar m-gagne avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar pplu avatar rifrankl avatar tushar-bhargava-ms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azureimds's Issues

IMDS Service returns unexpected results on PublicIpAddress when used with a VMSS

IMDS Service returns blank PublicIpAddress when used with a Virtual Machine Scale Set (VMSS) with a backend pool and public IP addresses associated with the VMSS VMs.

Expected Behavior

The IMDS service would provide the Public IP Address that has been associated with the VM when the VM is part of a loadbalancer backend pool and has an associated public IP address.

Using the following curl command to the IMDS endpoint:
curl -s -H Metadata:true --noproxy "*" http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress?api-version=2021-12-13

Resulting output:
[{"privateIpAddress":"XX.X.X.X","publicIpAddress":"XXX.XXX.XXX.XXX"}]

Current Behavior

When a VMSS has a public facing load balancer that has the instance part of its backend pool and each instance also has a public IP address associated to it, the IMDS does not return a public IP address to the instance via IMDS.

Using the following curl command to the IMDS endpoint:
curl -s -H Metadata:true --noproxy "*" http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress?api-version=2021-12-13

Resulting output:
[{"privateIpAddress":"XX.X.X.X","publicIpAddress":""}]

Steps to Reproduce

  1. Provision a VMSS of linux VMs using a Public Load Balancer and each VM associated with that load balancer.
  2. Provision an additional VMSS of linux VMs using only Public IP addresses and NO load balancer.
  3. Provision a final VMSS of linux VMs using both a Public IPs for each VM and a public load balancer associated to each VM in the VMSS.
  4. Curl metadata service with above curl on a VM within each VMSS to observe the results.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.