aws-auth | Manage the aws-auth config map for EKS Kubernetes clusters | Cloud Storage library

 by   keikoproj Go Version: v0.4.1 License: Apache-2.0

kandi X-RAY | aws-auth Summary

kandi X-RAY | aws-auth Summary

aws-auth is a Go library typically used in Storage, Cloud Storage, Amazon S3 applications. aws-auth has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Manage the aws-auth config map for EKS Kubernetes clusters
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              aws-auth has a low active ecosystem.
              It has 154 star(s) with 21 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 12 have been closed. On average issues are closed in 31 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of aws-auth is v0.4.1

            kandi-Quality Quality

              aws-auth has 0 bugs and 43 code smells.

            kandi-Security Security

              aws-auth has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              aws-auth code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              aws-auth is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              aws-auth releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 1430 lines of code, 61 functions and 13 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed aws-auth and discovered the below as its top functions. This is intended to give you an instant insight into aws-auth implemented functionality, and help decide if they suit your requirements.
            • UpsertMultiple adds multiple mapRoles to the auth map
            • getKubernetesClient returns a Kubernetes client
            • helper function to remove a role from authMaps
            • Removes an existing UsersAuthMap
            • WithRetry calls fn with retries .
            • ReadAuthMap reads an auth map
            • removeByUsernameCmd returns a cobra . Command for remove by username
            • upsertRole adds the given resource to the list of roles
            • upsertUser inserts a new UsersAuthMap into authMaps
            • UpdateAuthMap updates ConfigMap
            Get all kandi verified functions for this library.

            aws-auth Key Features

            No Key Features are available at this moment for aws-auth.

            aws-auth Examples and Code Snippets

            aws-auth,Usage from command line
            Godot img1Lines of Code : 53dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            $ aws-auth
            aws-auth modifies the aws-auth configmap on eks clusters
            
            Usage:
              aws-auth [command]
            
            Available Commands:
              help        Help about any command
              remove      remove removes an auth-map from mapRoles or mapUsers
              remove-by-username remove-  
            aws-auth,Usage as a library
            Godot img2Lines of Code : 30dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            
            
            package main
            
            import (
                awsauth "github.com/keikoproj/aws-auth/pkg/mapper"
            )
            
            func someFunc(client kubernetes.Interface) error {
                awsAuth := awsauth.New(client, false)
                myUpsertRole := &awsauth.MapperArguments{
                    MapRoles: true,
              
            aws-auth,Run in a container
            Godot img3Lines of Code : 8dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            $ docker run \
            -v ~/.kube/:/root/.kube/ \
            -v ~/.aws/:/root/.aws/ \
            keikoproj/aws-auth:latest \
            aws-auth upsert --mapusers \
            --userarn arn:aws:iam::555555555555:user/a-user \
            --username admin \
            --groups system:masters
              

            Community Discussions

            QUESTION

            Error: Post "http://localhost/api/v1/namespaces/kube-system/configmaps": dial tcp 127.0.0.1:80
            Asked 2022-Apr-01 at 18:23

            I'm trying to deploy a cluster with self managed node groups. No matter what config options I use, I always come up with the following error:

            Error: Post "http://localhost/api/v1/namespaces/kube-system/configmaps": dial tcp 127.0.0.1:80: connect: connection refusedwith module.eks-ssp.kubernetes_config_map.aws_auth[0]on .terraform/modules/eks-ssp/aws-auth-configmap.tf line 19, in resource "kubernetes_config_map" "aws_auth":resource "kubernetes_config_map" "aws_auth" {

            The .tf file looks like this:

            ...

            ANSWER

            Answered 2022-Feb-03 at 16:16

            Based on the example provided in the Github repo [1], my guess is that the provider configuration blocks are missing for this to work as expected. Looking at the code provided in the question, it seems that the following needs to be added:

            Source https://stackoverflow.com/questions/70962800

            QUESTION

            Terraform enable EKS cluster access for other IAM users
            Asked 2022-Feb-18 at 09:43

            I want to set up a EKS cluster, enabling other IAM users to connect and tinker with the cluster. To do so, AWS recommends patching a config map, which I did. Now I want to enable the same “feature” using terraform.

            I use terraforms EKS provider and read in the documentation in section "Due to the plethora of tooling a..." that basically authentication is up to myself.

            Now I use the Terraform Kubernetes provider to update this config map:

            ...

            ANSWER

            Answered 2022-Jan-07 at 16:38

            I use 17.24.0 and have no idea what is new with 18.0.3.

            In my case, I follow this example: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/v17.24.0/examples/complete/main.tf

            My main.tf

            Source https://stackoverflow.com/questions/70623955

            QUESTION

            Terraform "file name too long" when executing with "null_resource" "apply"
            Asked 2022-Feb-05 at 20:25

            I'm trying to execute the following command: kubectl get cm aws-auth -n kube-system -o json | jq --arg add "`cat additional_roles_aws_auth.yaml`" '.data.mapRoles += $add' | kubectl apply -f - as part of a local Terraform exeuction as follows:

            ...

            ANSWER

            Answered 2022-Feb-05 at 20:25

            As per my comment: the KUBECONFIG environment variable needs to be a list of configuration files and not the content of the file itself [1]:

            The KUBECONFIG environment variable is a list of paths to configuration files.

            The original problem was that the content of the file was encoded in base64 format [2] and used in that format without decoding it before. Thankfully, Terraform has both functions built-in, so using base64decode [3] would return the "normal" file content. Still, it would be the file content and not path to the config file. Based on the other comments, I guess the important thing to note is the additional_roles_aws_auth.yaml file has to be in the same directory as the root module. As the command is a bit more complicated, I am not sure if you could use Terraform built-in path object [4] to make sure the file is searched for in the root of the module:

            Source https://stackoverflow.com/questions/70992268

            QUESTION

            User cannot log into EKS Cluster using kubectl
            Asked 2021-Dec-28 at 08:39

            I am trying to host an application in AWS Elastic Kubernetes Service(EKS). I have configured the EKS cluster using the AWS Console using an IAM user (user1). Configured the Node Group and added a Node to the EKS Cluster and everything is working fine.

            In order to connect to the cluster, I had spin up an EC2 instance (Centos7) and configured the following:

            1. Installed docker, kubeadm, kubelet and kubectl.
            2. Installed and configured AWS Cli V2.

            I had used the AWS_ACCESS_KEY_ID and AWS_SECRET_KEY_ID of user1 to configure AWS Cli from within the EC2 Instance in order to connect to the cluster using kubectl.

            I ran the below commands in order to connect to the cluster as user1:

            1. aws sts get-caller-identity
            2. aws eks update-kubeconfig --name trojanwall --region ap-south-1

            I am able to do each and every operations in the EKS cluster as user1.

            However, I have now create a new user named 'user2' and I have replaced the current AWS_ACCESS_KEY_ID and AWS_SECRET_KEY_ID with that of user2. Did the same steps and when I try to run 'kubectl get pods', I am getting the following error:

            error: You must be logged in to the server (Unauthorized)

            Result after running kubectl describe configmap -n kube-system aws-auth as user1:

            ...

            ANSWER

            Answered 2021-Dec-28 at 08:39

            When you create an EKS cluster, only the user that created a cluster has access to it. In order to allow someone else to access the cluster, you need to add that user to the aws-auth. To do this, in your data section, add

            Source https://stackoverflow.com/questions/70503923

            QUESTION

            AWS SSO authorization for EKS fails to call sts:AssumeRole
            Asked 2021-Dec-07 at 17:12

            I'm migrating to AWS SSO for cli access, which has worked for everything except for kubectl so far. While troubleshooting it I followed a few guides, which means I ended up with some cargo-cult behaviour, and I'm obviously missing something in my mental model.

            ...

            ANSWER

            Answered 2021-Dec-07 at 17:12

            .aws/config had a subtle error - [profile default] isn't meaningful, so the two blocks should have been merged into [default]. Only the non-default profiles should have profile in the name.

            Source https://stackoverflow.com/questions/70250775

            QUESTION

            Can't access EKS cluster from CodeBuild
            Asked 2021-Nov-10 at 21:33

            Already saw this particular post kubectl error You must be logged in to the server (Unauthorized) when accessing EKS cluster and followed some guides from AWS but still no success..

            I'm creating a CI/CD pipeline. But CodeBuild is apparently not authorized to access the EKS cluster. I went to the specific CodeBuild role and added the following policies:

            • AWSCodeCommitFullAccess
            • AmazonEC2ContainerRegistryFullAccess
            • AmazonS3FullAccess
            • CloudWatchLogsFullAccess
            • AWSCodeBuildAdminAccess

            Also created and added the following policy:

            ...

            ANSWER

            Answered 2021-Nov-10 at 21:33

            GOT IT!

            I used the role that CodeBuild created automatically.. But by creating a new role with the mandatory policies and edit this in CodeBuild, those steps above will succeed.. If anyone can further explain this that would be great!

            Source https://stackoverflow.com/questions/69911966

            QUESTION

            How i am able to access EKS Cluster, though my User/Role ARN is not part of aws-auth CM?
            Asked 2021-Oct-25 at 09:18

            New to EKS, Learning. I understand that Access can be provided to IAM Users/Roles by adding to the aws-auth config map, but when the cluster was created the first time, the AWS-auth has only one entry.

            ...

            ANSWER

            Answered 2021-Oct-25 at 09:18

            https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html:

            When you create an Amazon EKS cluster, the IAM entity user or role... is automatically granted system:masters permissions in the cluster's RBAC configuration in the control plane.

            You are already the admin as you are the creator of the cluster.

            Source https://stackoverflow.com/questions/69705381

            QUESTION

            Error when try apply configmap to auth with EKS cluster
            Asked 2021-Oct-14 at 04:53

            i have the follow question. i try connect to eks cluster using a Terraform with Gitlab CI/CD , i receive the error message , but when try it in my compute , this error dont appear, someone had same error ?

            ...

            ANSWER

            Answered 2021-Oct-14 at 04:53

            The error message tells you the authconfig.yaml file can not be converted from YAML to JSON, suggesting it's not a valid yaml

            The cat authconfig.yaml you're showing us includes some < and EOT tags. I would suggest to remove those, before running kubectl create -f

            Your comment suggests you knew this already - then why didn't you ask about terraform, rather than showing us kubectl create failing? From your post, it really sounded like you copy/pasted the output of your job, without even reading it.

            So, obviously, the next step is to terraform output -raw, or -json, there are several mentions in their docs, or knowledge base, a google search would point you to:

            Last: we could ask why? Why would you terraform output > something, when you can have terraform write a file?

            While as a general rule, whenever writing terraform stdout/stderr to files, I strongly suggest going with no-color.

            Source https://stackoverflow.com/questions/69563224

            QUESTION

            Duplicate Classes in AWS API and Appsync Serivces for Android
            Asked 2021-Sep-08 at 16:19

            I am getting a duplicate class error for AWS API and AWS Appsync services in my android app. I have tried downgrading the versions but that causes bugs in other files. I have tried the solutions in this post: Android Studio: Resolving Duplicate Classes. None of these seem to work as they only cause more bugs or no changes.

            Here is the error:

            ...

            ANSWER

            Answered 2021-Sep-08 at 16:19

            if you want to invoke AWS Services from an Android app, then I suggest looking at the new AWS SDK for Kotlin. This is still a new API; however, there is an example that shows you how to invoke AWS Services such as Amazon DynamoDB.

            As far as duplicate libs, I saw that too when i specified the sns dependencies. To eliminate that issue, the Gradle build file was set to:

            Source https://stackoverflow.com/questions/69106023

            QUESTION

            How to allow an assume role connect from EC2 to EKS on AWS?
            Asked 2021-Aug-13 at 05:05

            I created an EC2 instance and an EKS cluster in the same AWS account. In order to use the EKS cluster from EC2, I have to grant necessary permissions to it.

            I added an instance profile role with some EKS operation permissions. Its role arn is arn:aws:iam::11111111:role/ec2-instance-profile-role(A) on dashboard. But in the EC2 instance, it can be found as arn:aws:sts::11111111:assumed-role/ec2-instance-profile-role/i-00000000(B).

            ...

            ANSWER

            Answered 2021-Aug-13 at 05:05
            - name: external-staging
              user:
                exec:
                  apiVersion: client.authentication.k8s.io/v1alpha1
                  args:
                  - exec
                  - test-dev
                  - --
                  - aws
                  - eks
                  - get-token
                  - --cluster-name
                  - eksCluster-1234
                  - --role-arn
                  - arn:aws:iam::3456789002:role/eks-cluster-admin-role-e65f32f
                  command: aws-vault
                  env: null
            

            Source https://stackoverflow.com/questions/68766219

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install aws-auth

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/keikoproj/aws-auth.git

          • CLI

            gh repo clone keikoproj/aws-auth

          • sshUrl

            git@github.com:keikoproj/aws-auth.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cloud Storage Libraries

            minio

            by minio

            rclone

            by rclone

            flysystem

            by thephpleague

            boto

            by boto

            Dropbox-Uploader

            by andreafabrizi

            Try Top Libraries by keikoproj

            keiko

            by keikoprojShell

            kube-forensics

            by keikoprojGo

            instance-manager

            by keikoprojGo

            upgrade-manager

            by keikoprojGo

            minion-manager

            by keikoprojPython