Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOUD-35][Azure/AKS] Crear GNP para el IMDS #450

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

esierra-stratio
Copy link

@esierra-stratio esierra-stratio commented Feb 7, 2024

Azure

VMs

  • Pod without proper labels
kw run -it no-labels --image=ubuntu -n kube-system -- bash
root@no-labels:/# curl -v -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" --connect-timeout 15
*   Trying 169.254.169.254:80...
* After 15000ms connect time, move on!
* connect to 169.254.169.254 port 80 failed: Connection timed out
* Connection timeout after 15001 ms
* Closing connection 0
curl: (28) Connection timeout after 15001 ms
  • Pod with proper labels
kw run -it with-labels --image=ubuntu -n kube-system --labels=component=cloud-controller-manager -- bash
root@with-labels:/# curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" --connect-timeout 15
{"compute":{"azEnvironment":"AzurePublicCloud","customData":"","evictionPolicy":"","isHostCompatibilityLayerVm":"false","licenseType":"","location":"westeurope","name":"worker1-md-0-bwkmp","offer":"capi","osProfile":{"adminUsername":"capi","computerName":"worker1-md-0-bwkmp","disablePasswordAuthentication":"true"},"osType":"Linux","placementGroupId":"","plan":{"name":"","product":"","publisher":""},"platformFaultDomain":"0","platformUpdateDomain":"0","priority":"","provider":"Microsoft.Compute","publicKeys":[{"keyData":"ssh-rsa xxxxxxxxxxxx\n","path":"/home/capi/.ssh/authorized_keys"}],"publisher":"cncf-upstream","resourceGroupName":"esierra-dev-vms","resourceId":"/subscriptions/6e2a38cd-ef16-47b3-a75e-5a4960cedf65/resourceGroups/esierra-dev-vms/providers/Microsoft.Compute/virtualMachines/worker1-md-0-bwkmp","securityProfile":{"secureBootEnabled":"false","virtualTpmEnabled":"false"},"sku":"ubuntu-2204-gen1","storageProfile":{"dataDisks":[],"imageReference":{"id":"","offer":"capi","publisher":"cncf-upstream","sku":"ubuntu-2204-gen1","version":"126.10.20231023"},"osDisk":{"caching":"None","createOption":"FromImage","diffDiskSettings":{"option":""},"diskSizeGB":"50","encryptionSettings":{"enabled":"false"},"image":{"uri":""},"managedDisk":{"id":"/subscriptions/6e2a38cd-ef16-47b3-a75e-5a4960cedf65/resourceGroups/esierra-dev-vms/providers/Microsoft.Compute/disks/worker1-md-0-bwkmp_OSDisk","storageAccountType":"Standard_LRS"},"name":"worker1-md-0-bwkmp_OSDisk","osType":"Linux","vhd":{"uri":""},"writeAcceleratorEnabled":"false"},"resourceDisk":{"size":"204800"}},"subscriptionId":"6e2a38cd-ef16-47b3-a75e-5a4960cedf65","tags":"Name:worker1-md-0-bwkmp;kubernetes.io_cluster_esierra-dev-vms:owned;sigs.k8s.io_cluster-api-provider-azure_cluster_esierra-dev-vms:owned;sigs.k8s.io_cluster-api-provider-azure_role:node","tagsList":[{"name":"Name","value":"worker1-md-0-bwkmp"},{"name":"kubernetes.io_cluster_esierra-dev-vms","value":"owned"},{"name":"sigs.k8s.io_cluster-api-provider-azure_cluster_esierra-dev-vms","value":"owned"},{"name":"sigs.k8s.io_cluster-api-provider-azure_role","value":"node"}],"userData":"","version":"126.10.20231023","vmId":"40654e07-fef2-417e-9428-d2c443d90707","vmScaleSetName":"","vmSize":"Standard_D8_v3","zone":"1"},"network":{"interface":[{"ipv4":{"ipAddress":[{"privateIpAddress":"10.1.0.4","publicIpAddress":""}],"subnet":[{"address":"10.1.0.0","prefix":"16"}]},"ipv6":{"ipAddress":[]},"macAddress":"000D3A4B6F89"}]}}

AKS

  • Pod without proper labels
kw run -it no-labels --image=ubuntu -n kube-system -- bash
root@no-labels:/#  curl -v -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" --connect-timeout 15
*   Trying 169.254.169.254:80...
* After 15000ms connect time, move on!
* connect to 169.254.169.254 port 80 failed: Connection timed out
* Connection timeout after 15001 ms
* Closing connection 0
curl: (28) Connection timeout after 15001 ms
  • Pod with proper labels and namespace
kw run -it with-labels --image=ubuntu -n capz-system --labels=cluster.x-k8s.io/provider=infrastructure-azure -- bash
root@with-labels:/# curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" --connect-timeout 15
{"compute":{"azEnvironment":"AzurePublicCloud","customData":"","evictionPolicy":"","isHostCompatibilityLayerVm":"false","licenseType":"","location":"westeurope","name":"aks-worker1mp1-05679644-vmss_0","offer":"","osProfile":{"adminUsername":"azureuser","computerName":"aks-worker1mp1-05679644-vmss000000","disablePasswordAuthentication":"true"},"osType":"Linux","placementGroupId":"d12dcd30-c2c2-4a0a-9152-ac7ea634a551","plan":{"name":"","product":"","publisher":""},"platformFaultDomain":"0","platformUpdateDomain":"0","priority":"","provider":"Microsoft.Compute","publicKeys":[{"keyData":"ssh-rsa xxxxxxxxxxxx","path":"/home/azureuser/.ssh/authorized_keys"}],"publisher":"","resourceGroupName":"esierra-dev-nodes","resourceId":"/subscriptions/6e2a38cd-ef16-47b3-a75e-5a4960cedf65/resourceGroups/esierra-dev-nodes/providers/Microsoft.Compute/virtualMachineScaleSets/aks-worker1mp1-05679644-vmss/virtualMachines/0","securityProfile":{"secureBootEnabled":"false","virtualTpmEnabled":"false"},"sku":"","storageProfile":{"dataDisks":[],"imageReference":{"id":"/subscriptions/109a5e88-712a-48ae-9078-9ca8b3c81345/resourceGroups/AKS-Ubuntu/providers/Microsoft.Compute/galleries/AKSUbuntu/images/2204containerd/versions/202401.17.1","offer":"","publisher":"","sku":"","version":""},"osDisk":{"caching":"ReadWrite","createOption":"FromImage","diffDiskSettings":{"option":""},"diskSizeGB":"50","encryptionSettings":{"enabled":"false"},"image":{"uri":""},"managedDisk":{"id":"/subscriptions/6e2a38cd-ef16-47b3-a75e-5a4960cedf65/resourceGroups/esierra-dev-nodes/providers/Microsoft.Compute/disks/aks-worker1mp1-05679aks-worker1mp1-056796disk1_a87b3fb47b614bb6aed3fb7de60f5165","storageAccountType":"StandardSSD_LRS"},"name":"aks-worker1mp1-05679aks-worker1mp1-056796disk1_a87b3fb47b614bb6aed3fb7de60f5165","osType":"Linux","vhd":{"uri":""},"writeAcceleratorEnabled":"false"},"resourceDisk":{"size":"204800"}},"subscriptionId":"6e2a38cd-ef16-47b3-a75e-5a4960cedf65","tags":"aks-managed-consolidated-additional-properties:6316e3d3-c751-11ee-a86a-f6f634515342;aks-managed-coordination:true;aks-managed-createOperationID:90cbd503-224b-425a-99f1-8b1ff2e8f862;aks-managed-creationSource:vmssclient-aks-worker1mp1-05679644-vmss;aks-managed-kubeletIdentityClientID:46a8d6b3-41bf-4e7c-b6f8-c5860f5edc63;aks-managed-orchestrator:Kubernetes:1.27.3;aks-managed-poolName:worker1mp1;aks-managed-resourceNameSuffix:20625270;aks-managed-ssh-access:LocalUser","tagsList":[{"name":"aks-managed-consolidated-additional-properties","value":"6316e3d3-c751-11ee-a86a-f6f634515342"},{"name":"aks-managed-coordination","value":"true"},{"name":"aks-managed-createOperationID","value":"90cbd503-224b-425a-99f1-8b1ff2e8f862"},{"name":"aks-managed-creationSource","value":"vmssclient-aks-worker1mp1-05679644-vmss"},{"name":"aks-managed-kubeletIdentityClientID","value":"46a8d6b3-41bf-4e7c-b6f8-c5860f5edc63"},{"name":"aks-managed-orchestrator","value":"Kubernetes:1.27.3"},{"name":"aks-managed-poolName","value":"worker1mp1"},{"name":"aks-managed-resourceNameSuffix","value":"20625270"},{"name":"aks-managed-ssh-access","value":"LocalUser"}],"userData":"","version":"202401.17.1","vmId":"3a19081a-ea0d-4c40-8c1b-8a3e99489fb0","vmScaleSetName":"aks-worker1mp1-05679644-vmss","vmSize":"Standard_D8_v3","zone":"2"},"network":{"interface":[{"ipv4":{"ipAddress":[{"privateIpAddress":"10.240.0.4","publicIpAddress":""},{"privateIpAddress":"10.240.0.5","publicIpAddress":""},{"privateIpAddress":"10.240.0.6","publicIpAddress":""},{"privateIpAddress":"10.240.0.7","publicIpAddress":""},{"privateIpAddress":"10.240.0.8","publicIpAddress":""},{"privateIpAddress":"10.240.0.9","publicIpAddress":""},{"privateIpAddress":"10.240.0.10","publicIpAddress":""},{"privateIpAddress":"10.240.0.11","publicIpAddress":""},{"privateIpAddress":"10.240.0.12","publicIpAddress":""},{"privateIpAddress":"10.240.0.13","publicIpAddress":""},{"privateIpAddress":"10.240.0.14","publicIpAddress":""},{"privateIpAddress":"10.240.0.15","publicIpAddress":""},{"privateIpAddress":"10.240.0.16","publicIpAddress":""},{"privateIpAddress":"10.240.0.17","publicIpAddress":""},{"privateIpAddress":"10.240.0.18","publicIpAddress":""},{"privateIpAddress":"10.240.0.19","publicIpAddress":""},{"privateIpAddress":"10.240.0.20","publicIpAddress":""},{"privateIpAddress":"10.240.0.21","publicIpAddress":""},{"privateIpAddress":"10.240.0.22","publicIpAddress":""},{"privateIpAddress":"10.240.0.23","publicIpAddress":""},{"privateIpAddress":"10.240.0.24","publicIpAddress":""},{"privateIpAddress":"10.240.0.25","publicIpAddress":""},{"privateIpAddress":"10.240.0.26","publicIpAddress":""},{"privateIpAddress":"10.240.0.27","publicIpAddress":""},{"privateIpAddress":"10.240.0.28","publicIpAddress":""},{"privateIpAddress":"10.240.0.29","publicIpAddress":""},{"privateIpAddress":"10.240.0.30","publicIpAddress":""},{"privateIpAddress":"10.240.0.31","publicIpAddress":""},{"privateIpAddress":"10.240.0.32","publicIpAddress":""}],"subnet":[{"address":"10.240.0.0","prefix":"16"}]},"ipv6":{"ipAddress":[]},"macAddress":"000D3A2745FE"}]}}

@esierra-stratio esierra-stratio added ok-to-test and removed dont merge wip Work In Progress labels Feb 9, 2024
@iamjanr iamjanr self-requested a review February 13, 2024 10:26
Copy link

@iamjanr iamjanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esierra-stratio
Copy link
Author

🙏

@stg-0 stg-0 changed the title [CLOUD-35][Azure] Crear GNP para el IMDS [CLOUD-35][Azure/AKS] Crear GNP para el IMDS Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants