2016-02-24 21:47:57 +00:00
---
2018-02-20 22:18:39 +00:00
reviewers:
2016-07-29 17:36:25 +00:00
- justinsb
2016-10-26 16:28:26 +00:00
- clove
2016-12-15 20:16:54 +00:00
title: Running Kubernetes on AWS EC2
2018-08-21 14:37:18 +00:00
content_template: templates/task
2016-02-24 21:47:57 +00:00
---
2016-03-07 02:29:06 +00:00
2018-08-21 14:37:18 +00:00
{{% capture overview %}}
2016-03-07 02:29:06 +00:00
2018-08-21 14:37:18 +00:00
This page describes how to install a Kubernetes cluster on AWS.
2016-10-26 16:28:26 +00:00
2018-08-21 14:37:18 +00:00
{{% /capture %}}
{{% capture prerequisites %}}
To create a Kubernetes cluster on AWS, you will need an Access Key ID and a Secret Access Key from AWS.
### Supported Production Grade Tools
2016-10-26 16:28:26 +00:00
2017-10-03 20:34:27 +00:00
* [conjure-up ](/docs/getting-started-guides/ubuntu/ ) is an open-source installer for Kubernetes that creates Kubernetes clusters with native AWS integrations on Ubuntu.
2016-10-28 05:15:41 +00:00
* [Kubernetes Operations ](https://github.com/kubernetes/kops ) - Production Grade K8s Installation, Upgrades, and Management. Supports running Debian, Ubuntu, CentOS, and RHEL in AWS.
2016-10-26 16:28:26 +00:00
2017-04-28 19:08:20 +00:00
* [CoreOS Tectonic ](https://coreos.com/tectonic/ ) includes the open-source [Tectonic Installer ](https://github.com/coreos/tectonic-installer ) that creates Kubernetes clusters with Container Linux nodes on AWS.
2018-08-21 14:37:18 +00:00
* CoreOS originated and the Kubernetes Incubator maintains [a CLI tool, kube-aws ](https://github.com/kubernetes-incubator/kube-aws ), that creates and manages Kubernetes clusters with [Container Linux ](https://coreos.com/why/ ) nodes, using AWS tools: EC2, CloudFormation and Autoscaling.
2016-10-26 16:28:26 +00:00
2018-08-21 14:37:18 +00:00
{{% /capture %}}
{{% capture steps %}}
2016-10-26 16:28:26 +00:00
2016-03-07 02:29:06 +00:00
## Getting started with your cluster
2018-08-21 14:37:18 +00:00
### Command line administration tool: kubectl
2016-03-07 02:29:06 +00:00
The cluster startup script will leave you with a `kubernetes` directory on your workstation.
Alternately, you can download the latest Kubernetes release from [this page ](https://github.com/kubernetes/kubernetes/releases ).
Next, add the appropriate binary folder to your `PATH` to access kubectl:
2016-02-26 11:54:48 +00:00
```shell
2018-07-18 22:12:16 +00:00
# macOS
2016-03-07 02:29:06 +00:00
export PATH=< path / to / kubernetes-directory > /platforms/darwin/amd64:$PATH
2016-03-06 17:55:12 +00:00
2016-03-07 02:29:06 +00:00
# Linux
export PATH=< path / to / kubernetes-directory > /platforms/linux/amd64:$PATH
2016-02-26 11:54:48 +00:00
```
2017-10-10 04:08:58 +00:00
An up-to-date documentation page for this tool is available here: [kubectl manual ](/docs/user-guide/kubectl/ )
2016-03-07 02:29:06 +00:00
By default, `kubectl` will use the `kubeconfig` file generated during the cluster startup for authenticating against the API.
2017-10-05 00:31:51 +00:00
For more information, please read [kubeconfig files ](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/ )
2016-03-07 02:29:06 +00:00
### Examples
2017-10-05 00:31:51 +00:00
See [a simple nginx example ](/docs/tasks/run-application/run-stateless-application-deployment/ ) to try out your new cluster.
2016-03-07 02:29:06 +00:00
2018-05-05 16:00:51 +00:00
The "Guestbook" application is another popular example to get started with Kubernetes: [guestbook example ](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/guestbook/ )
2016-03-07 02:29:06 +00:00
2018-05-05 16:00:51 +00:00
For more complete applications, please look in the [examples directory ](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/ )
2016-03-07 02:29:06 +00:00
2016-05-24 21:26:21 +00:00
## Scaling the cluster
2016-06-02 10:07:11 +00:00
Adding and removing nodes through `kubectl` is not supported. You can still scale the amount of nodes manually through adjustments of the 'Desired' and 'Max' properties within the [Auto Scaling Group ](http://docs.aws.amazon.com/autoscaling/latest/userguide/as-manual-scaling.html ), which was created during the installation.
2016-05-24 21:26:21 +00:00
2016-03-07 02:29:06 +00:00
## Tearing down the cluster
Make sure the environment variables you used to provision your cluster are still exported, then call the following script inside the
`kubernetes` directory:
2016-02-26 11:54:48 +00:00
```shell
2016-03-07 02:29:06 +00:00
cluster/kube-down.sh
2016-02-26 11:54:48 +00:00
```
2016-05-24 18:15:23 +00:00
2016-05-22 21:25:07 +00:00
## Support Level
2016-05-22 21:27:32 +00:00
2016-05-22 21:25:07 +00:00
2016-07-10 21:52:03 +00:00
IaaS Provider | Config. Mgmt | OS | Networking | Docs | Conforms | Support Level
-------------------- | ------------ | ------------- | ---------- | --------------------------------------------- | ---------| ----------------------------
AWS | kops | Debian | k8s (VPC) | [docs ](https://github.com/kubernetes/kops ) | | Community ([@justinsb](https://github.com/justinsb))
2017-09-25 20:43:15 +00:00
AWS | CoreOS | CoreOS | flannel | [docs ](/docs/getting-started-guides/aws ) | | Community
2017-10-03 20:34:27 +00:00
AWS | Juju | Ubuntu | flannel, calico, canal | [docs ](/docs/getting-started-guides/ubuntu ) | 100% | Commercial, Community
2016-05-22 21:25:07 +00:00
2017-09-25 20:43:15 +00:00
For support level information on all solutions, see the [Table of solutions ](/docs/getting-started-guides/#table-of-solutions ) chart.
2016-02-26 11:54:48 +00:00
2016-03-07 02:29:06 +00:00
## Further reading
Please see the [Kubernetes docs ](/docs/ ) for more details on administering
2016-05-22 20:14:15 +00:00
and using a Kubernetes cluster.
2018-08-21 14:37:18 +00:00
{{% /capture %}}