-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3367 from tigerlinux/route53_based_example
Automatic merge from submit-queue. Route53 based example Added in the docs/examples section a new practical example/lab with the use of a route53-based subdomain. All technical details and commands (both for kops and aws) fully included.
- Loading branch information
Showing
5 changed files
with
1,298 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# KOPS CASE-USE EXAMPLES AND LABORATORY EXERCISES. | ||
|
||
This section of our documentation contains typical use-cases for Kops. We'll cover here from the most basic things to very advanced use cases with a lot of technical detail. You can and will be able to reproduce all exercises (if you first read and understand what we did and why we did it) providing you have access to the proper resources. | ||
|
||
All exercises will need you to prepare your base environment (with kops and kubectl). You can see the ["basic requirements"](basic-requirements.md) document that is a common set of procedures for all our exercises. Please note that all the exercises covered here are production-oriented. | ||
|
||
Our exercises are divided on "chapters". Each chapter covers a specific use-case for Kops: | ||
|
||
- Chapter I: [USING KOPS WITH COREOS - A MULTI-MASTER/MULTI-NODE PRACTICAL EXAMPLE](coreos-kops-tests-multimaster.md). | ||
- Chapter II: [USING KOPS WITH PRIVATE NETWORKING AND A BASTION HOST IN A HIGLY-AVAILABLE SETUP](kops-tests-private-net-bastion-host.md). | ||
- Chapter III: [USING KOPS WITH A ROUTE53 BASED SUBDOMAIN AND SCALING UP THE CLUSTER](kops-test-route53-subdomain.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# COMMON BASIC REQUIREMENTS FOR KOPS-RELATED LABS. PRE-FLIGHT CHECK: | ||
|
||
Before rushing in to replicate any of the exercises, please ensure your basic environment is correctly setup. See the [KOPS AWS tutorial for more information](../docs/aws.md). | ||
|
||
Ensure that the following points are covered and working in your environment: | ||
|
||
- AWS cli fully configured (aws account already with proper permissions/roles needed for kops). Depending on your distro, you can setup directly from packages, or if you want the most updated version, use "pip" and install awscli by issuing a "pip install awscli" command. Your choice! | ||
- Local ssh key ready on ~/.ssh/id_rsa / id_rsa.pub. You can generate it using "ssh-keygen" command if you dont' have one already: `ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""`. | ||
- Region set to us-east-1 (az's: us-east-1a, us-east-1b, us-east-1c, us-east-1d and us-east-1e). For most of our exercises we'll deploy our clusters in "us-east-1". For real HA at kubernetes master level, you need 3 masters. If you want to ensure that each master is deployed on a different availability zone, then a region with "at least" 3 availabity zones is required here. You can still deploy a multi-master kubernetes setup on regions with just 2 az's or even 1 az but this mean that two or all your masters will be deployed on a single az and if this az goes offline then you'll lose two or all your masters. If possible, always pick a region with at least 3 different availability zones for real H.A. You always can check amazon regions and az's on the link: [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/). Remember: The masters are Kubernetes control plane. If your masters die, you loose control of your Kubernetes cluster. | ||
- kubectl and kops installed. For this last part, you can do this with using following commnads. Next commands asume you are running a amd64/x86_64 linux distro: | ||
|
||
As root (either ssh directly to root, local root console, or by using "sudo su -" previouslly): | ||
|
||
```bash | ||
cd ~ | ||
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | ||
curl -LO https://github.com/kubernetes/kops/releases/download/1.7.0/kops-linux-amd64 | ||
chmod 755 kubectl kops-linux-amd64 | ||
mv kops-linux-amd64 kops | ||
mv kubectl kops /usr/local/bin | ||
``` | ||
|
||
If you are not root and/or do you want to keep the kops/kubectl utilities in your own account: | ||
|
||
```bash | ||
cd ~ | ||
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | ||
curl -LO https://github.com/kubernetes/kops/releases/download/1.7.0/kops-linux-amd64 | ||
chmod 755 kubectl kops-linux-amd64 | ||
mv kops-linux-amd64 kops | ||
mkdir ~/bin | ||
export PATH=$PATH:~/bin | ||
mv kubectl kops ~/bin | ||
``` | ||
|
||
Finally, some of our exercises use the "jq" utility that is available on modern linux distributions. Please ensure to install it too. Some examples of how to do it: | ||
|
||
**Centos 7:** | ||
|
||
```bash | ||
yum -y install epel-release | ||
yum -y install jq | ||
``` | ||
|
||
**Debian7/Debian8/Debian9/Ubuntu1404lts/Ubuntu1604lts:** | ||
|
||
```bash | ||
apt-get -y update | ||
apt-get -y install jq | ||
``` | ||
|
||
Also, if you are using **OS X** you can install jq using ["Homebrew"](https://brew.sh): | ||
|
||
```bash | ||
brew install jq | ||
``` | ||
|
||
More information about "jq" on the following site: [https://stedolan.github.io/jq/download/](https://stedolan.github.io/jq/download/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.