export PATH=<path/to/kubernetes-directory>/platforms/linux/amd64:$PATH # The exact path depend on your platform
```
```
User credentials and security tokens will be generated later in user directory, not in `~/.kube/config`, they will be necessary to use the CLI or the HTTP Basic Auth.
###Configure AWS Credentials
First check out [this](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) for installing the AWS command line interface, if you use ec2 instance with default amazon AMI, the cli tool has already been installed on your machine.
### Configure AWS Credentials
First check out [this](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) for installing the AWS command line interface.
And then configure your AWS account information:
And then configure your AWS account information:
...
@@ -127,33 +120,35 @@ Default output format: json
...
@@ -127,33 +120,35 @@ Default output format: json
```
```
Test that your credentials work by describing any instances you may already have running on your account:
Verify that your credentials work by describing any instances you may already have running on your account:
```
```
aws ec2 describe-instances
aws ec2 describe-instances
```
```
###Define Cluster Parameters
###Define Cluster Parameters
####EC2 key pair
####EC2 key pair
The keypair that will authenticate SSH access to your EC2 instances. The public half of this key pair will be configured on each CoreOS node.
The keypair that will authenticate SSH access to your EC2 instances. The public half of this key pair will be configured on each CoreOS node.
After creating a key pair, you will use the name you gave the keys to configure the cluster. Key pairs are only available to EC2 instances in the same region. More info in the [EC2 Keypair docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html).
Follow [EC2 Keypair docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) to create a EC2 key pair
####KMS key
After creating a key pair, you will use the name you gave the keys to configure the cluster. Key pairs are only available to EC2 instances in the same region.
#### KMS key
Amazon KMS keys are used to encrypt and decrypt cluster TLS assets. If you already have a KMS Key that you would like to use, you can skip creating a new key and provide the Arn string for your existing key.
Amazon KMS keys are used to encrypt and decrypt cluster TLS assets. If you already have a KMS Key that you would like to use, you can skip creating a new key and provide the Arn string for your existing key.
You can create a KMS key in the AWS console, or with the aws command line tool:
You can create a KMS key in the AWS console, or with the aws command line tool:
When the cluster is created, the controller will expose the TLS-secured API on a public IP address. You will need to create an A record for the external DNS hostname you want to point to this IP address. You can find the API external IP address after the cluster is created by invoking kube-aws status.
When the cluster is created, the controller will expose the TLS-secured API on a public IP address. You will need to create an A record for the external DNS hostname you want to point to this IP address. You can find the API external IP address after the cluster is created by invoking kube-aws status.
####S3 bucket
####S3 bucket
You need to create an S3 bucket before startup the Kubernetes cluster.
You need to create an S3 bucket before startup the Kubernetes cluster.
Here `us-west-1c` is used for parameter `--availability-zone`, but supported availability zone varies among AWS accounts.
Please check if `us-west-1c` is supported by `aws ec2 --region us-west-1 describe-availability-zones`, if not switch to other supported availability zone. (e.g., `us-west-1a`, or `us-west-1b`)
There will now be a cluster.yaml file in the asset directory. This is the main configuration file for your cluster.
There will now be a cluster.yaml file in the asset directory. This is the main configuration file for your cluster.
####Render contents of the asset directory
####Render contents of the asset directory
In the simplest case, you can have kube-aws generate both your TLS identities and certificate authority for you.
In the simplest case, you can have kube-aws generate both your TLS identities and certificate authority for you.
...
@@ -286,21 +288,21 @@ $ tree
...
@@ -286,21 +288,21 @@ $ tree
These assets (templates and credentials) are used to create, update and interact with your Kubernetes cluster.
These assets (templates and credentials) are used to create, update and interact with your Kubernetes cluster.
###Kubernetes Cluster Start Up
###Kubernetes Cluster Start Up
####Create the instances defined in the CloudFormation template
####Create the instances defined in the CloudFormation template
Now for the exciting part, creating your cluster:
Now for the exciting part, creating your cluster (choose any `<prefix>`):
```
```
$ kube-aws up --s3-uri s3://<your-bucket-name>/<prefix>
$ kube-aws up --s3-uri s3://<your-bucket-name>/<prefix>
```
```
####Configure DNS
####Configure DNS
You can invoke `kube-aws status` to get the cluster API endpoint after cluster creation, if necessary. This command can take a while. And then dig the load balancer hostname to get the ip address, use this ip to setup an A record for your external dns name.
You can invoke `kube-aws status` to get the cluster API endpoint after cluster creation, if necessary. This command can take a while. And use command `dig` to check the load balancer hostname to get the ip address, use this ip to setup an A record for your external dns name.