Bootstrap Kubernetes the hard way on Google Cloud Platform. No scripts.
Go to file
Alexey Vazhnov 645b296cb6
Adjust markdown formatting (#328)
* Adjust markdown formatting:

* Remove extra capitalization.
* Remove extra curly braces {} inside Bash code blocks.
* Use in-line code block `` for IP-addresses, file names and commands.
* Add a dot at the end of sentences.
* Use list formatting in `differences-to-original.md`. Also add escaping for angle brackets <>.
* No logic changes were made, only formatting improvements.

* 01-prerequisites.md: remove extra capitalization, remove extra space in "Virtual Box"

* 01-prerequisites.md: split text into different lines (before, it was rendered into one line)

* Remove extra capitalization, use inline code blocks, add a dot at the end of sentences.

* 02-compute-resources.md: add escaping for angle brackets <>.

* 03-client-tools.md: remove extra capitalization, use inline code blocks

* 04-certificate-authority.md: remove extra capitalization, use inline code blocks, remove extra curly braces {} inside Bash code blocks

* 04-certificate-authority.md: remove extra curly braces {} inside Bash code blocks

* Revert back: all "remove extra curly braces {} inside Bash code blocks"

As per @fireflycons https://github.com/mmumshad/kubernetes-the-hard-way/pull/328#issuecomment-1926329908 :

> They are there for a reason. If you paste a block of code within braces, then it is not executed immediately by the shell - you have to press ENTER. Quite often when making changes to this repo and I have multiple terminals open, it gives me a chance to check that I have pasted the block into the correct terminal before it executes in the wrong terminal and borks everything.

* Revert back: all "remove extra curly braces {} inside Bash code blocks"

* Revert back all "Remove extra capitalization", as per request @fireflycons

https://github.com/mmumshad/kubernetes-the-hard-way/pull/328#issuecomment-1944388993
2024-02-21 20:50:31 +00:00
.github/ISSUE_TEMPLATE Update 2024-02-05 06:36:27 +00:00
deployments Ugrade coredns 2022-10-19 20:11:48 +01:00
docs Adjust markdown formatting (#328) 2024-02-21 20:50:31 +00:00
practice-questions-answers Update etcd-backup-and-restore.md 2021-03-25 19:53:43 -04:00
tools Update to latest version (#325) 2023-11-23 19:52:14 +00:00
vagrant Adjust markdown formatting (#328) 2024-02-21 20:50:31 +00:00
.gitattributes Upgrade/1.24 (#291) 2022-09-20 07:17:00 +01:00
.gitignore Upgrade/1.24 (#291) 2022-09-20 07:17:00 +01:00
CONTRIBUTING.md Add brief contribution guide 2018-01-30 07:38:21 -08:00
LICENSE add LICENSE file 2016-07-09 09:31:13 -07:00
README.md Update to latest version (#325) 2023-11-23 19:52:14 +00:00

README.md

This tutorial is a modified version of the original developed by Kelsey Hightower.

Kubernetes The Hard Way On VirtualBox

IMPORTANT This currently does not work on Apple M1/M2. Oracle are yet to release a compatible version for these systems.

This tutorial walks you through setting up Kubernetes the hard way on a local machine using VirtualBox. 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 Kubernetes Engine, or the Getting Started Guides.

Kubernetes The Hard Way is optimized for learning, which means taking the long route to ensure you understand each task required to bootstrap a Kubernetes cluster.

This tutorial is a modified version of the original developed by Kelsey Hightower. While the original one uses GCP as the platform to deploy kubernetes, we use VirtualBox and Vagrant to deploy a cluster on a local machine. If you prefer the cloud version, refer to the original one here

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 stop you from learning!
Note that we are only building 2 masters here instead of the recommended 3 that etcd requires to maintain quorum. This is to save on resources, and simply to show how to load balance across more than one master.

Please note that with this particular challenge, it is all about the minute detail. If you miss one tiny step anywhere along the way, it's going to break!

Note also that in developing this lab, it has been tested many many times! Once you have the VMs up and you start to build the cluster, if at any point something isn't working it is 99.9999% likely to be because you missed something, not a bug in the lab!

Always run the cert_verify.sh script at the places it suggests, and always ensure you are on the correct node when you do stuff. If cert_verify.sh shows anything in red, then you have made an error in a previous step. For the master node checks, run the check on master-1 and on master-2

Target Audience

The target audience for this tutorial is someone planning to support a production Kubernetes cluster and wants to understand how everything fits together.

Cluster Details

Kubernetes The Hard Way guides you through bootstrapping a highly available Kubernetes cluster with end-to-end encryption between components and RBAC authentication.

Node configuration

We will be building the following:

  • Two control plane nodes (master-1 and master-2) running the control plane components as operating system services.
  • Two worker nodes (worker-1 and worker-2)
  • One loadbalancer VM running HAProxy to balance requests between the two API servers.

Labs