kops: create cluster error with private subnets attached to VPG "InternetGateway for shared VPC was not found"
Thanks for submitting an issue! Please fill in as much of the template below as you can.
------------- BUG REPORT TEMPLATE --------------------
- What
kopsversion are you running? The commandkops version, will display this information.
kops version Version 1.8.0 (git-5099bc5)
- What Kubernetes version are you running?
kubectl versionwill print the version if a cluster is running or provide the Kubernetes version specified as akopsflag. kubectl version
Server Version: version.Info{Major:“1”, Minor:“7”, GitVersion:“v1.7.10”, GitCommit:“bebdeb749f1fa3da9e1312c4b08e439c404b3136”, GitTreeState:“clean”, BuildDate:“2017-11-03T16:31:49Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“linux/amd64”}
- What cloud provider are you using?
AWS
- What commands did you run? What is the simplest way to reproduce this issue? config file
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
name: k8s-mydomain.net
spec:
api:
loadBalancer:
type: Public
authorization:
alwaysAllow: {}
channel: stable
cloudProvider: aws
configBase: s3://state.kubernetes.mydomain.net/k8s-mydomain.net
dnsZone: mydomain.net
etcdClusters:
- etcdMembers:
- instanceGroup: master-us-east-1a
name: a
- instanceGroup: master-us-east-1b
name: b
- instanceGroup: master-us-east-1c
name: c
name: main
- etcdMembers:
- instanceGroup: master-us-east-1a
name: a
- instanceGroup: master-us-east-1b
name: b
- instanceGroup: master-us-east-1c
name: c
name: events
kubernetesApiAccess:
- 68.114.34.8/29
kubernetesVersion: 1.8.4
masterInternalName: api.internal.k8s-mydomain.net
masterPublicName: api.k8s-mydomain.net
networkCIDR: 66.74.160.0/21
networkID: vpc-2204d75a
networking:
calico: {}
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 68.114.34.8/29
subnets:
- cidr: 66.74.160.0/23
id: subnet-c0fb7da4
name: us-east-1a
type: Private
zone: us-east-1a
- cidr: 66.74.162.0/23
id: subnet-87c127a8
name: us-east-1b
type: Private
zone: us-east-1b
- cidr: 66.74.164.0/23
id: subnet-2f18b964
name: us-east-1c
type: Private
zone: us-east-1c
topology:
dns:
type: Public
masters: private
nodes: private
command run
kops create -f config.yaml --state=s3://state.kubernetes.mydomain.net
kops update cluster --name k8s-mydomain.net --state=s3://state.kubernetes.mydomain.net
- What happened after the commands executed?
Throws load balancer not able to create error as below
I0205 23:01:14.790637 25570 executor.go:91] Tasks: 105 done / 110 total; 1 can run
W0205 23:01:18.442203 25570 executor.go:109] error running task "LoadBalancer/api.k8s-mydomain.net" (1m59s remaining to succeed): Field is required: Subnets
I0205 23:01:18.442226 25570 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)
I0205 23:01:28.443063 25570 executor.go:91] Tasks: 105 done / 110 total; 1 can run
W0205 23:01:32.518723 25570 executor.go:109] error running task "LoadBalancer/api.k8s-mydomain.net" (1m45s remaining to succeed): Field is required: Subnets
I0205 23:01:32.518753 25570 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)
I0205 23:01:42.518955 25570 executor.go:91] Tasks: 105 done / 110 total; 1 can run
W0205 23:01:46.429382 25570 executor.go:109] error running task "LoadBalancer/api.k8s-mydomain.net" (1m31s remaining to succeed): Field is required: Subnets
I0205 23:01:46.429414 25570 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)
I0205 23:01:56.430220 25570 executor.go:91] Tasks: 105 done / 110 total; 1 can run
W0205 23:02:00.499357 25570 executor.go:109] error running task "LoadBalancer/api.k8s-mydomain.net" (1m17s remaining to succeed): Field is required: Subnets
I0205 23:02:00.499390 25570 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)
I0205 23:02:10.500589 25570 executor.go:91] Tasks: 105 done / 110 total; 1 can run
W0205 23:02:14.389853 25570 executor.go:109] error running task "LoadBalancer/api.k8s-mydomain.net" (1m3s remaining to succeed): Field is required: Subnets
I0205 23:02:14.389880 25570 executor.go:124] No progress made, sleeping before retrying 1 failed task(s)
I0205 23:02:24.390628 25570 executor.go:91] Tasks: 105 done / 110 total; 1 can run
- What did you expect to happen?
It should create ELB
-
Please provide your cluster manifest. Execute
kops get --name my.example.com -oyamlto display your cluster manifest. You may want to remove your cluster name and other sensitive information. Added above -
Please run the commands with most verbose logging by adding the
-v 10flag. Paste the logs into this report, or in a gist and provide the gist link here. -
Anything else do we need to know?
Above subnets are private subnets attached with AWS Virtual Private Gateway (vpg). For other cluster creation i used subnets attached with ig and natgateway which are working fine.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (4 by maintainers)
@ssubramanian123
I have stumbled over this one also and got this solved after reading some of the kops code, there is a flag to be used when creating a cluster, when updating it for the first time (on creation) use the following command:
kops update cluster --yes --lifecycle-overrides InternetGateway=Ignore
Let me know if that helps you
Roiy
I missed to change in one more place where loadbalancer was defined as public.
This works fine now.