Kubernetes on AWS with Container Linux
Go Shell Makefile
Latest commit 2be75bc Feb 27, 2017 @mumoshu mumoshu committed on GitHub Merge pull request #358 from mumoshu/fix-custom-settings-for-node-pools
Fix customSettings unavailability for node pools
Permalink
Failed to load latest commit information.
Documentation Fix various minor typos Feb 17, 2017
cfnstack Add a test to reproduce the inconsistent S3 object prefix issue Feb 27, 2017
cmd Fix missing Name and ControllerHost in `status` and `up` commands Feb 27, 2017
codegen refactoring: Move the code generator Nov 28, 2016
contrib Upgrade kubernetes version to v1.5.3 Feb 15, 2017
core Fix customSettings unavailability for node pools Feb 27, 2017
coreos refactoring: Extract coreos-cloud-init userdata validation Nov 28, 2016
e2e Fix missing Name and ControllerHost in `status` and `up` commands Feb 27, 2017
filegen Easier to configure, more tightly integrated node pools Feb 16, 2017
filereader Easier to configure, more tightly integrated node pools Feb 16, 2017
gzipcompressor Bypass 16kb userdata limit by uploading to s3 bucket Jan 24, 2017
make feat: Experimental support for worker nodes powered by Spot Fleet Dec 6, 2016
model Fix customSettings unavailability for node pools Feb 27, 2017
netutil refactoring: Extract the netutil package for future use in the upcomi… Nov 28, 2016
test Fix customSettings unavailability for node pools Feb 27, 2017
tlsutil credentials: Add /O=systems:master for kube-admin Feb 23, 2017
vendor Introduce Glide for vendor package management Oct 21, 2016
.gitignore Easier to configure, more tightly integrated node pools Feb 16, 2017
.travis.yml Send recorded coverage profiles to Codecov Nov 2, 2016
CONTRIBUTING.md Fix 404 links in REAMDE.md and add the missing CONTRIBUTING.md linked… Oct 21, 2016
Makefile feat: Experimental support for worker nodes powered by Spot Fleet Dec 6, 2016
README.md README: remove the design decisions Feb 21, 2017
ROADMAP.md Update ROADMAP.md Jan 26, 2017
build Easier to configure, more tightly integrated node pools Feb 16, 2017
build-release-binaries [build] only set target os/arch for compile Nov 4, 2016
containerized-build-release-binaries build: fix up containerized release build process Nov 9, 2016
glide.lock Introduce Glide for vendor package management Oct 21, 2016
glide.yaml Introduce Glide for vendor package management Oct 21, 2016
main.go refactoring: Reorganize cobra commands to make them follow cobra's co… Nov 28, 2016

README.md

Kubernetes on AWS (kube-aws)

Go Report Card Build Status

Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order to get stable binaries.

kube-aws is a command-line tool to create/update/destroy Kubernetes clusters on AWS.

View the latest manual for the kube-aws tool on GitHub.

Features

  • Create, update and destroy Kubernetes clusters on AWS
  • Highly available and scalable Kubernetes clusters backed by multi-AZ deployment and Node Pools
  • Deployment to an existing VPC
  • Powered by various AWS services including CloudFormation, KMS, Auto Scaling, Spot Fleet, EC2, ELB, S3, etc.

Getting Started

Check out our getting started tutorial on launching your first Kubernetes cluster in AWS.

Examples

Generate cluster.yaml:

$ mkdir my-cluster
$ cd my-cluster
$ kube-aws init --cluster-name=my-cluster \
--external-dns-name=<my-cluster-endpoint> \
--region=us-west-1 \
--availability-zone=us-west-1c \
--key-name=<key-pair-name> \
--kms-key-arn="arn:aws:kms:us-west-1:xxxxxxxxxx:key/xxxxxxxxxxxxxxxxxxx"

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)

Generate assets:

$ kube-aws render credentials --generate-ca
$ kube-aws render stack

Validate configuration:

$ kube-aws validate --s3-uri s3://<your-bucket>/<optional-prefix>

Launch:

$ kube-aws up --s3-uri s3://<your-bucket>/<optional-prefix>

# Or export your cloudformation stack and dependent assets into the `exported/` directory
$ kube-aws up --s3-uri s3://<your-bucket>/<optional-prefix> --export

# Access the cluster
$ KUBECONFIG=kubeconfig kubectl get nodes --show-labels

Update:

$ $EDITOR cluster.yaml
# Update all the cfn stacks including the one for control-plane and the ones for worker node pools
$ kube-aws update --s3-uri s3://<your-bucket>/<optional-prefix>

Destroy:

# Destroy all the cfn stacks including the one for control-plane and the ones for worker node pools
$ kube-aws destroy

Development

Build

Clone this repository to the appropriate path under the GOPATH.

$ export GOPATH=$HOME/go
$ mkdir -p $GOPATH/src/github.com/coreos/
$ git clone git@github.com:coreos/kube-aws.git $GOPATH/src/github.com/coreos/kube-aws

Run make build to compile kube-aws locally.

This depends on having:

  • golang >= 1.7

The compiled binary will be available at bin/kube-aws.

Run Unit Tests

make test

Reformat Code

make format

Modifying Templates

The various templates are located in the config/templates/ and the nodepool/config/templates/ directory of the source repo. go generate is used to pack these templates into the source code. In order for changes to templates to be reflected in the source code:

make build

Other Resources

Extra or advanced topics in for kube-aws:

The following links can be useful for development:

Contributing

Submit a PR to this repository, following the contributors guide. The documentation is published from this source.