Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add docs for addons that were missed #180

Merged
merged 9 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
nav:
- Overview: index.md
- Architectures: architectures.md
- Amazon EKS Addons: amazon-eks-addons.md
- AWS Partner Addons: aws-partner-addons.md
- Addons: addons
34 changes: 34 additions & 0 deletions docs/addons/argo-rollouts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Argo Rollouts

[Argo Rollouts](https://argo-rollouts.readthedocs.io/en/stable/) is a Kubernetes controller and set of CRDs which provide advanced deployment capabilities such as blue-green, canary, canary analysis, experimentation, and progressive delivery features to Kubernetes.

## Usage

Argo Rollouts can be deployed by enabling the add-on via the following.

```hcl
enable_argo_rollouts = true
```

You can optionally customize the Helm chart that deploys Argo Rollouts via the following configuration.

```hcl
enable_argo_rollouts = true

argo_rollouts = {
name = "argo-rollouts"
chart_version = "2.22.3"
repository = "https://argoproj.github.io/argo-helm"
namespace = "argo-rollouts"
values = [templatefile("${path.module}/values.yaml", {})]
}

```

Verify argo-rollouts pods are running.

```sh
$ kubectl get pods -n argo-rollouts
NAME READY STATUS RESTARTS AGE
argo-rollouts-5db5688849-x89zb 0/1 Running 0 11s
```
35 changes: 35 additions & 0 deletions docs/addons/argo-workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Argo Workflows

[Argo Workflows](https://argoproj.github.io/argo-workflows/) is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Argo Workflows is implemented as a Kubernetes CRD (Custom Resource Definition).

## Usage

Argo Workflows can be deployed by enabling the add-on via the following.

```hcl
enable_argo_workflows = true
```

You can optionally customize the Helm chart that deploys Argo Workflows via the following configuration.

```hcl
enable_argo_workflows = true

argo_workflows = {
name = "argo-workflows"
chart_version = "0.28.2"
repository = "https://argoproj.github.io/argo-helm"
namespace = "argo-workflows"
values = [templatefile("${path.module}/values.yaml", {})]
}

```

Verify argo-workflows pods are running.

```sh
$ kubectl get pods -n argo-workflows
NAME READY STATUS RESTARTS AGE
argo-workflows-server-68988cd864-22zhr 1/1 Running 0 6m32s
argo-workflows-workflow-controller-7ff7b5658d-9q44f 1/1 Running 0 6m32s
```
40 changes: 40 additions & 0 deletions docs/addons/argocd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Argo CD

[Argo CD](https://argo-cd.readthedocs.io/en/stable/) is a declarative, GitOps continuous delivery tool for Kubernetes.

## Usage

Argo CD can be deployed by enabling the add-on via the following.

```hcl
enable_argocd = true
```

You can optionally customize the Helm chart that deploys Argo CD via the following configuration.

```hcl
enable_argocd = true

argocd = {
name = "argocd"
chart_version = "5.29.1"
repository = "https://argoproj.github.io/argo-helm"
namespace = "argocd"
values = [templatefile("${path.module}/values.yaml", {})]
}

```

Verify argocd pods are running.

```sh
$ kubectl get pods -n argocd
NAME READY STATUS RESTARTS AGE
argo-cd-argocd-application-controller-0 1/1 Running 0 146m
argo-cd-argocd-applicationset-controller-678d85f77b-rmpcb 1/1 Running 0 146m
argo-cd-argocd-dex-server-7b6c9b5969-zpqnl 1/1 Running 0 146m
argo-cd-argocd-notifications-controller-6d489b99c9-j6fdw 1/1 Running 0 146m
argo-cd-argocd-redis-59dd95f5b5-8fx74 1/1 Running 0 146m
argo-cd-argocd-repo-server-7b9bd88c95-mh2fz 1/1 Running 0 146m
argo-cd-argocd-server-6f9cfdd4d5-8mfpc 1/1 Running 0 146m
```
9 changes: 9 additions & 0 deletions docs/addons/aws-cloudwatch-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ You can also customize the Helm chart that deploys `aws-cloudwatch-metrics` via
values = [templatefile("${path.module}/values.yaml", {})] # The value `clusterName` is already set to the EKS cluster name, no need to specify here
}
```

Verify aws-cloudwatch-metrics pods are running

```sh
$ kubectl get pods -n amazon-cloudwatch

NAME READY STATUS RESTARTS AGE
aws-cloudwatch-metrics-2dt5h 1/1 Running 0 149m
```
30 changes: 17 additions & 13 deletions docs/addons/aws-efs-csi-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ The [AWS EFS CSI driver](https://github.com/aws-ia/terraform-aws-eks-blueprints/
enable_aws_efs_csi_driver = true
```

You can optionally customize the Helm chart that deploys the driver via the following configuration.

```hcl
enable_aws_efs_csi_driver = true

# Optional aws_efs_csi_driver_helm_config
aws_efs_csi_driver = {
repository = "https://kubernetes-sigs.github.io/aws-efs-csi-driver/"
chart_version = "2.4.1"
}
aws_efs_csi_driver {
role_policies = ["<ADDITIONAL_IAM_POLICY_ARN>"]
}
```

Once deployed, you will be able to see a number of supporting resources in the `kube-system` namespace.

```sh
Expand All @@ -26,17 +41,6 @@ NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTO
efs-csi-node 3 3 3 3 3 beta.kubernetes.io/os=linux 4m32s
```

You can optionally customize the Helm chart that deploys the driver via the following configuration.
## Validate EFS CSI Driver

```hcl
enable_aws_efs_csi_driver = true

# Optional aws_efs_csi_driver_helm_config
aws_efs_csi_driver = {
repository = "https://kubernetes-sigs.github.io/aws-efs-csi-driver/"
chart_version = "2.4.1"
}
aws_efs_csi_driver {
role_policies = ["<ADDITIONAL_IAM_POLICY_ARN>"]
}
```
Follow the static provisioning example described [here](https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/examples/kubernetes/static_provisioning/README.md) to validate the CSI driver is working as expected.
60 changes: 60 additions & 0 deletions docs/addons/aws-for-fluentbit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# AWS for Fluent Bit

AWS provides a Fluent Bit image with plugins for both CloudWatch Logs and Kinesis Data Firehose. We recommend using Fluent Bit as your log router because it has a lower resource utilization rate than Fluentd.

## Usage

AWS for Fluent Bit can be deployed by enabling the add-on via the following.

```hcl
enable_aws_for_fluentbit = true
```

You can optionally customize the Helm chart that deploys AWS for Fluent Bit via the following configuration.

```hcl
enable_aws_for_fluentbit = true
aws_for_fluentbit_cw_log_group = {
create = true
use_name_prefix = "eks-cluster-logs-"
retention = 7
}
aws_for_fluentbit = {
name = "aws-for-fluent-bit"
chart_version = "0.1.24"
repository = "https://aws.github.io/eks-charts"
namespace = "kube-system"
values = [templatefile("${path.module}/values.yaml", {})]
}
```

## Verify the Fluent Bit setup

Verify aws-for-fluentbit pods are running.

```sh
$ kuebctl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
aws-for-fluent-bit-6kp66 1/1 Running 0 172m
```

Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/


In the navigation pane, choose Log groups.

Make sure that you're in the Region where you deployed Fluent Bit.

Check the list of log groups in the Region. You should see the following:

```
/aws/containerinsights/Cluster_Name/application

/aws/containerinsights/Cluster_Name/host

/aws/containerinsights/Cluster_Name/dataplane
```

Navigate to one of these log groups and check the Last Event Time for the log streams. If it is recent relative to when you deployed Fluent Bit, the setup is verified.

There might be a slight delay in creating the /dataplane log group. This is normal as these log groups only get created when Fluent Bit starts sending logs for that log group.
131 changes: 131 additions & 0 deletions docs/addons/aws-node-termination-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# AWS Node Termination Handler

This project ensures that the Kubernetes control plane responds appropriately to events that can cause your EC2 instance to become unavailable, such as [EC2 maintenance events](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html), [EC2 Spot interruptions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html), [ASG Scale-In](https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html#as-lifecycle-scale-in), ASG AZ Rebalance, and EC2 Instance Termination via the API or Console. If not handled, your application code may not stop gracefully, take longer to recover full availability, or accidentally schedule work to nodes that are going down.

## Usage

AWS Node Termination Handler can be deployed by enabling the add-on via the following.

```hcl
enable_aws_node_termination_handler = true
```

You can optionally customize the Helm chart that deploys AWS Node Termination Handler via the following configuration.

```hcl
enable_aws_node_termination_handler = true

aws_node_termination_handler = {
name = "aws-node-termination-handler"
chart_version = "0.21.0"
repository = "https://aws.github.io/eks-charts"
namespace = "aws-node-termination-handler"
values = [templatefile("${path.module}/values.yaml", {})]
}

```

Verify aws-node-termination-handler pods are running.

```sh
$ kubectl get pods -n aws-node-termination-handler
NAME READY STATUS RESTARTS AGE
aws-node-termination-handler-6f598b6b89-6mqgk 1/1 Running 1 (22h ago) 26h
```

Verify SQS Queue is created.

```sh
$ aws sqs list-queues

{
"QueueUrls": [
"https://sqs.us-east-1.amazonaws.com/XXXXXXXXXXXXXX/aws_node_termination_handler20221123072051157700000004"
]
}
```

Verify Event Rules are created.

```sh
$ aws event list-rules
{
[
{
"Name": "NTH-ASGTerminiate-20230602191740664900000025",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTH-ASGTerminiate-20230602191740664900000025",
"EventPattern": "{\"detail-type\":[\"EC2 Instance-terminate Lifecycle Action\"],\"source\":[\"aws.autoscaling\"]}",
"State": "ENABLED",
"Description": "Auto scaling instance terminate event",
"EventBusName": "default"
},
{
"Name": "NTH-HealthEvent-20230602191740079300000022",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTH-HealthEvent-20230602191740079300000022",
"EventPattern": "{\"detail-type\":[\"AWS Health Event\"],\"source\":[\"aws.health\"]}",
"State": "ENABLED",
"Description": "AWS health event",
"EventBusName": "default"
},
{
"Name": "NTH-InstanceRebalance-20230602191740077100000021",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTH-InstanceRebalance-20230602191740077100000021",
"EventPattern": "{\"detail-type\":[\"EC2 Instance Rebalance Recommendation\"],\"source\":[\"aws.ec2\"]}",
"State": "ENABLED",
"Description": "EC2 instance rebalance recommendation",
"EventBusName": "default"
},
{
"Name": "NTH-InstanceStateChange-20230602191740165000000024",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTH-InstanceStateChange-20230602191740165000000024",
"EventPattern": "{\"detail-type\":[\"EC2 Instance State-change Notification\"],\"source\":[\"aws.ec2\"]}",
"State": "ENABLED",
"Description": "EC2 instance state-change notification",
"EventBusName": "default"
},
{
"Name": "NTH-SpotInterrupt-20230602191740077100000020",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTH-SpotInterrupt-20230602191740077100000020",
"EventPattern": "{\"detail-type\":[\"EC2 Spot Instance Interruption Warning\"],\"source\":[\"aws.ec2\"]}",
"State": "ENABLED",
"Description": "EC2 spot instance interruption warning",
"EventBusName": "default"
},
{
"Name": "NTHASGTermRule",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTHASGTermRule",
"EventPattern": "{\"detail-type\":[\"EC2 Instance-terminate Lifecycle Action\"],\"source\":[\"aws.autoscaling\"]}",
"State": "ENABLED",
"EventBusName": "default"
},
{
"Name": "NTHInstanceStateChangeRule",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTHInstanceStateChangeRule",
"EventPattern": "{\"detail-type\":[\"EC2 Instance State-change Notification\"],\"source\":[\"aws.ec2\"]}",
"State": "ENABLED",
"EventBusName": "default"
},
{
"Name": "NTHRebalanceRule",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTHRebalanceRule",
"EventPattern": "{\"detail-type\":[\"EC2 Instance Rebalance Recommendation\"],\"source\":[\"aws.ec2\"]}",
"State": "ENABLED",
"EventBusName": "default"
},
{
"Name": "NTHScheduledChangeRule",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTHScheduledChangeRule",
"EventPattern": "{\"detail-type\":[\"AWS Health Event\"],\"source\":[\"aws.health\"]}",
"State": "ENABLED",
"EventBusName": "default"
},
{
"Name": "NTHSpotTermRule",
"Arn": "arn:aws:events:us-west-2:XXXXXXXXXXXXXX:rule/NTHSpotTermRule",
"EventPattern": "{\"detail-type\":[\"EC2 Spot Instance Interruption Warning\"],\"source\":[\"aws.ec2\"]}",
"State": "ENABLED",
"EventBusName": "default"
}
]
}
```
Loading