kubernetes-the-hard-way/docs/01-prerequisites.md

51 lines
2.4 KiB
Markdown
Raw Normal View History

2017-08-29 00:19:25 +03:00
# Prerequisites
## Amazon Web Services (AWS)
2017-08-29 00:19:25 +03:00
This tutorial leverages the [Amazon Web Services](https://aws.amazon.com) to streamline provisioning of the compute infrastructure required to bootstrap a Kubernetes cluster from the ground up.
2017-08-29 00:19:25 +03:00
> The compute resources required for this tutorial exceed the Amazon Web Services free tier.
2017-08-29 00:19:25 +03:00
## CloudFormation - Infrastructure as Code
2017-08-29 00:19:25 +03:00
In this tutorial we use [CloudFormation](https://aws.amazon.com/cloudformation/), which enables you to provision AWS resources as a code (YAML file).
2017-08-29 00:19:25 +03:00
As a best practice you should consider using [Nested Stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) to combine associated CloudFormation stacks together. However, in this tutorial we provision AWS resources one by one via separated CloudFormation stacks for learning purpose.
2017-08-29 00:19:25 +03:00
All CloudFormation templates are in [cloudformation directory](../cloudformation/) of this repository.
2017-08-29 00:19:25 +03:00
## AWS CLI
2017-08-29 00:19:25 +03:00
### Install the AWS CLI
2017-08-29 00:19:25 +03:00
Follow the AWS documentation [Installing the AWS CLI version 1](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html) to install and configure the `aws` command line utility.
```
$ aws --version
```
### Set a default region and credentials
2019-09-14 21:41:56 +03:00
This tutorial assumes a default region and credentials. To configure the AWS CLI, you can follow this instruction: [Configuring the AWS CLI - AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
2017-08-29 00:19:25 +03:00
```
$ aws configure
AWS Access Key ID [None]: AKIxxxxxxxxxxxxxMPLE
AWS Secret Access Key [None]: wJalrXUxxxxxxxxxxxxxxxxxxxxxxxxxxxxLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
2017-08-29 00:19:25 +03:00
```
## Running Commands in Parallel with tmux
2019-09-14 21:41:56 +03:00
[tmux](https://github.com/tmux/tmux/wiki) can be used to run commands on multiple compute instances at the same time. Labs in this tutorial may require running the same commands across multiple compute instances, in those cases consider using tmux and splitting a window into multiple panes with synchronize-panes enabled to speed up the provisioning process.
> The use of tmux is optional and not required to complete this tutorial.
![tmux screenshot](images/tmux-screenshot.png)
2019-09-14 21:41:56 +03:00
> Enable synchronize-panes by pressing `ctrl+b` followed by `shift+:`. Next type `set synchronize-panes on` at the prompt. To disable synchronization: `set synchronize-panes off`.
2017-08-29 00:19:25 +03:00
Next: [Installing the Client Tools](02-client-tools.md)