Git Product home page Git Product logo

terraform-aws-simple-eks-addons's Introduction

Simple EKS Add-Ons Module

This module manages several add-ons that might be needed in an EKS cluster. It currently supports the following add-ons:

  • Metrics server
  • AWS Container Insights agent installation
  • Cluster autoscaling
  • AWS Load Balancer Controller

Ideally this module should not be necessary, and all these add-ons could be installed from the simple-eks module itself. But, the Terraform provider for Kubernetes has some limitations that prevented us from doing so. In short, the Kubernetes provider cannot be initialized with credentials obtained in the same terraform apply execution where the cluster is created. (See the warning box in https://registry.terraform.io/providers/hashicorp/kubernetes/latest/ docs#stacking-with-managed-kubernetes-cluster-resources for more details).

Development

Update Metrics Server

When updating to a newer version of the metrics server, the container arguments need to be changed as shown below.

From:

- args:
    - --cert-dir=/tmp
    - --secure-port=443
    - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
    - --kubelet-use-node-status-port
    - --metric-resolution=15s

To:

- args:
    - --cert-dir=/tmp
    - --secure-port=443
    - --kubelet-preferred-address-types=InternalIP
    - --kubelet-use-node-status-port
    - --metric-resolution=15s
    - --kubelet-insecure-tls

Also, add hostNetwork: ${host_network} to the template spec.

Testing

We use Terratest to run integration tests.

Before running the tests the following environment variables must be set:

  • AWS_PROFILE: the AWS profile to use for the test
  • AWS_DEFAULT_REGION: region where the test cluster will be created (try to use a region other than eu-west-1, ie eu-west-2)
  • SIMPLE_EKS_TEST_VPC_NAME: VPC to be used by the test cluster

Then, go into test folder and run:

go test -v -timeout 30m

References

Calico

terraform-aws-simple-eks-addons's People

Contributors

betabandido avatar xorxsan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.