Skip to content

Commit 41adb00

Browse files
committed
Remove single-master cluster
1 parent 471d18d commit 41adb00

File tree

1 file changed

+1
-58
lines changed

1 file changed

+1
-58
lines changed

01-path-basics/102-your-first-cluster/readme.adoc

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ The next step is link:../103-kubernetes-concepts[to learn about basic Kubernetes
141141
The sections below provide information on other capabilities of Kubernetes clusters.
142142
You are welcome to read and refer to them should you need to use those capabilities.
143143

144+
anchor:multi-master[]
144145
== Alternative: Create a Kubernetes Cluster with kops
145146

146147
This section will walk you through how to install a Kubernetes cluster on AWS using kops.
@@ -152,64 +153,6 @@ The master and worker nodes within the cluster can use either DNS or the https:/
152153

153154
To create a cluster using the gossip protocol, simply use a cluster name with a suffix of `.k8s.local`. In the following steps, we will use `example.cluster.k8s.local` as a sample gossip cluster name. You may choose a different name as long as it ends with `.k8s.local`.
154155

155-
We show two examples of creating gossip-based clusters below. You can choose whether to create a single-master or multi-master cluster. Most workshop exercises will work on both types of cluster, however some modules require using a multi-master cluster _(to demonstrate rolling updates, for instance)._ If you aren't sure, please create a xref:multi-master[multi-master cluster].
156-
157-
=== Single-Master Cluster
158-
159-
By default, the `kops create cluster` command creates a single master node and two worker nodes in the specified zones.
160-
161-
Create a Kubernetes cluster using the following command. Run it in the "bash" terminal tab at the bottom of the Cloud9 IDE. This will create a cluster with a single master, multi-node and multi-az configuration:
162-
163-
$ kops create cluster \
164-
--name example.cluster.k8s.local \
165-
--zones $AWS_AVAILABILITY_ZONES \
166-
--yes
167-
168-
The `AWS_AVAILABILITY_ZONES` environment variable should have been set during the link:../101-start-here[Cloud9 Environment Setup].
169-
170-
The `create cluster` command only creates and stores the cluster config in the S3 bucket. Adding the `--yes` flag ensures that the cluster is immediately created as well.
171-
172-
Once the `kops create cluster` command is issued, it provisions the EC2 instances, sets up Auto Scaling Groups, IAM users, Security Groups, installs Kubernetes on each node, then configures the master and worker nodes. This process can take some time based upon the number of master and worker nodes.
173-
174-
Note: If your 'create cluster' fails with an error like:
175-
```
176-
error reading s3://example-kops-state-store/example.cluster.k8s.local/config: Unable to list AWS regions: NoCredentialProviders: no valid providers in chain
177-
caused by: EnvAccessKeyNotFound: failed to find credentials in the environment."
178-
```
179-
Please confirm the following environment variables are set before executing the 'create cluster' command:
180-
```
181-
echo $AWS_DEFAULT_PROFILE
182-
echo $KOPS_STATE_STORE
183-
echo $AWS_SDK_LOAD_CONFIG
184-
```
185-
If any of those environment variables are blank, please re-run the "Build Script" section of the link:../101-start-here[Cloud9 Environment Setup].
186-
187-
Wait for 5-8 minutes and then the cluster can be validated as shown:
188-
189-
```
190-
$ kops validate cluster
191-
Using cluster from kubectl context: example.cluster.k8s.local
192-
193-
Validating cluster example.cluster.k8s.local
194-
195-
INSTANCE GROUPS
196-
NAME ROLE MACHINETYPE MIN MAX SUBNETS
197-
master-eu-central-1a Master m3.medium 1 1 eu-central-1a
198-
nodes Node t2.medium 2 2 eu-central-1a,eu-central-1b
199-
200-
NODE STATUS
201-
NAME ROLE READY
202-
ip-172-20-57-94.ec2.internal master True
203-
ip-172-20-63-55.ec2.internal node True
204-
ip-172-20-75-78.ec2.internal node True
205-
206-
Your cluster example.cluster.k8s.local is ready
207-
```
208-
209-
anchor:multi-master[]
210-
211-
=== Multi-Master Cluster
212-
213156
The command below creates a cluster in a multi-master, multi-node, and multi-az configuration.
214157
Run it in the "bash" terminal tab at the bottom of the Cloud9 IDE.
215158
We can create and build the cluster in one step by passing the `--yes` flag.

0 commit comments

Comments
 (0)