How to specify zone ID with kops?

7/7/2019

on

 kops edit ig nodes 

I am getting

error determining default DNS zone: Found multiple hosted zones matching cluster ".domain"; please specify the ID of the zone to use

cluster looks like this

$ kops get ig
Using cluster from kubectl context: dev3.onchain.live

NAME                    ROLE    MACHINETYPE     MIN     MAX     ZONES
master-us-east-1b       Master  m4.large        1       1       us-east-1b
nodes                   Node    m4.large        3       3       us-east-1b

adding

 --state=$KOPS_STATE_STORE

did not help.

-- Nabil Sham
kops
kubernetes

1 Answer

7/7/2019

It lives in the ClusterSpec YAML file:

// DNSZone is the DNS zone we should use when configuring DNS
// This is because some clouds let us define a managed zone foo.bar, and then have
// kubernetes.dev.foo.bar, without needing to define dev.foo.bar as a hosted zone.
// DNSZone will probably be a suffix of the MasterPublicName and MasterInternalName
// Note that DNSZone can either by the host name of the zone (containing dots),
// or can be an identifier for the zone.
DNSZone string `json:"dnsZone,omitempty"`

Though having more than one is usually a configuration issue in Route53. Or at least it's not normal to have multiple matching zones.

-- coderanger
Source: StackOverflow