Skip to content

bottlerocket with mulitple cluster-dns  #4836

Open
@mzupan

Description

Description

Observed Behavior:

Not able to set mulitple ips for cluster-dns-ip

bottlerocket allows you to set it via

# Valid, single IP
[settings.kubernetes]
"cluster-dns-ip" = "10.0.0.1"

# Also valid, multiple nameserver IPs
[settings.kubernetes]
"cluster-dns-ip" = ["10.0.0.1", "10.0.0.2"]

Trying to set it like

[settings.kubernetes]
"cluster-dns-ip" = ["10.0.0.1", "10.0.0.2"]

Gives the following log

karpenter-f7cdc49f4-25kbx controller 2023-10-15T02:10:53.850Z	ERROR	controller	Reconciler error	{"commit": "322822a", "controller": "machine.lifecycle", "controllerGroup": "karpenter.sh", "controllerKind": "Machine", "Machine": {"name":"workers-gmsx5"}, "namespace": "", "name": "workers-gmsx5", "reconcileID": "8ace2c6e-45f7-4bb4-84d8-79388dde83b0", "error": "launching machine, creating instance, getting launch template configs, getting launch templates, creating launch template, invalid UserData toml: cannot decode TOML array into struct field bootstrap.BottlerocketKubernetes.ClusterDNSIP of type *string"}

Looking at the code it takes a string but even if you do it with a comma it always just has one which is the default kube-dns

https://github.com/aws/karpenter/blob/main/pkg/providers/amifamily/bootstrap/bottlerocket.go#L59

Expected Behavior:

be able to have a /etc/resolv.conf in pods like

node-local helps to stop against loading a lot of coredns servers so we aren't rate limited by the vpc resolver.

$ cat /etc/resolv.conf
search testing.svc.cluster.local svc.cluster.local cluster.local ec2.internal
nameserver 169.254.20.10
nameserver 172.20.0.10

Reproduction Steps (Please include YAML):

Tried both of the following

     userData: |
        [settings.kubernetes]
        "cluster-dns-ip" = ["169.254.20.10","172.20.0.10"]

and

     userData: |
        [settings.kubernetes]
        "cluster-dns-ip" = "169.254.20.10,172.20.0.10"

Versions:

  • Chart Version:
  • Kubernetes Version (kubectl version):
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions