How to access internal ip such as 10.100.xxx.xxx from AKS?

Liang Hong 1 Reputation point
2022-10-21T22:23:41.517+00:00

Hi,

I am new to AKS and just tried created a cluster and run a hello program. The hello program image is in our company artifactory which has internal ip such 10.100.xxx.xxx or 10.220.xxx.xxx
From what I found on web, k8s master node(control plane) is managed by Azure, AKS does not provide direct access(such as ssh) to the cluster.
So there is no way to modify /etc/hosts to add dns entries. Even we can add those dns entries, what else needs to be done to access those internal ip and fetch the image? Do we need to setup vpn?

Below are the error logs of the pod:

Blockquote

Normal Pulling 29s (x4 over 119s) kubelet Pulling image "sv-artifactory.xxxxxxx.com/lccmninf/grpc_server_2_0/x86_64:kube-test"
Warning Failed 29s (x4 over 119s) kubelet Failed to pull image "sv-artifactory.xxxxxxx.com/lccmninf/grpc_server_2_0/x86_64:kube-test": rpc error: code = Unknown desc = failed to pull and unpack image "sv-artifactory.xxxxxxx.com/lccmninf/grpc_server_2_0/x86_64:kube-test": failed to resolve reference "sv-artifactory.xxxxxxx.com/lccmninf/grpc_server_2_0/x86_64:kube-test": failed to do request: Head "https://sv-artifactory.xxxxxxx.com/v2/lccmninf/grpc_server_2_0/x86_64/manifests/kube-test": dial tcp: lookup sv-artifactory.xxxxxxx.com on 168.63.129.16:53: no such host
Warning Failed 29s (x4 over 119s) kubelet Error: ErrImagePull
Warning Failed 18s (x6 over 119s) kubelet Error: ImagePullBackOff

Thanks
Liang

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,932 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lex Li (Microsoft) 4,827 Reputation points Microsoft Employee
    2022-10-22T06:03:22.8+00:00

    A more common approach is to sync your on-premise container image registry with ACR,

    https://learn.microsoft.com/en-us/azure/container-registry/intro-connected-registry

    Then your AKS cluster can pull images from ACR directly.

    0 comments No comments