2016-07-07 17:15:59 +03:00
# Kubernetes The Hard Way
2016-07-07 23:47:11 +03:00
This tutorial will walk you through setting up Kubernetes the hard way. This guide is not for people looking for a fully automated command to bring up a Kubernetes cluster. If that's you then check out [Google Container Engine ](https://cloud.google.com/container-engine ), or the [Getting Started Guides ](http://kubernetes.io/docs/getting-started-guides/ ).
2016-07-07 17:27:23 +03:00
2016-09-12 17:10:34 +03:00
This tutorial is optimized for learning, which means taking the long route to help people understand each task required to bootstrap a Kubernetes cluster. This tutorial can be completed on the following platforms:
* [Google Compute Engine ](https://cloud.google.com/compute )
* [Amazon EC2 ](https://aws.amazon.com/ec2 )
2016-07-09 02:35:09 +03:00
2016-09-11 23:37:41 +03:00
> The results of this tutorial should not be viewed as production ready, and may receive limited support from the community, but don't let that prevent you from learning!
2016-07-07 17:27:23 +03:00
## Target Audience
2016-07-07 23:48:12 +03:00
The target audience for this tutorial is someone planning to support a production Kubernetes cluster and wants to understand how everything fits together. After completing this tutorial I encourage you to automate away the manual steps presented in this guide.
2016-07-07 17:27:23 +03:00
2016-09-11 23:32:24 +03:00
* This tutorial is for educational purposes only. There is much more configuration required for a production ready cluster.
2016-07-07 23:47:11 +03:00
## Cluster Details
2017-03-05 11:56:21 +03:00
* Kubernetes 1.5.1
2016-09-27 15:23:35 +03:00
* Docker 1.12.1
2016-09-27 16:23:14 +03:00
* etcd 3.0.10
2016-07-07 23:47:11 +03:00
* [CNI Based Networking ](https://github.com/containernetworking/cni )
* Secure communication between all components (etcd, control plane, workers)
2016-09-12 20:57:12 +03:00
* Default Service Account and Secrets
2016-07-07 23:47:11 +03:00
### What's Missing
The resulting cluster will be missing the following items:
* [Cluster add-ons ](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons )
2017-03-24 20:39:10 +03:00
* [Logging ](https://kubernetes.io/docs/concepts/cluster-administration/logging/ )
2016-07-08 00:01:55 +03:00
* [No Cloud Provider Integration ](http://kubernetes.io/docs/getting-started-guides/ )
2016-07-07 23:47:11 +03:00
2016-09-11 18:02:52 +03:00
### Assumptions
GCP
* The us-central1 region will be used
```
gcloud config set compute/region us-central1
```
AWS
* The us-west-2 region will be used
2017-01-02 02:21:21 +03:00
* ``jq`` parsing requires [AWS CLI output format ](http://docs.aws.amazon.com/cli/latest/userguide/controlling-output.html ) to be ``json``
2016-09-11 18:02:52 +03:00
2016-09-12 20:57:12 +03:00
## Platforms
2016-07-07 17:27:23 +03:00
2016-09-11 09:27:33 +03:00
This tutorial assumes you have access to one of the following:
* [Google Cloud Platform ](https://cloud.google.com ) and the [Google Cloud SDK ](https://cloud.google.com/sdk/ ) (125.0.0+)
2016-09-11 17:54:51 +03:00
* [Amazon Web Services ](https://aws.amazon.com ), the [AWS CLI ](https://aws.amazon.com/cli ) (1.10.63+), and [jq ](https://stedolan.github.io/jq ) (1.5+)
2016-09-11 09:27:33 +03:00
2016-09-12 20:57:12 +03:00
## Labs
2016-09-11 09:27:33 +03:00
While GCP or AWS will be used for basic infrastructure needs, the things learned in this tutorial apply to every platform.
2016-07-10 06:21:52 +03:00
2016-07-09 02:32:12 +03:00
* [Cloud Infrastructure Provisioning ](docs/01-infrastructure.md )
* [Setting up a CA and TLS Cert Generation ](docs/02-certificate-authority.md )
* [Bootstrapping an H/A etcd cluster ](docs/03-etcd.md )
* [Bootstrapping an H/A Kubernetes Control Plane ](docs/04-kubernetes-controller.md )
* [Bootstrapping Kubernetes Workers ](docs/05-kubernetes-worker.md )
* [Configuring the Kubernetes Client - Remote Access ](docs/06-kubectl.md )
* [Managing the Container Network Routes ](docs/07-network.md )
2016-07-09 19:17:18 +03:00
* [Deploying the Cluster DNS Add-on ](docs/08-dns-addon.md )
2016-07-09 18:16:09 +03:00
* [Smoke Test ](docs/09-smoke-test.md )
2016-07-10 17:11:51 +03:00
* [Cleaning Up ](docs/10-cleanup.md )