1

I'm currently trying to go through this tutorial: http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/coreos_multinode_cluster.html

As far as I know, I have AWSCLI set up and configured properly, and EC2 tools as well. I have gone through the first set of instructions:

C:\Program Files\Amazon\AWSCLI>aws ec2 create-security-group --group-name    kubernetes --description "Kubernetes Security Group"
{
    "GroupId": "sg-3876e341"
}

C:\Program Files\Amazon\AWSCLI>aws ec2 authorize-security-group-ingress --group-name kubernetes --protocol tcp --port 22 --cidr 0.0.0.0/0

C:\Program Files\Amazon\AWSCLI>aws ec2 authorize-security-group-ingress --group-name kubernetes --protocol tcp --port 80 --cidr 0.0.0.0/0

C:\Program Files\Amazon\AWSCLI>aws ec2 authorize-security-group-ingress --group-name kubernetes --source-security-group-name kubernetes

But I hit issues when I try to deploy:

C:\Program Files\Amazon\AWSCLI>aws ec2 run-instances --image-id ami-e9aec689 --key-name kuberneteskeys --region us-west-1 --security-groups kubernetes --instance-type t2.micro --user-data file://master.yaml

A client error (InvalidParameterValue) occurred when calling the RunInstances operation: Value () for parameter groupId is invalid. The value cannot be empty

I'm not really sure where to go with that error -- my searches haven't been too fruitful and as far as I know I'm using the command properly.

Any insight to this issue would be greatly appreciated!

tparrott
  • 185
  • 1
  • 3
  • 9

1 Answers1

2

Use the security group GroupId instead of the name for the value of --security-groups and you should find it will work. This will be necessary because a VPC is being used.

As an aside, I'd highly recommend you look at Terraform. There are a few scripts out there to turn up a Kubernetes cluster on AWS - with a single command.

  • Ok, I gave that a go and got the following: C:\Program Files\Amazon\AWSCLI>aws ec2 run-instances --image-id ami-e9aec689 --key-name kuberneteskeys --region us-west-1 --security-group-id sg-3876e341 --instance-type t2.micro --user-data file://master.yaml A client error (InvalidGroup.NotFound) occurred when calling the RunInstances operation: The security group 'sg-3876e341' does not exist in VPC 'vpc-678c1c02' Sorry if these questions are really basic! – tparrott Jan 09 '16 at 22:36
  • Never mind, was just a region issue! Thanks for the help! – tparrott Jan 09 '16 at 22:49