aws-samples / aws-samples/eks-workshop-v2
[Bug]: kubectl lookup DNS slow when using finch make shell
- Dominant language
- HCL
- Stars
- 626
- Forks
- 613
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 9
Description
### Installation method
Own AWS account
### What happened?
When using `kubectl` in the `make shell` environment takes up to 16s, this only happens when using finch.
It looks like is a DNS issue in the finch vm
### What did you expect to happen?
kubectl to take in the range of ms
### How can we reproduce it?
run
```
CONTAINER_CLI=finch make shell
```
Then run kubectl
```
time kubectl get ns -v 10
```
You will see the DNS lookup times `Duration 15057 ms`
```
...
HTTP Trace: DNS Lookup for 5AC4C97DE1A804F7899046F7A9F9795F.gr7.us-west-2.eks.amazonaws.com resolved to [{35.160.140.219 } {54.200.23.171 }]
HTTP Trace: Dial to tcp:35.160.140.219:443 succeed
HTTP Statistics: DNSLookup 12033 ms Dial 88 ms TLSHandshake 148 ms ServerProcessing 98 ms Duration 15057 ms
...
real 0m16.003s
user 0m3.375s
sys 0m0.464s
```
Inside the shell DNS setup
```
cat /etc/resolv.conf
search lan
nameserver 192.168.5.3
nameserver 192.168.105.1
```
### Anything else we need to know?
The problem doesn't occurs in other environments like
- Cloud 9 shell
- Docker CLI with Colima
- Local workstation
### EKS version
N/A
Contributor guide
Research direction
Start by reproducing the issue with `CONTAINER_CLI=finch make shell`, then inspect `/etc/resolv.conf` and run `time kubectl get ns -v 10`. Compare the DNS lookup duration and resolver configuration with the listed working environments; done means kubectl DNS lookup no longer takes about 12–15 seconds in the Finch shell.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- cli, cloud, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100