What kops version are you running? use kops version
drpaneas@localhost:~> kops version
Version 1.7.1 (git-c69b811)
What Kubernetes version are you running? use kubectl version
drpaneas@localhost:~> kubectl --version
Kubernetes v1.7.7
What cloud provider are you using?
Amazon AWS
What commands did you execute (Please provide cluster manifest kops get --name my.example.com, if available) and what happened after commands executed?
kops create cluster --name=sinefaki.de --state=s3://kops-state-djh3 --zones=eu-central-1 --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=sinefaki.de
What you expected to happen:
To deploy a kubernetes cluster, with 1 master and 2 workers.
How can we to reproduce it (as minimally and precisely as possible):
Go to: Security, Identity & Compliance > IAM (Identity Access Management)
Go to: Users (from the left column) and click Add user: username: kops
You also need to generate an access key for both:
[x] Programmatic Access
[x] AWS Management Console Access
The kops user will require the following IAM permissions to function properly: Either give to our user: AdministratorAccess as the attached policy or if you are kind of concerned about giving all the permissions for free you can also give less:
AmazonRoute53FullAccess
AmazonS3FullAccess
IAMFullAccess
AmazonVPCFullAccess
Come back to the command line and configure aws-cli
drpaneas@localhost:~/Downloads> aws configure
AWS Access Key ID [None]: <YOURKEY>
AWS Secret Access Key [None]: <YOURSECRET>
Default region name [None]: <--- not necessarry but I can use mine: eu-central-1 (this is for Frankfurt)
Default output format [None]: <--- not necessarry (you can use either 'json' or 'text')
Create Bucket. Here's my configuration:Bucket Name: kops-state-djh3 (just a random string -- makes sure it's unique in Amazon in that region)
Region: EU (Frankfurt) <-- the region where you are going to deploy the cluster.
Next thing is the DNS. kops will setup the DNS but we need a domain. Let's use Route 53 for that.
Go to: Networking & Content Delivery > Route 53
There I bought a new domain, and it gets your Hosted Zone configured automatically with the appropriate NS and SOA. You can use your own, but make sure you provide the amazon's NS in your domain registrar.
Try to execute: aws ec2 describe-regions
This worked and it returned a JSON with all the available zones.
kops create cluster --name=sinefaki.de --state=s3://kops-state-djh3 --zones=eu-central-1 --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=sinefaki.de
It fails with:
unable to infer CloudProvider from Zones (is there a typo in --zones?)
My bad, I've just had to use the full zone and not just the region name.
e.g.
kops create cluster --name=sinefaki.de --state=s3://kops-state-djh3 --zones=eu-central-1a --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=sinefaki.de
to find your full zone name for your region:
aws ec2 describe-availability-zones --region eu-central-1
The k8s deployment works fine. I am closing this issue.
Most helpful comment
My bad, I've just had to use the full zone and not just the region name.
e.g.
kops create cluster --name=sinefaki.de --state=s3://kops-state-djh3 --zones=eu-central-1a --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=sinefaki.deto find your full zone name for your region:
aws ec2 describe-availability-zones --region eu-central-1The k8s deployment works fine. I am closing this issue.