You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If everything is working correctly, your pods should all be in the `Running` state. Run `kubectl get pods -n azure-arc` to confirm whether any pod's state is not `Running`.
125
125
126
+
127
+
### Check whether the DNS resolution is successful for the endpoint
128
+
129
+
From within the pod, you can run a DNS lookup to the endpoint.
130
+
131
+
What if you can't run the [kubectl exec](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec) command to connect to the pod and install the DNS Utils package? In this situation, you can [start a test pod in the same namespace as the problematic pod](https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#create-a-simple-pod-to-use-as-a-test-environment), and then run the tests.
132
+
133
+
> [!NOTE]
134
+
>
135
+
> If the DNS resolution or egress traffic doesn't let you install the necessary network packages, you can use the `rishasi/ubuntu-netutil:1.0` docker image. In this image, the required packages are already installed.
136
+
137
+
Here's an example procedure for checking DNS resolution:
138
+
139
+
1. Start a test pod in the same namespace as the problematic pod:
140
+
141
+
```bash
142
+
kubectl run -it --rm test-pod --namespace <namespace> --image=debian:stable
143
+
```
144
+
145
+
After the test pod is running, you'll gain access to the pod.
146
+
147
+
1. Run the following `apt-get` commands to install other tool packages:
148
+
149
+
```bash
150
+
apt-get update -y
151
+
apt-get install dnsutils -y
152
+
apt-get install curl -y
153
+
apt-get install netcat -y
154
+
```
155
+
156
+
1. After the packages are installed, run the [nslookup](/windows-server/administration/windows-commands/nslookup) command to test the DNS resolution to the endpoint:
157
+
158
+
```console
159
+
$ nslookup microsoft.com
160
+
Server: 10.0.0.10
161
+
Address: 10.0.0.10#53
162
+
...
163
+
...
164
+
Name: microsoft.com
165
+
Address: 20.53.203.50
166
+
```
167
+
168
+
1. Try the DNS resolution from the upstream DNS server directly. This example uses Azure DNS:
169
+
170
+
```console
171
+
$ nslookup microsoft.com 168.63.129.16
172
+
Server: 168.63.129.16
173
+
Address: 168.63.129.16#53
174
+
...
175
+
...
176
+
Address: 20.81.111.85
177
+
```
178
+
179
+
1. Run the `host` command to check whether the DNS requests are routed to the upstream server:
1. Run the [kubectl exec](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec) command to connect to the pod by using PowerShell:
212
+
213
+
```bash
214
+
kubectl exec -it dnsutil-win powershell
215
+
```
216
+
217
+
1. Run the [Resolve-DnsName](/powershell/module/dnsclient/resolve-dnsname) cmdlet in PowerShell to check whether the DNS resolution is working for the endpoint:
If the DNS resolution is not successful, verify the DNS configuration for the cluster.
252
+
253
+
254
+
126
255
### Still having problems?
127
256
128
257
The steps above will resolve many common connection issues, but if you're still unable to connect successfully, generate a troubleshooting log file and then [open a support request](../../azure-portal/supportability/how-to-create-azure-support-request.md) so we can investigate the problem further.
0 commit comments