Skip to content

franquis/coreos-kubernetes-ec2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note (04/08/2015) This guide has been superseeded by the tutorial provided by @GoogleCloudPlatform

CoreOS and Kubernetes on Amazon EC2

This how-to guide describes how to set-up a CoreOS cluster running Kubernetes on Amazon EC2.

The provision-ec2.sh script will create :

  • 4 instances (1 kubernetes-master & 3 kubernetes-minion)
  • 2 security groups (KubernetesMasterSecurityGroup,KubernetesMinionSecurityGroup)

This is currently a work in progress

Notes

This documentation is based on the [how-to guide provided by kelseyhightowaer] (https://github.com/kelseyhightower/kubernetes-coreos) and the [Deis provisionning documentation] (https://github.com/deis/deis/tree/master/contrib/ec2)

Todos

  • Create a VPC with custom subnets and assign privates IP to instances
  • Edit the apiserver config and set either the machines param or a cloudprovider param
$ pip install awscli
Downloading/unpacking awscli
  Downloading awscli-1.3.6.tar.gz (173kB): 173kB downloaded
  ...

Configure aws-cli

Run aws configure to set your AWS credentials:

$ aws configure
AWS Access Key ID [None]: ***************
AWS Secret Access Key [None]: ************************
Default region name [None]: us-west-1
Default output format [None]:

Upload keys

If required, upload a new keypair to AWS. In the following example, the key name is "Kubernetes".

$ export AWS_PUBLIC_KEY = '~/.ssh/id_rsa.pub'
$ export AWS_KEY_NAME = 'Kubernetes'
$ aws ec2 import-key-pair --key-name $AWS_KEY_NAME --public-key-material file://$AWS_PUBLIC_KEY

Configure config.json

  • Change the "KeyPair" value to "Kubernetes", or to another key you would like to connect with.
  • Browse to https://discovery.etcd.io/new and set the token provided into the "DiscoveryURL" value.

Run the provision script

$ ./provision-ec2.sh
{
    "StackId": "arn:aws:cloudformation:eu-west-1:584689320675:stack/kubernetes/8bc79630-2f80-11e4-bf62-507bb00bdc04"
}
Your Kubernetes cluster has successfully deployed to AWS CloudFormation.

Open Cloudformation to see the creation status of your Kubernetes Stack

Useful resources

About

Deploy CoreOS and Kubernetes on Amazon EC2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages