Currently kops fails to create a cluster in the eu-west-2 availability zone. Initially it fails to infer the cloud provider:
➜ kubernetes kops create cluster --zones eu-west-2a ${NAME}
unable to infer CloudProvider from Zones (is there a typo in --zones?)
Then when explicitly specifying the cloud provider using --cloud aws, creating works fine but update seems to fail to find an AMI for the zone:
kops update cluster ${NAME} --target terraform
...
W1226 20:00:09.715067 60756 executor.go:109] error running task "LaunchConfiguration/master-eu-west-2a.masters.<cluster name>" (9m59s remaining to succeed): could not find Image for "kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2016-10-21"
...
This is actually a issue kubernetes code as well. https://github.com/kubernetes/kubernetes/blob/master/pkg/credentialprovider/aws/aws_credentials.go
Checking to see if we have a fix in for k8s.
Once this gets in https://github.com/kubernetes/kubernetes/pull/38880 <- we should be better.
Is there also plans to support 3 (or 5) master instances in eu-west-2, given that there are only two AZs in London? At the moment kops create cluster will only let me specify one master, as number of AZs and number of etcd instances seem to be directly bound together?
There are issues open for that
Specifically for 1.5 we're waiting on the cherry-pick of https://github.com/kubernetes/kubernetes/pull/39689
if anyone lands here from google, please check:
https://github.com/kubernetes/kops/blob/1865ceea80c5792b20e5949b25070b1b15c67374/docs/cli/kops_create_cluster.md
you can specify the cloud provider to use (aws) rather than allowing kops to guess
@thepauleh Did that work for you?
Using --cloud aws worked for me being able to provision the Cluster but then I had problems using kubectl and being able to connect to it.
I'm not sure 100% if it was eu-west-2 related though
yeah no chance on 1.5.3, similar to this: https://github.com/kubernetes-incubator/kube-aws/issues/198, kubelet won't come up:
Error: failed to run Kubelet: could not init cloud provider "aws": not a valid AWS zone (unknown region): eu-west-2a
Does kops support eu-west-2 (London) already, because I am still having this problem when trying to create a cluster in any of the zones in that region.
anyone had any luck with eu-west-2 recently? I really want to get this running but every time i get sysadmin approval and it fails it's harder for me to push the migration through
@thepauleh this is really a kubernetes issue, and not so much kops, but what error are you getting? Yes, it should be supported, I think it was fixed in k8s mid 1.6.x, and is supported in 1.7.x k8s.
Yep think this issue can be closed now
I've just created a cluster in eu-west-2
For those who need to check versions, I upgraded my kubectl and utilised the latest 1.7.x version of kops.
kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.4", GitCommit:"793658f2d7ca7f064d2bdf606519f9fe1229c381", GitTreeState:"clean", BuildDate:"2017-08-17T08:48:23Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.2", GitCommit:"922a86cfcd65915a9b2f69f3f193b8907d741d9c", GitTreeState:"clean", BuildDate:"2017-07-21T08:08:00Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Also, you do still need to utilise the --cloud parameter with kops. Its not yet currently identifying that eu-west-2 indicates AWS.
For example:
kops create cluster \
--name=$DNS_ZONE \
--state=s3://SOME_BUCKET \
--node-count=2 \
--zones=eu-west-2a,eu-west-2b \
--node-size=t2.medium \
--master-size=t2.small \
--topology=private \
--networking=flannel \
--bastion="true" \
--cloud=aws \
--ssh-public-key=./some_key \
I think this should be reopened -
Also, you do still need to utilise the --cloud parameter with kops. Its not yet currently identifying that eu-west-2 indicates AWS.
That is a kops issue and should be fixed :-)
Tried with 1.7.1 and still getting the error:
$ kops create cluster --name example.cluster.k8s.local --master-count 3 --master-zones eu-west-2a,eu-west-2b --zones eu-west-2a,eu-west-2b --yes
W1107 09:24:56.098521 81818 create_cluster.go:496] Running with masters in the same AZs; redundancy will be reduced
unable to infer CloudProvider from Zones (is there a typo in --zones?)
Same error here with 1.7.1 using London AWS region:
unable to infer CloudProvider from Zones (is there a typo in --zones?)
/open
Well that did not work with the bot. If anyone wants to do a patch for 1.8, we can get this fixed. I may have some time.
looks like https://github.com/kubernetes/kops/commit/b5066c967bbbfeafcf85bbd00a719e5a0fa131bd#diff-31083c19e09ee7bbc1a3b47f8ef9520b added it to master, just needs releasing.
Are a and b the only ones? Can someone test 1.8 beta please?
With 1.8-beta1, the following command works:
kops create cluster --name example2.cluster.k8s.local --zones eu-west-2a,eu-west-2b --yes
And the output is:
./kops validate cluster --name example2.cluster.k8s.local
Validating cluster example2.cluster.k8s.local
INSTANCE GROUPS
NAME ROLE MACHINETYPE MIN MAX SUBNETS
master-eu-west-2a Master c4.large 1 1 eu-west-2a
nodes Node t2.medium 2 2 eu-west-2a,eu-west-2b
NODE STATUS
NAME ROLE READY
ip-172-20-41-53.eu-west-2.compute.internal master True
ip-172-20-47-49.eu-west-2.compute.internal node True
ip-172-20-74-106.eu-west-2.compute.internal node True
Your cluster example2.cluster.k8s.local is ready
Yep, only two AZs for eu-west-2. I don't have an aws account to play with tonight to test, but looks like this is closeable :-)
Closing
Most helpful comment
@thepauleh Did that work for you?
Using
--cloud awsworked for me being able to provision the Cluster but then I had problems using kubectl and being able to connect to it.I'm not sure 100% if it was eu-west-2 related though