-
Notifications
You must be signed in to change notification settings - Fork 151
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 #164 from ruecarlo/eks-1.21
Upgrade to 1.21 and fixes on a managed group sections
- Loading branch information
Showing
114 changed files
with
1,134 additions
and
898 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,9 @@ | ||
{ | ||
"cSpell.words": [ | ||
"Autoscaler", | ||
"Kubernetes", | ||
"Rebalance", | ||
"Rebalancing", | ||
"Tolerations" | ||
] | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
...nstances_with_eks/prerequisites/_index.md → ...nces_with_eks/010_prerequisites/_index.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
title: "Start the workshop..." | ||
title: "Start the workshop" | ||
chapter: true | ||
weight: 10 | ||
--- | ||
|
||
# Getting Started | ||
To start the workshop, follow one of the following depending on whether you are... | ||
|
||
* ...[running the workshop on your own (in your own account)]({{< ref "/using_ec2_spot_instances_with_eks/prerequisites/self_paced.md" >}}), or | ||
* ...[attending an AWS hosted event (using AWS provided hashes)]({{< ref "/using_ec2_spot_instances_with_eks/prerequisites/aws_event.md" >}}) | ||
* ...[running the workshop on your own (in your own account)]({{< ref "/using_ec2_spot_instances_with_eks/010_prerequisites/self_paced.md" >}}), or | ||
* ...[attending an AWS hosted event (using AWS provided hashes)]({{< ref "/using_ec2_spot_instances_with_eks/010_prerequisites/aws_event.md" >}}) | ||
|
||
Once you have completed with either setup, continue with **[Create a Workspace]({{< ref "/using_ec2_spot_instances_with_eks/prerequisites/workspace.md" >}})** | ||
Once you have completed with either setup, continue with **[Create a Workspace]({{< ref "/using_ec2_spot_instances_with_eks/010_prerequisites/workspace.md" >}})** |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
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
37 changes: 37 additions & 0 deletions
37
.../using_ec2_spot_instances_with_eks/010_prerequisites/prerequisites.files/eksworkshop.yaml
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,37 @@ | ||
--- | ||
apiVersion: eksctl.io/v1alpha5 | ||
kind: ClusterConfig | ||
|
||
metadata: | ||
name: eksworkshop-eksctl | ||
region: --AWS_REGION-- | ||
version: --EKS_VERSION-- | ||
|
||
managedNodeGroups: | ||
- amiFamily: AmazonLinux2 | ||
instanceType: m5.large | ||
name: mng-od-m5large | ||
desiredCapacity: 2 | ||
maxSize: 3 | ||
minSize: 0 | ||
labels: | ||
alpha.eksctl.io/cluster-name: eksworkshop-eksctl | ||
alpha.eksctl.io/nodegroup-name: mng-od-m5large | ||
intent: control-apps | ||
tags: | ||
alpha.eksctl.io/nodegroup-name: mng-od-m5large | ||
alpha.eksctl.io/nodegroup-type: managed | ||
k8s.io/cluster-autoscaler/node-template/label/intent: control-apps | ||
ssh: | ||
enableSsm: true | ||
iam: | ||
withAddonPolicies: | ||
autoScaler: true | ||
cloudWatch: true | ||
albIngress: true | ||
privateNetworking: true | ||
|
||
# To enable all of the control plane logs, uncomment below: | ||
# cloudWatch: | ||
# clusterLogging: | ||
# enableTypes: ["*"] |
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
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
62 changes: 62 additions & 0 deletions
62
...ing_ec2_spot_instances_with_eks/020_eksctl/create_eks_cluster_eksctl_command.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,62 @@ | ||
--- | ||
title: "Create EKS cluster Command" | ||
chapter: false | ||
disableToc: true | ||
hidden: true | ||
--- | ||
<!-- | ||
This markdown file is used as part of another file using 'insert-md-from-file' shortcode | ||
--> | ||
|
||
Create an eksctl deployment file (eksworkshop.yaml) to create an EKS cluster: | ||
|
||
``` | ||
cat << EOF > eksworkshop.yaml | ||
--- | ||
apiVersion: eksctl.io/v1alpha5 | ||
kind: ClusterConfig | ||
metadata: | ||
name: eksworkshop-eksctl | ||
region: ${AWS_REGION} | ||
version: "1.21" | ||
managedNodeGroups: | ||
- amiFamily: AmazonLinux2 | ||
instanceType: m5.large | ||
name: mng-od-m5large | ||
desiredCapacity: 2 | ||
maxSize: 3 | ||
minSize: 0 | ||
labels: | ||
alpha.eksctl.io/cluster-name: eksworkshop-eksctl | ||
alpha.eksctl.io/nodegroup-name: mng-od-m5large | ||
intent: control-apps | ||
tags: | ||
alpha.eksctl.io/nodegroup-name: mng-od-m5large | ||
alpha.eksctl.io/nodegroup-type: managed | ||
k8s.io/cluster-autoscaler/node-template/label/intent: control-apps | ||
iam: | ||
withAddonPolicies: | ||
autoScaler: true | ||
cloudWatch: true | ||
albIngress: true | ||
privateNetworking: true | ||
# To enable all of the control plane logs, uncomment below: | ||
# cloudWatch: | ||
# clusterLogging: | ||
# enableTypes: ["*"] | ||
EOF | ||
``` | ||
|
||
Next, use the file you created as the input for the eksctl cluster creation. | ||
|
||
``` | ||
eksctl create cluster -f eksworkshop.yaml | ||
``` | ||
|
||
{{% notice info %}} | ||
Launching EKS and all the dependencies will take approximately 15 minutes | ||
{{% /notice %}} |
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions
39
content/using_ec2_spot_instances_with_eks/020_eksctl/launcheks.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,39 @@ | ||
--- | ||
title: "Launch EKS" | ||
date: 2018-08-07T13:34:24-07:00 | ||
weight: 20 | ||
--- | ||
|
||
|
||
{{% notice warning %}} | ||
**DO NOT PROCEED** with this step unless you have [validated the IAM role]({{< relref "../010_prerequisites/update_workspaceiam.md#validate_iam" >}}) in use by the Cloud9 IDE. You will not be able to run the necessary kubectl commands in the later modules unless the EKS cluster is built using the IAM role. | ||
{{% /notice %}} | ||
|
||
#### Challenge: | ||
**How do I check the IAM role on the workspace?** | ||
|
||
{{%expand "Expand here to see the solution" %}} | ||
|
||
{{% insert-md-from-file file="using_ec2_spot_instances_with_eks/010_prerequisites/validate_workspace_role.md" %}} | ||
|
||
If you do not see the correct role, please go back and **[validate the IAM role]({{< relref "../010_prerequisites/update_workspaceiam.md" >}})** for troubleshooting. | ||
|
||
If you do see the correct role, proceed to next step to create an EKS cluster. | ||
{{% /expand %}} | ||
|
||
|
||
### Create an EKS cluster | ||
|
||
{{% insert-md-from-file file="using_ec2_spot_instances_with_eks/020_eksctl/create_eks_cluster_eksctl_command.md" %}} | ||
|
||
`eksctl create cluster` command allows you to create the cluster and managed nodegroups in sequence. There are a few things to note in the configuration that we just used to create the cluster and a managed nodegroup. | ||
|
||
* Nodegroup configurations are set under the **managedNodeGroups** section, this indicates that the node group is managed by EKS. | ||
* Nodegroup instance type is **m5.large** with **minSize** to 0, **maxSize** to 3 and **desiredCapacity** to 2. This nodegroup has capacity type set to On-Demand Instances by default. | ||
* Notice that the we add 3 node labels: | ||
|
||
* **alpha.eksctl.io/cluster-name**, to indicate the nodes belong to **eksworkshop-eksctl** cluster. | ||
* **alpha.eksctl.io/nodegroup-name**, to indicate the nodes belong to **mng-od-m5large** nodegroup. | ||
* **intent**, to allow you to deploy control applications on nodes that have been labeled with value **control-apps** | ||
|
||
* Amazon EKS adds an additional Kubernetes label **eks.amazonaws.com/capacityType: ON_DEMAND**, to all On-Demand Instances in your managed node group. You can use this label to schedule stateful applications on On-Demand nodes. |
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.