0

Why is it that when I try to update a new Kubernetes cluster it gives the following error:

$ kops update cluster --name k8s-web-dev
   error building tasks: could not find utility subnet in zone: "us-east-1b"

I have not been able to deploy it into aws yet. It only creates configs inside s3.

Also because I have private and public subnets I am updating manually k8s config to point to correct subnet-ids. e.g: The ids were added manually.

subnets: - cidr: 10.0.0.0/19 id: subnet-3724bb40 name: us-east-1b type: Private zone: us-east-1b - cidr: 10.0.64.0/19 id: subnet-918a35c8 name: us-east-1c type: Private zone: us-east-1c - cidr: 10.0.32.0/20 id: subnet-4824bb3f name: utility-us-east-1b type: Public zone: us-east-1b - cidr: 10.0.96.0/20 id: subnet-908a35c9 name: utility-us-east-1c type: Public zone: us-east-1c

Also interestingly enough I did no change in my config. But when I run the kops update once and then once more I get two different results. How is that possible?

kops update cluster --name $n error building tasks: could not find utility subnet in zone: "us-east-1c"

and then this

kops update cluster --name $n error building tasks: could not find utility subnet in zone: "us-east-1b"

Ura718
  • 371
  • 2
  • 6
  • 13
  • Maybe u need to update ur kops version https://github.com/kubernetes/kops/issues/1147 – Ijaz Ahmad Nov 06 '18 at 21:39
  • @Ura718, Can you provide `kops version`? – Nick_Kh Nov 07 '18 at 11:10
  • My kops version is: Version 1.8.1 (git-94ef202) – Ura718 Nov 07 '18 at 18:49
  • So it looks like was able to resolve the problem. The issue stemmed from trying to build a cluster with a bastion host (e.g: --bastion) within the kops create cluster parameter options. I excluded the bastion host option and built the cluster only with master/nodes. That seemed to fix the problem. I'm guessing that if you try to build the cluster with --bastion option it wont find the custom public utility subnet id. I dont know why... But in any case without the bastion host option the cluster build worked. – Ura718 Nov 07 '18 at 20:44

1 Answers1

0

Using --bastion parameter within kops command line options assumes that bastion instance group is already in place. To create bastion instance group you can use --role flag:

kops create instancegroup bastions --role Bastion --subnet $SUBNET

Check this link for more information.

Nick_Kh
  • 5,089
  • 2
  • 10
  • 16