Specify destination server instance in request Azure Load Balancer -
hi have server hosts azure load balancer. there multiple server instances balancer manages. how sever instance id's host ip load balancer. there default request use information. there default headers must set when sending request. want inform load balancer send request specific server instances.
i have public ip of load balancer , need server instances , send http request specific server instances. can with ip address? new this
load balancer multiple server instances, mean create multiple azure vms , load balancer in azure arm module? if yes, can use powershell information vms, this:
login-azurermaccount get-azurermpublicipaddress | ?{ $_.ipaddress -eq "52.168.145.1" } | select name, resourcegroupname $pip = get-azurermpublicipaddress -name mypublicip -resourcegroupname lb $lbname = ($pip.ipconfiguration.id -split '/')[8] $lbinfo = get-azurermloadbalancer -name $lbname -resourcegroupname lb $backendips = $lbinfo.backendaddresspools.backendipconfigurations.id $nics = foreach($id in $backendips){($id -split '/')[8]} $vms = foreach($nic in $nics){$test = get-azurermnetworkinterface -name $nic -resourcegroupname lb ; $vmname =($test.virtualmachine.id -split '/')[-1];$vmaddress=$test.ipconfigurations.privateipaddress;$results = [pscustomobject]@{'vmname'=$vmname;'privateaddress'=$vmaddress};$results } $vms here test in lab:

Comments
Post a Comment