<p>I am having an issue while creating a k8 cluster with kops command.</p>

<p>This is the error i was getting when i am trying to create cluster.</p>

<pre><code>W1104 16:31:41.803150   18534 apply_cluster.go:945] **unable to pre-create DNS records - cluster startup may be slower: Error pre-creating DNS records: InvalidChangeBatch**: [RRSet with DNS name api.dev.devops.com. is not permitted in zone uswest2.dev.devops.com., RRSet with DNS name api.internal.dev.devops.com. is not permitted in zone uswest2.dev.devops.com.]
</code></pre>

<p>commands i used to create cluster: </p>

<pre><code>kops create cluster --cloud=aws --zones=us-west-2b --name=dev.devops.com --dns-zone=uswest2.dev.devops.com --dns private

kops update cluster --name dev.devops.com --yes
</code></pre>

<p>Can someone please help me. Thanks in advance!!</p>

<p>You have registered your <code>dns-zone</code> as <code>uswest2.dev.devops.com</code> and you are referring in command to name as <code>dev.devops.com</code>.</p>

<p>If you will check <a href="https://github.com/kubernetes/kops/blob/master/docs/getting_started/aws.md" rel="nofollow noreferrer">this docs</a>, especially <a href="https://github.com/kubernetes/kops/blob/master/docs/getting_started/aws.md#configure-dns" rel="nofollow noreferrer">Configure DNS</a> section, you will find that:</p>

<blockquote>
  <p>In this scenario you want to contain all kubernetes records under a
  subdomain of a domain you host in Route53. This requires creating a
  second hosted zone in route53, and then setting up route delegation to
  the new zone.</p>
  
  <p>In this example you own <code>example.com</code> and your records for Kubernetes
  would look like
  <code>etcd-us-east-1c.internal.clustername.subdomain.example.com</code></p>
</blockquote>

<p>You will find that based on this doc example: 
<code>etcd-us-east-1c.internal.clustername.subdomain.example.com</code>
Your <code>dev.devops.com</code> is domain and <code>uswest2.dev.devops.com</code> is your subdomain.</p>

<p>In <a href="https://github.com/kubernetes/kops/blob/master/docs/examples/kops-test-route53-subdomain.md" rel="nofollow noreferrer">Route 53</a> docs you will be able find example where subdomain for <code>example.org</code> in this case was set as <code>kopsclustertest</code></p>

<pre><code>export ID=$(uuidgen)
echo $ID
ae852c68-78b3-41af-85ee-997fc470fd1c

aws route53 \
create-hosted-zone \
--output=json \
--name kopsclustertest.example.org \
--caller-reference $ID | \
jq .DelegationSet.NameServers

[
  "ns-1383.awsdns-44.org",
  "ns-829.awsdns-39.net",
  "ns-346.awsdns-43.com",
  "ns-1973.awsdns-54.co.uk"
]
</code></pre>

<p>At this moment:
<strong>subdomain:</strong> <code>kopsclustertest</code>
<strong>domain:</strong> <code>example.org</code></p>

<p>A few chapters below you will find <strong>KOPS CLUSTER CREATION</strong> section.</p>

<pre><code>kops create cluster \
--cloud=aws \
--master-zones=us-east-1a,us-east-1b,us-east-1c \
--zones=us-east-1a,us-east-1b,us-east-1c \
--node-count=2 \
--node-size=t2.micro \
--master-size=t2.micro \
${NAME}
</code></pre>

<p>with information that </p>

<blockquote>
  <p>The environment variable ${NAME} was previously exported with our
  cluster name: <code>mycluster01.kopsclustertest.example.org</code>.</p>
</blockquote>

<p>It means that before <code>subdomain.domain</code> you need to specify your cluster name.</p>

<p>In short, in flag <code>--name</code> you must specify:
<code>&lt;your_cluster_name&gt;.subdomain.domain</code></p>

<p>Please try:</p>

<p><code>kops create cluster --cloud=aws --zones=us-west-2b --name=my-cluster.uswest2.dev.devops.com --dns-zone=uswest2.dev.devops.com --dns private</code></p>
