diff --git a/README.md b/README.md index cc7bfa5a13887c99599f6fb01b19095203d15785..eb87f84373fea39635429d46a09bb70909b6a8fc 100644 --- a/README.md +++ b/README.md @@ -186,60 +186,6 @@ Please refer to the `dev.tfvars` for [full example](deploy/live/preprod/eu-west- finance = {...} } -# Kubernetes Addons Module -Kubernetes Addons Module within this framework allows you to deploy Kubernetes Addons using Terraform Helm provider and Kubernetes provider with simple **true/false** feature in `<env>.tfvars`. - -e.g., `<env>.tfvars` config for enabling AWS LB INGRESS CONTROLLER. Refer to example [dev.tfvars](deploy/live/preprod/eu-west-1/application_acct/dev/dev.tfvars) to enable other Kubernetes Addons - - #---------------------------------------------------------// - # ENABLE AWS LB INGRESS CONTROLLER - #---------------------------------------------------------// - aws_lb_ingress_controller_enable = true - aws_lb_image_repo_name = "amazon/aws-load-balancer-controller" - aws_lb_image_tag = "v2.2.4" - aws_lb_helm_chart_version = "1.2.7" - aws_lb_helm_repo_url = "https://aws.github.io/eks-charts" - aws_lb_helm_helm_chart_name = "aws-load-balancer-controller" - -This module currently configured to fetch the Helm Charts from Open Source repos and Docker images from Docker Hub/Public ECR repos which requires outbound Internet connection from your EKS Cluster. Alternatively you can download the Docker images for each Addon and push it to AWS ECR repo and this can be accessed within VPC using ECR endpoint. -You can find the README for each Helm module with instructions on how to download the images from Docker Hub or third-party repos and upload it to your private ECR repo. This module provides the option to use internal Helm and Docker image repos from `<env>.tfvars`. - -For example, [ALB Ingress Controller](kubernetes-addons/lb-ingress-controller/README.md) for AWS LB Ingress Controller module. - -## Ingress Controller Modules -Ingress is an API object that defines the traffic routing rules (e.g., load balancing, SSL termination, path-based routing, protocol), whereas the Ingress Controller is the component responsible for fulfilling those requests. - -* [ALB Ingress Controller](kubernetes-addons/lb-ingress-controller/README.md) can be deployed by enabling the add-on in `<env>.tfvars` file. -**AWS LB Ingress controller** triggers the creation of an LB Ingress Controller, and the necessary supporting AWS resources whenever a Kubernetes user declares an Ingress resource in the cluster. -[ALB Docs](https://Kubernetes-sigs.github.io/aws-load-balancer-controller/latest/) - -* [Traefik Ingress Controller](kubernetes-addons/traefik-ingress/README.md) can be deployed by enabling the add-on in `<env>.tfvars` file. -**Traefik is an open source Kubernetes Ingress Controller**. The Traefik Kubernetes Ingress provider is a Kubernetes Ingress controller; that is to say, it manages access to cluster services by supporting the Ingress specification. For more details about [Traefik can be found here](https://doc.traefik.io/traefik/providers/Kubernetes-ingress/) - -* [Nginx Ingress Controller](kubernetes-addons/nginx-ingress/README.md) can be deployed by enabling the add-on in `<env>.tfvars` file. -**Nginx is an open source Kubernetes Ingress Controller**. The Nginx Kubernetes Ingress provider is a Kubernetes Ingress controller; that is to say, it manages access to cluster services by supporting the Ingress specification. For more details about [Nginx can be found here](https://kubernetes.github.io/ingress-nginx/) - -## Autoscaling Modules -**Cluster Autoscaler** and **Metric Server** Helm Modules gets deployed by default with the EKS Cluster. - -* [Cluster Autoscaler](kubernetes-addons/cluster-autoscaler/README.md) can be deployed by enabling the add-on in `<env>.tfvars` file. -The Kubernetes Cluster Autoscaler automatically adjusts the number of nodes in your cluster when pods fail or are rescheduled onto other nodes. It's not deployed by default in EKS clusters. -That is, the AWS Cloud Provider implementation within the Kubernetes Cluster Autoscaler controls the **DesiredReplicas** field of Amazon EC2 Auto Scaling groups. -The Cluster Autoscaler is typically installed as a **Deployment** in your cluster. It uses leader election to ensure high availability, but scaling is one done by a single replica at a time. - -* [Metrics Server](kubernetes-addons/metrics-server/README.md) can be deployed by enabling the add-on in `<env>.tfvars` file. -The Kubernetes Metrics Server, used to gather metrics such as cluster CPU and memory usage over time, is not deployed by default in EKS clusters. - -## Logging and Monitoring -**FluentBit** is an open source Log Processor and Forwarder which allows you to collect any data like metrics and logs from different sources, enrich them with filters and send them to multiple destinations. - -* [aws-for-fluent-bit](kubernetes-addons/aws-for-fluent-bit/README.md) can be deployed by enabling the add-on in `<env>.tfvars` file. -AWS provides a Fluent Bit image with plugins for both CloudWatch Logs and Kinesis Data Firehose. The AWS for Fluent Bit image is available on the Amazon ECR Public Gallery. -For more details, see [aws-for-fluent-bit](https://gallery.ecr.aws/aws-observability/aws-for-fluent-bit) on the Amazon ECR Public Gallery. - -* [fargate-fluentbit](kubernetes-addons/fargate-fluentbit) can be deployed by enabling the add-on in `<env>.tfvars` file. -This module ships the Fargate Container logs to CloudWatch - ## Bottlerocket OS [Bottlerocket](https://aws.amazon.com/bottlerocket/) is an open source operating system specifically designed for running containers. Bottlerocket build system is based on Rust. It's a container host OS and doesn't have additional software's or package managers other than what is needed for running containers hence its very light weight and secure. Container optimized operating systems are ideal when you need to run applications in Kubernetes with minimal setup and do not want to worry about security or updates, or want OS support from cloud provider. Container operating systems does updates transactionally. @@ -322,7 +268,6 @@ to initialize a working directory with configuration files terraform init -backend-config deploy/live/preprod/eu-west-1/application/dev/backend.conf ``` - #### Step6: Run Terraform PLAN to verify the resources created by this execution @@ -376,22 +321,6 @@ EKS Cluster details can be extracted from terraform output or from AWS Console t ## Deploying example templates The `examples` folder contains multiple cluster templates with pre-populated `.tfvars` which can be used as a quick start. Reuse the templates from `examples` and follow the above Deployment steps as mentioned above. -# EKS Addons update -Amazon EKS doesn't modify any of your Kubernetes add-ons when you update a cluster to newer versions. -It's important to upgrade EKS Addons [Amazon VPC CNI](https://github.com/aws/amazon-vpc-cni-k8s), [DNS (CoreDNS)](https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html) and [KubeProxy](https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html) for each EKS release. - -This [README](eks_cluster_addons_upgrade/README.md) guides you to update the EKS Cluster and the addons for newer versions that matches with your EKS cluster version - -Updating a EKS cluster instructions can be found in [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html). - -# Important note -This module tested only with **Kubernetes v1.20 version**. Kubernetes addons modules aligned with k8s v1.20. If you are looking to use this code to deploy different versions of Kubernetes then ensure Helm charts and docker images aligned with k8s version. - -The `Kubernetes_version="1.20"` is the required variable in `<env>.tfvars`. Kubernetes is evolving a lot, and each major version includes new features, fixes, or changes. - -Always check [Kubernetes Release Notes](https://Kubernetes.io/docs/setup/release/notes/) before updating the major version. You also need to ensure your applications and Helm addons updated, -or workloads could fail after the upgrade is complete. For action, you may need to take before upgrading, see the steps in the EKS documentation. - # Notes: If you are using an existing VPC then you may need to ensure that the following tags added to the VPC and subnet resources diff --git a/docs/add-ons/agones.md b/docs/add-ons/agones.md new file mode 100644 index 0000000000000000000000000000000000000000..0f2e704ed078fd6d2c8e3c6a8883cc5b74c2ec53 --- /dev/null +++ b/docs/add-ons/agones.md @@ -0,0 +1,13 @@ +# Agones + +[Agones](https://agones.dev/) is an open source platform for deploying, hosting, scaling, and orchestrating dedicated game servers for large scale multiplayer games on Kubernetes. + +For complete project documentation, please visit the [Agones documentation site](https://agones.dev/site/docs/). + +## Usage + +Agones can be deployed by enabling the add-on via the following. + +```hcl +agones_enable = true +``` \ No newline at end of file diff --git a/docs/add-ons/aws-for-fluent-bit.md b/docs/add-ons/aws-for-fluent-bit.md new file mode 100644 index 0000000000000000000000000000000000000000..f570ebf959030f317b8aa7ba7310cf1e7e7157c1 --- /dev/null +++ b/docs/add-ons/aws-for-fluent-bit.md @@ -0,0 +1,15 @@ +# Fluent Bit + +Fluent Bit is an open source Log Processor and Forwarder which allows you to collect any data like metrics and logs from different sources, enrich them with filters and send them to multiple destinations. + +## AWS for Fluent Bit + +AWS provides a Fluent Bit image with plugins for both CloudWatch Logs and Kinesis Data Firehose. The [AWS for Fluent Bit](https://github.com/aws/aws-for-fluent-bit) image is available on the Amazon ECR Public Gallery. For more details, see [aws-for-fluent-bit](https://gallery.ecr.aws/aws-observability/aws-for-fluent-bit) on the Amazon ECR Public Gallery. + +### Usage + +[aws-for-fluent-bit](kubernetes-addons/aws-for-fluent-bit/README.md) can be deployed by enabling the add-on via the following. + +```hcl +aws_for_fluent_bit_enable = true +``` \ No newline at end of file diff --git a/docs/add-ons/aws-load-balancer-controller.md b/docs/add-ons/aws-load-balancer-controller.md new file mode 100644 index 0000000000000000000000000000000000000000..eaac0af5c07b467da75d5a96ad56c03050445c05 --- /dev/null +++ b/docs/add-ons/aws-load-balancer-controller.md @@ -0,0 +1,31 @@ +# AWS Load Balancer Controller + +The [AWS Load Balancer Controller](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html) manages AWS Elastic Load Balancers for a Kubernetes cluster. The controller provisions the following resources: + +* An AWS Application Load Balancer (ALB) when you create a Kubernetes Ingress. +* An AWS Network Load Balancer (NLB) when you create a Kubernetes Service of type LoadBalancer. + +For more information about AWS Load Balancer Controller please see the [official documentation](https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html). + +## Usage + +```hcl +aws_lb_ingress_controller_enable = true +aws_lb_image_repo_name = "amazon/aws-load-balancer-controller" +aws_lb_image_tag = "v2.2.4" +aws_lb_helm_chart_version = "1.2.7" +aws_lb_helm_repo_url = "https://aws.github.io/eks-charts" +aws_lb_helm_helm_chart_name = "aws-load-balancer-controller" +``` + +To validate that controller is running, ensure that controller deployment is in RUNNING state: + +```sh +# Assuming controller is installed in kube-system namespace +$ kubectl get deployments -n kube-system +NAME READY UP-TO-DATE AVAILABLE AGE +aws-load-balancer-controller 2/2 2 2 3m58s +``` +#### AWS Service annotations for LB Ingress Controller + +Here is the link to get the AWS ELB [service annotations](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/service/annotations/) for LB Ingress controller \ No newline at end of file diff --git a/docs/add-ons/cert-manager.md b/docs/add-ons/cert-manager.md new file mode 100644 index 0000000000000000000000000000000000000000..f952ef03cb1518d0ad69f6f0b0f0f56ed654af37 --- /dev/null +++ b/docs/add-ons/cert-manager.md @@ -0,0 +1,13 @@ +# cert-manager + +cert-manager adds certificates and certificate issuers as resource types in Kubernetes clusters, and simplifies the process of obtaining, renewing and using those certificates. + +For complete project documentation, please visit the [cert-manager documentation site](https://cert-manager.io/docs/). + +## Usage + +cert-manger can be deployed by enabling the add-on via the following. + +```hcl +cert_manager_enable = true +``` \ No newline at end of file diff --git a/docs/add-ons/cluster-autoscaler.md b/docs/add-ons/cluster-autoscaler.md new file mode 100644 index 0000000000000000000000000000000000000000..90677ade7fcd91520329e79ebed3d9547a08d843 --- /dev/null +++ b/docs/add-ons/cluster-autoscaler.md @@ -0,0 +1,16 @@ +# Cluster Autoscaler + +Cluster Autoscaler is a tool that automatically adjusts the number of nodes in your cluster when: + +* Pods fail due to insufficient resources, or +* Pods are rescheduled onto other nodes due to being in nodes that are underutilized for an extended period of time. + +The [Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) add-on adds support for Cluster Autoscaler to an EKS cluster. It is typically installed as a **Deployment** in your cluster. It uses leader election to ensure high availability, but scaling is one done via one replica at a time. + +## Usage + +[Cluster Autoscaler](kubernetes-addons/cluster-autoscaler/README.md) can be deployed by enabling the add-on via the following. + +```hcl +cluster_autoscaler_enable = true +``` \ No newline at end of file diff --git a/docs/add-ons/fargate-fluent-bit.md b/docs/add-ons/fargate-fluent-bit.md new file mode 100644 index 0000000000000000000000000000000000000000..8c4e1cead08ec9db114534e4674eb120d5e8e477 --- /dev/null +++ b/docs/add-ons/fargate-fluent-bit.md @@ -0,0 +1,11 @@ +## Fargate Fluent Bit + +The [fargate-fluent-bit](https://aws.amazon.com/blogs/containers/fluent-bit-for-amazon-eks-on-aws-fargate-is-here/) configures Fluent Bit to ship the Fargate Container logs to CloudWatch + +### Usage + +fargate-fluent-bit can be deployed by enabling the add-on via the following. + +```hcl +fargate_fluent_bit_enable = true +``` \ No newline at end of file diff --git a/docs/add-ons/index.md b/docs/add-ons/index.md new file mode 100644 index 0000000000000000000000000000000000000000..3cb59c2abb7ecc27d9e3ff6de4c0ee27998b926b --- /dev/null +++ b/docs/add-ons/index.md @@ -0,0 +1,32 @@ +# Kubernetes Addons Module + +The `kubernetes-addons` module within this framework allows you to deploy Kubernetes add-ons using both the Terraform Helm and Kubernetes providers with simple **true/false** flags. + +| Add-on | Description | +|-----------|----------------- +| Agones | +| FluentBit | +| OpenTelemetry | +| cert-manager | +| Cluster Autoscaler | +| AWS Load Balancer Controller +| Metrics Server | +| Nginx | +| Prometheus | +| Traefik | +| Windows VPC Controller | + +## Installation + +By default, the module is configured to fetch Helm Charts from Open Source repositories and Docker images from Docker Hub/Public ECR repositories. This requires outbound Internet connection from your EKS Cluster. + +Alternatively you can download the Docker images for each add-on and push them to an AWS ECR repo and this can be accessed within an existing VPC using an ECR endpoint. For instructions on how to do so download existing images, and push them to ECR, see [ECR instructions](../docs/ecr-instructions.md). Each individual add-on directory contains a README.md file with info on the Helm repositories each add-on uses. + +# EKS Addons update + +Amazon EKS doesn't modify any of your Kubernetes add-ons when you update a cluster to newer versions. +It's important to upgrade EKS Addons [Amazon VPC CNI](https://github.com/aws/amazon-vpc-cni-k8s), [DNS (CoreDNS)](https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html) and [KubeProxy](https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html) for each EKS release. + +This [README](eks_cluster_addons_upgrade/README.md) guides you to update the EKS Cluster and the addons for newer versions that matches with your EKS cluster version + +Updating a EKS cluster instructions can be found in [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html). \ No newline at end of file diff --git a/docs/add-ons/metrics-server.md b/docs/add-ons/metrics-server.md new file mode 100644 index 0000000000000000000000000000000000000000..f2ab78fbb0509db83a63a1d7f24a93734e8cf074 --- /dev/null +++ b/docs/add-ons/metrics-server.md @@ -0,0 +1,22 @@ +# Metrics Server + +Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines. It is not deployed by default in Amazon EKS clusters. The Metrics Server is commonly used by other Kubernetes add-ons, such as the Horizontal Pod Autoscaler, Vertical Autoscaling or the Kubernetes Dashboard. + +> **Important**: Don't use Metrics Server when you need an accurate source of resource usage metrics or as a monitoring solution. + +## Usage + +[Metrics Server](kubernetes-addons/metrics-server/README.md) can be deployed by enabling the add-on via the following. + +```hcl +metrics_server_enable = true +``` + +Once deployed, you can see metrics-server pod in the `kube-system` namespace. + +```sh +$ kubectl get deployments -n kube-system + +NAME READY UP-TO-DATE AVAILABLE AGE +metrics-server 1/1 1 1 20m +``` \ No newline at end of file diff --git a/docs/add-ons/nginx.md b/docs/add-ons/nginx.md new file mode 100644 index 0000000000000000000000000000000000000000..1a75bfff62bbd54efa0f5fcac706cdfad43db29c --- /dev/null +++ b/docs/add-ons/nginx.md @@ -0,0 +1,26 @@ +# Nginx + +This add-on installs [Nginx Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/) on Amazon EKS. The Nginx ingress controller uses [Nginx](https://www.nginx.org/) as a reverse proxy and load balancer. + +Other than handling Kubernetes ingress objects, this ingress controller can facilitate multi-tenancy and segregation of workload ingresses based on host name (host-based routing) and/or URL Path (path based routing). + +This add-on depends on [AWS Load Balancer Controller](aws-load-balancer-controller.md) in order to enable NLB support. + +## Usage + +[Nginx Ingress Controller](kubernetes-addons/nginx-ingress/README.md) can be deployed by enabling the add-on via the following. + +```hcl +nginx_ingress_controller_enable = true +``` + +To validate that installation is successful run the following command: + +```bash +$ kubectl get po -n kube-system +NAME READY STATUS RESTARTS AGE +ssp-addon-nginx-ingress-78b8567p4q6 1/1 Running 0 4d10h +``` + +Note that the ingress controller is deployed in the `kube-system` namespace. + \ No newline at end of file diff --git a/docs/add-ons/open-telemetry.md b/docs/add-ons/open-telemetry.md new file mode 100644 index 0000000000000000000000000000000000000000..e70dcde06ae7913e45899fc88e3e4df47c4ac2ff --- /dev/null +++ b/docs/add-ons/open-telemetry.md @@ -0,0 +1,13 @@ +# OpenTelemetry Collector + +The OpenTelemetry Collector offers a vendor-agnostic implementation on how to receive, process and export telemetry data. In addition, it removes the need to run, operate and maintain multiple agents/collectors in order to support open-source telemetry data formats (e.g. Jaeger, Prometheus, etc.) sending to multiple open-source or commercial back-ends. + +For complete documentation, please visit the [OpenTelemetry Collector documentation site](https://opentelemetry.io/docs/). + +## Usage + +[OpenTelemetry Collector](kubernetes-addons/nginx-ingress/README.md) can be deployed by enabling the add-on via the following. + +``` +aws_open_telemetry_enable = true +``` \ No newline at end of file diff --git a/docs/add-ons/prometheus.md b/docs/add-ons/prometheus.md new file mode 100644 index 0000000000000000000000000000000000000000..690828316474a1e52fa05df79b522150fdf2c74d --- /dev/null +++ b/docs/add-ons/prometheus.md @@ -0,0 +1,26 @@ +# Prometheus + +Prometheus is an open source monitoring and alerting service. Prometheus joined the Cloud Native Computing Foundation in 2016 as the second hosted project, after Kubernetes. + +This project provides support for installing a open source Prometheus serve in your EKS cluster and for deploying a new Prometheus instance via [Amazon Managed Service for Prometheus](https://aws.amazon.com/prometheus/). + +## Usage + +The following will deploy the Prometheus server into an EKS Cluster and provision a new Amazon Managed Service for Prometheus instance. + +```hcl +# Creates the AMP workspace and all the relevent IAM Roles +aws_managed_prometheus_enable = false +aws_managed_prometheus_workspace_name = "EKS-Metrics-Workspace" + +# Deploys Pometheus server with remote write to AWS AMP Workspace +prometheus_enable = false +prometheus_helm_chart_url = "https://prometheus-community.github.io/helm-charts" +prometheus_helm_chart_name = "prometheus" +prometheus_helm_chart_version = "14.4.0" +prometheus_image_tag = "v2.26.0" +alert_manager_image_tag = "v0.21.0" +configmap_reload_image_tag = "v0.5.0" +node_exporter_image_tag = "v1.1.2" +pushgateway_image_tag = "v1.3.1" +``` diff --git a/docs/add-ons/traefik.md b/docs/add-ons/traefik.md new file mode 100644 index 0000000000000000000000000000000000000000..cebaa96e9e83fb92f5cd916162d7c01916af368d --- /dev/null +++ b/docs/add-ons/traefik.md @@ -0,0 +1,32 @@ +# Traefik + +Traefik is an open-source Edge Router that makes publishing your services a fun and easy experience. It receives requests on behalf of your system and finds out which components are responsible for handling them. + +For complete project documentation, please visit the [Traefik documentation site](https://doc.traefik.io/traefik/). + +## Usage + +[Traefik](kubernetes-addons/traefik-ingress/README.md) can be deployed by enabling the add-on via the following. + +```hcl +traefik_ingress_controller_enable = true +``` + +##### How to test Traefik WebUI + +Once the Traefik deployment is successful then run the below command from your mac where you have acces to EKS cluster using kubectl + +``` +$ kubectl port-forward svc/traefik -n kube-system 9000:9000 +``` + +Now open the browser from your mac and enter the below URL to access Traefik Web UI + +``` +http://127.0.0.1:9000/dashboard/ +``` + + + +#### AWS Service annotations for Traefik Ingress Controller +Here is the link to get the AWS ELB [service annotations](https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/service/annotations/) for Traefik Ingress controller \ No newline at end of file diff --git a/docs/add-ons/windows-vpc-controllers.md b/docs/add-ons/windows-vpc-controllers.md new file mode 100644 index 0000000000000000000000000000000000000000..69afa870a412708a17a6156914c6e850bdac0df5 --- /dev/null +++ b/docs/add-ons/windows-vpc-controllers.md @@ -0,0 +1,5 @@ +# Windows VPC Controllers + +## Pre-requisites + +[cert-manager](https://cert-manager.io/) is currently needed to enable Windows support. The `cert-manager` [Helm chart](../cert-manager) will be automatically enabeld, if Windows support is enabled. \ No newline at end of file diff --git a/docs/cluster-upgrades.md b/docs/cluster-upgrades.md new file mode 100644 index 0000000000000000000000000000000000000000..3a8ae1d6edd3c56c37aa0ce0e44fb2e01b466253 --- /dev/null +++ b/docs/cluster-upgrades.md @@ -0,0 +1,62 @@ +### EKS Upgrade Documentation + +#### Objective: + +The purpose of this document is to provide an overview of the steps for upgrading the EKS Cluster from one version to another. Please note that EKS upgrade documentation gets published by AWS every year. + +The current version of the upgrade documentation while writing this [README](https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html) + +#### Pre-Requisites: + + 1. Download the latest upgrade docs from AWS sites (https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html) + 2. Always upgrade one increment at a time (E.g., 1.17 to 1.18). AWS doesn't support upgrades from 1.16 to 1.18 directly + +This table shows the supported plugin versions for each EKS Kubernetes version + +|Kubernetes version|1.19|1.18|1.17|1.16|1.15|1.14| +| ----------- | --- | --- | --- | --- | --- | --- | +|Amazon VPC CNI plugin|1.7.5|1.7.5|1.7.5|1.7.5|1.7.5|1.7.5| +|DNS (CoreDNS)|1.8.0|1.7.0|1.6.6|1.6.6|1.6.6|1.6.6| +|KubeProxy|1.19.6|1.18.9|1.17.12|1.16.15|1.15.12|1.14.9| + +#### Steps to upgrade EKS cluster: + + 1. Change the version in Terraform to desired version under `base.tfvars`. See the example below + + ```hcl-terraform + kubernetes_version = "1.20" + ``` + +2. Apply the changes to the cluster with Terraform. This step will upgrade the Control Plane and Data Plane to the newer version, and it will roughly take 35 mins to 1 hour + +3. Once the Cluster is upgraded to desired version then please updated the following plugins as per the instructions + +#### Steps to upgrade Add-ons: + +Just update the latest versions in `base.tfvars` file as shown below. EKS Addon latest versions can be found in AWS EKS Console under Addon section or from AWS documentation. + +##### KubeProxy + +```hcl-terraform +enable_kube_proxy_addon = true +kube_proxy_addon_version = "v1.20.4-eksbuild.2" +``` + +##### CoreDNS + +```hcl-terraform +enable_coredns_addon = true +coredns_addon_version = "v1.8.3-eksbuild.1" +``` + +##### VPC CNI + +```hcl-terraform +enable_vpc_cni_addon = true +vpc_cni_addon_version = "v1.8.0-eksbuild.1" +``` + +Apply the changes to the cluster with Terraform. + +## Important Note +Please note that you may need to update other Kubernetes Addons deployed through Helm Charts to match with new Kubernetes upgrade version \ No newline at end of file diff --git a/docs/ecr-instructions.md b/docs/ecr-instructions.md new file mode 100644 index 0000000000000000000000000000000000000000..1674dd687de0c64d8ddb38a5e9cd2d2f078137e1 --- /dev/null +++ b/docs/ecr-instructions.md @@ -0,0 +1,31 @@ +# Docker upload to Elastic Container Registry + +Download the docker image to your local Mac/Laptop + +``` +$ docker pull <image name>:<image tag> +``` + +Retrieve an authentication token and authenticate your Docker client to your registry. Use the AWS CLI: + +``` +$ aws ecr get-login-password --region <aws region> | docker login --username AWS --password-stdin <account id>.dkr.ecr.<aws region>.amazonaws.com +``` + +Create an ECR repo for your image. + +``` s +$ aws ecr create-repository --repository-name <image name> --image-scanning-configuration scanOnPush=true +``` + +After the repo is created in ECR, tag your image so, you can push the image to this repository: + +``` +$ docker tag <image name>:<image tag> <account id>.dkr.ecr.<aws region.amazonaws.com/<image name>:<image tag> +``` + +Step6: Run the following command to push this image to your newly created AWS repository: + +``` +$ docker push <account id>.dkr.ecr.<aws region.amazonaws.com/<image name>:<image tag> +``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000000000000000000000000000000000..eb0144f6f6cd7d5f1de456f2019fb5f1b825dd42 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,10 @@ +# EKS Accelerator for Terraform + + +# EKS Addons update +Amazon EKS doesn't modify any of your Kubernetes add-ons when you update a cluster to newer versions. +It's important to upgrade EKS Addons [Amazon VPC CNI](https://github.com/aws/amazon-vpc-cni-k8s), [DNS (CoreDNS)](https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html) and [KubeProxy](https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html) for each EKS release. + +This [README](eks_cluster_addons_upgrade/README.md) guides you to update the EKS Cluster and the addons for newer versions that matches with your EKS cluster version + +Updating a EKS cluster instructions can be found in [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html). \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000000000000000000000000000000000000..db46637bd5eb103b66e9ab1c5717e936fa53ec7b --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,37 @@ +site_name: Amazon EKS Accelerator for Terraform +repo_name: "aws-samples/aws-eks-accelerator-for-terraform" +repo_url: "https://github.com/aws-samples/aws-eks-accelerator-for-terraform" +docs_dir: "docs" +theme: + name: material + features: + - tabs +nav: + - Overview: 'index.md' + - Cluster Upgrades: 'cluster-upgrades.md' + - ECR Instructions: 'ecr-instructions.md' + - AddOns: + - Overview: 'add-ons/index.md' + - Agones: 'add-ons/agones.md' + - AWS for Fluent Bit: 'add-ons/aws-for-fluent-bit.md' + - AWS Load Balancer Controller: 'add-ons/aws-load-balancer-controller.md' + - cert-manager: 'add-ons/cert-manager.md' + - Cluster Autoscaler: 'add-ons/cluster-autoscaler.md' + - Fargate Fluent Bit: 'add-ons/fargate-fluent-bit.md' + - Metrics Server: 'add-ons/metrics-server.md' + - Nginx: 'add-ons/nginx.md' + - OpenTelemetry: 'add-ons/open-telemetry.md' + - Prometheus: 'add-ons/prometheus.md' + - Traefik: 'add-ons/traefik.md' + - Windows VPC Controllers: 'add-ons/windows-vpc-controllers.md' +markdown_extensions: + - def_list + - pymdownx.highlight + - pymdownx.superfences + - pymdownx.inlinehilite + - pymdownx.tasklist: + custom_checkbox: true + - toc: + permalink: true +plugins: + - search \ No newline at end of file