Coder Social home page Coder Social logo

aws-observability / amp-eks-iam Goto Github PK

View Code? Open in Web Editor NEW
11.0 18.0 2.0 25 KB

Tool providing easy IAM setup on EKS for Amazon Managed Service for Prometheus (AMP) users.

Home Page: https://aws.amazon.com/prometheus

License: Apache License 2.0

Go 100.00%
amp prometheus iam

amp-eks-iam's Introduction

๐Ÿ”‘ amp-eks-iam

amp-eks-iam creates an IAM role to give remote write privileges to an EKS service account. If you are collecting Prometheus metrics on EKS and want to send them to Amazon Managed Service for Prometheus (AMP), you can use this tool to give minimal privileges to your Kubernetes namespace and service account.

Installation

$ go get github.com/aws-observability/amp-eks-iam

Usage

amp-eks-iam <cluster flags> [options...]

amp-eks-iam creates the required IAM policies and roles to give
remote write priviledges to an EKS service account.

Example:
$ amp-eks-iam \
   -region=us-east-1 -cluster=eks-cluster

Cluster flags:
-cluster         EKS cluster name.

Options:
-namespace       Kubernetes namespace to apply the policy to. By default, "prometheus".
-service-account Kubernetes service account to apply the policy to. By default, the namespace.
-role            IAM role name to create, default is
                 "EKS-AMP-ServiceAccount-{region}-{cluster}-{namespace}-{sa}".
-region          AWS region of the EKS cluster.

By default, amp-eks-iam creates the role and the privileges for the "prometheus" Kubernetes namespace and service account. You can specify your own namespaces and service accounts. For example, if you are deploying Grafana Agent as explained in this article, use the following command:

$ amp-eks-iam \
   -region=us-east-1 -cluster=eks-cluster \
   -namespace=grafana-agent \
   -service-account=grafana-agent

Troubleshooting

If you received an error telling "roleName" is above the character limits like below,

2021/02/20 09:46:27 Cannot create IAM role: failed to create the IAM role: ValidationError: 1 validation error detected: Value 'EKS-AMP-ServiceAccount-us-west-2-demo-prometheusdeployment-prometheusdeploymentaccount' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64

You can set a custom role name with -role:

$ amp-eks-iam \
   -region=us-east-1 -cluster=eks-cluster \
   -role AMPIngestRole

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

amp-eks-iam's People

Contributors

aidansteele avatar alolita avatar amazon-auto avatar anna-tran avatar rakyll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ekmixon

amp-eks-iam's Issues

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.