Giter Site home page Giter Site logo

shamimice03 / terraform-aws-eks-monitoring-logging Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 3.0 37 KB

Terraform Module for AWS EKS monitoring and logging

Home Page: https://registry.terraform.io/modules/shamimice03/eks-monitoring-logging/aws/latest

License: GNU General Public License v3.0

HCL 100.00%
aws aws-eks cloudwatch cloudwatch-logs fluentbit kubernetes kubernetes-logging kubernetes-monitoring terraform terraform-eks terraform-module

terraform-aws-eks-monitoring-logging's Introduction

AWS EKS Monitoring and Logging (Using Container Insights)

Prerequisite:

We must grant IAM permissions to enable Amazon EKS worker nodes to send metrics and logs to CloudWatch:

Manual Steps:

  • Attach AWS managed CloudWatchAgentServerPolicy to the IAM roles of the EKS worker nodes.
  • Policy ARN : arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy

Using terraform:

This terraform module provides an option to attach IAM Policy to EKS nodegroup roles :

# Attach CloudWatchAgentServerPolicy to EKS nodegroup roles

  nodegroup_roles = [
      "kubecloud-eks-private-nodegroup",
      "kubecloud-eks-public-nodegroup",
  ]

Usage:

With IAM Policy attachment option:

module "eks_monitoring_logging" {
    
    source = "shamimice03/eks-monitoring-logging/aws"
    
    cluster_name      = "kubecloud-eks"
    aws_region        = "ap-northeast-1"
    namespace         = "amazon-cloudwatch"

    enable_cwagent    = true
    enable_fluent_bit = true
    
    # Attach CloudWatchServerPolicy to EKS nodegroup roles
    nodegroup_roles = [
      "kubecloud-eks-private-nodegroup",
      "kubecloud-eks-public-nodegroup",
    ]
}

Without IAM Policy attachment option:

module "eks_monitoring_logging" {
    
    source = "shamimice03/eks-monitoring-logging/aws"
    
    cluster_name      = "kubecloud-eks"
    aws_region        = "ap-northeast-1"
    namespace         = "amazon-cloudwatch"
    
    enable_cwagent    = true
    enable_fluent_bit = true
}

Variables:

Common Variables:

Variable Type Description Default
cluster_name string EKS Cluster Name null
aws_region string Provide Cluster Region null
namespace string Name of the namespace amazon-cloudwatch
nodegroup_roles list(any) List of EKS nodegroup roles [ ]

Fluent Bit Variables:

Variable Type Description Default
enable_fluent_bit bool Enable or Disable Fluent-bit Agent on EKS cluster true
fluent_bit_http_server string Enable or Disable fluent bit HTTP server On
fluent_bit_http_port string Define fluent-bit HTTP Port 2020
fluent_bit_read_head string Enable or Disable fluent-bit Head read Off
fluent_bit_read_tail string Enable or Disable fluent-bit Tail read On
fluentbit_configmap_name string Name of the ConfigMap for Fluent Bit fluent-bit-cluster-info

CloudWatch Agent (CW Agent) Variables:

Variable Type Description Default
enable_cwagent bool Enable or Disable CloudWatch Agent on EKS cluster true
cwagent_configmap_name string Name of the ConfigMap for CloudWatch Agent cwagentconfig

Resources (kubernetes manifests):

Required providers and versions:

Provider Version
hashicorp/aws >= 5.0
hashicorp/kubernetes >= 2.21
hashicorp/http >= 3.4.0
gavinbunney/kubectl >= 1.14.0

terraform-aws-eks-monitoring-logging's People

Contributors

shamimice03 avatar

Stargazers

 avatar

Watchers

 avatar  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.