kops icon indicating copy to clipboard operation
kops copied to clipboard

Cluster not entirely spun up (API Record Not Created)

Open brvtl opened this issue 10 years ago • 45 comments

I’m trying to setup a cluster in a new aws account using kops following this guide

I have noticed that 2 records aren’t being created. api.clustername.domain.com and api.internal.clustername.domain.com. I only have the domain records for the etcd service.

As a result I am unable to connect to my cluster using kubectl. From what I can tell the master and the other nodes are running, however, manually creating these domain records has been unfruitful. So I suspect there may be other issues.

brvtl avatar Nov 09 '16 22:11 brvtl

@justinsb @chrislovecnm I'm seeing a ton of reports with this issue in the past week on Slack. Anything changed recently that would cause this?

yissachar avatar Nov 09 '16 22:11 yissachar

I feel like I should mention that mine resolved itself after ~20 minutes but I'm leaving this open as other people are still seeing the issue

brvtl avatar Nov 09 '16 22:11 brvtl

I experienced this when I didn't have my NS records publishing the subdomain I was using. When the NS records were added the api records were created.

shrabok-surge avatar Nov 09 '16 23:11 shrabok-surge

@shrabok-surge can you be more specific? Maybe even use the example from http://kubernetes.io/docs/getting-started-guides/kops/

When you ref subdomain are you saying useast1 or dev in useast1.dev.example.com ?

tomdavidson avatar Nov 09 '16 23:11 tomdavidson

checkout out the terraform output there are no route 53 resources. how is the cluster subdomains suppose to be created?

tomdavidson avatar Nov 10 '16 00:11 tomdavidson

@petergarbers From a machine within the same VPC, are you able to resolve your domain : dig ns clustername.domain.com ?

juliendf avatar Nov 10 '16 09:11 juliendf

@CliMz I have the same problem (no api domain names, and do have etcd names). I successfully resolved dig ns clustername.domain.com from a machine within the same VPC

ghost avatar Nov 10 '16 13:11 ghost

I waited over an our but still no api domain :-/

I ssh'd into the admin node and in the /var/log/kube-apiserver.log i see: controller.go:88] Unable to perform initial IP allocation check: unable to refresh the service IP block: client: etcd cluster is unavailable or misconfigured

Is this relevant?

ghost avatar Nov 10 '16 17:11 ghost

@cyberroadie please add you install command, kops version, aws region.

chrislovecnm avatar Nov 10 '16 19:11 chrislovecnm

Solved: Found out what the problem was: misconfiguration of the DNS subdomain. Logging in into the master node and looking in the /var/log/etcd.log file I could see the region.dev.xx.xx domain didn't get resolved. This prevented the etcd server from starting and subsequently prevented the api server from starting because it couldn't connect to the etcd cluster.

ghost avatar Nov 11 '16 09:11 ghost

@cyberroadie is this a bug or is this a subdomain you configured for for the cluster? For example, I have done exactly has described in http://kubernetes.io/docs/getting-started-guides/kops/ but have the same symptoms you have had.

tomdavidson avatar Nov 11 '16 16:11 tomdavidson

@tomdavidson It's not a bug. I made a mistake setting up the subdomain in route53

ghost avatar Nov 11 '16 16:11 ghost

@cyberroadie We are not the only ones so maybe we are all making the same mistake. Is there an issue with the steps in http://kubernetes.io/docs/getting-started-guides/kops/ ?

tomdavidson avatar Nov 11 '16 19:11 tomdavidson

I can describe to steps I took: I was creating a test run for setting up a kubernetes cluster. As described, if your not in control of the main domain e.g. testing.net you can create a hosted zone for the subdomain e.g. dev.testing.net. This will be the case in a future project. But now as a test I added two hosted zones in route53 with a domain I control myself. One was for testing.net and another for dev.testing.net. This didn't work. resolving it with dig ns dev.testing.net returned the dns server of testing.net and couldn't find dev.testing.net. So for the test I dropped the dev.testing.net hosted zone and let everything add to the 'testing.net' hosted zone. I gave priority to testing the cluster first; I still have to figure out how to do the sub domain hosted zone. Re-reading the documentation now, have to say I'm slightly puzzled how to setup the NS records correctly in this scenario.

ghost avatar Nov 11 '16 19:11 ghost

PS the etcd domain names where added to the dev.testing.net hosted zone

ghost avatar Nov 11 '16 19:11 ghost

Yes, Im conused about the NS too. In my case I deletated a zone to r53 - c.b.a.edu. Then with kops create I used a name such as tom.c.b.a.edu. etcd records were created for tom.c.b.a.edu but nothing else.

tomdavidson avatar Nov 11 '16 20:11 tomdavidson

Can I get a status on where this issue is at? Not following the comments ;)

chrislovecnm avatar Nov 11 '16 20:11 chrislovecnm

@chrislovecnm I have not been able to confirm the NS is configured as needed by kops. I have done excatly as discribed in http://kubernetes.io/docs/getting-started-guides/kops/ but the direction is not the clear.

This is potentially all user error / unclear docs but until we can clarify the needed config we can not verify it is soley user error.

tomdavidson avatar Nov 11 '16 20:11 tomdavidson

Take a look at this http://blog.couchbase.com/2016/november/multimaster-kubernetes-cluster-amazon-kops

We have an issue to drop something like this into our docs

chrislovecnm avatar Nov 11 '16 20:11 chrislovecnm

I'm going to have a play around this weekend to see if I can create more clarity. For the project I'm currently working on it would be ideal if every developer team has control over it's own subdomain and the main domain is controlled separately. (Both in route53)

Test scenario:

  • parent domain in a hosted zone in route53
  • sub domains in separate hosted zones, also in route53

So far we know:

  • with a kops install the etcd domains get added to the subdomain hosted zone
  • when a node tries to resolve a etcd domain it goes to the parent domain hosted zone (ignoring the subdomain hosted zone)

Acceptance criteria

  • VM within the VPC setup by kops resolves the etcd domain name

Outcome:

  • Step by step documentation on how to do this

PS You can find me on slack: #kubernetes-users

ghost avatar Nov 12 '16 05:11 ghost