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

virtual-kubelet has different DNS resolution behaviour to standard kubelet #99

Closed
grahamhayes opened this issue May 22, 2019 · 3 comments
Assignees

Comments

@grahamhayes
Copy link
Contributor


Environment summary

Provider (e.g. ACI, AWS Fargate)
ACI
Version (e.g. 0.1, 0.2-beta)
0.9.0
K8s Master Info (e.g. AKS, ACS, Bare Metal, EKS)
AKS
Install Method (e.g. Helm Chart, )
All

Issue Details

When creating a pod, I expect /etc/resolv.conf to be populated like a standard AKS kubelet (or plain upstream kubernetes).

By default, the search domain is left blank, and while it can be overridden by a dnsConfig section on the pod spec, it means that off the shelf software that generates its own pod specs cannot use the DNS based service discovery it relies on.

Repo Steps

apiVersion: v1
kind: Pod
metadata:
  name: helloworld-3
spec:
  containers:
  - image: microsoft/aci-helloworld
    imagePullPolicy: Always
    name: helloworld
    resources:
      requests:
        memory: 1G
        cpu: 1
    ports:
    - containerPort: 80
      name: http
      protocol: TCP
    - containerPort: 443
      name: https
  nodeSelector:
    kubernetes.io/role: agent
    beta.kubernetes.io/os: linux
    type: virtual-kubelet
  tolerations:
  - key: virtual-kubelet.io/provider
    operator: Exists
  - key: azure.com/aci
    effect: NoSchedule

Then (using the ACI interface on the portal)

cat /etc/resolv.conf or try to connect to a service via the cluster dns name with no dns suffixes.

grahamhayes referenced this issue in grahamhayes/virtual-kubelet May 22, 2019
This allows `--cluster-domain` to be passed to virtual kubelet like a
traditional kublet, and use this to generate search-domains for
`/etc/resolv.conf`

* Set default `cluster-domain` to `cluster-local` to match current kubelet
* Added an example usage for the Azure provider
* * Only apply to pods with `DNSClusterFirst` to match kubelet
* * Merge search-domains with any set in the `dnsConfig`

Related: #641

Signed-off-by: Graham Hayes <[email protected]>
grahamhayes referenced this issue in grahamhayes/virtual-kubelet May 23, 2019
This allows `--cluster-domain` to be passed to virtual kubelet like a
traditional kublet, and use this to generate search-domains for
`/etc/resolv.conf`

* Set default `cluster-domain` to `cluster-local` to match current kubelet
* Added an example usage for the Azure provider
* * Only apply to pods with `DNSClusterFirst` to match kubelet
* * Merge search-domains with any set in the `dnsConfig`
* * Set `ndots` to the default 5

Related: #641

Signed-off-by: Graham Hayes <[email protected]>
grahamhayes referenced this issue in grahamhayes/virtual-kubelet Jun 19, 2019
This allows `--cluster-domain` to be passed to virtual kubelet like a
traditional kublet, and use this to generate search-domains for
`/etc/resolv.conf`

* Set default `cluster-domain` to `cluster-local` to match current kubelet

Related: #641

Signed-off-by: Graham Hayes <[email protected]>
grahamhayes referenced this issue in grahamhayes/virtual-kubelet Jun 19, 2019
This allows `--cluster-domain` to be passed to virtual kubelet like a
traditional kublet, and use this to generate search-domains for
`/etc/resolv.conf`

* Set default `cluster-domain` to `cluster-local` to match current kubelet

Related: #641

Signed-off-by: Graham Hayes <[email protected]>
@Romiko
Copy link

Romiko commented Nov 14, 2020

Any update on this being resolved? Excuse the pun.

@dkkapur
Copy link

dkkapur commented Nov 16, 2020

Redirecting this to @macolso @mikkelhegn for latest updates!

@cpuguy83 cpuguy83 transferred this issue from virtual-kubelet/virtual-kubelet Jan 13, 2021
@gossion
Copy link
Contributor

gossion commented Feb 6, 2021

duplicated with #46

@gossion gossion closed this as completed Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants