Code Monkey home page Code Monkey logo

xip-cli's People

Contributors

dependabot[bot] avatar rbaarsma avatar xip-niekneuij avatar yourilefers avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

rbaarsma

xip-cli's Issues

Issues when setting up namespaces

So for example in Examenbundel we have the following in the docs:

### Setup contexts

Use the following set of commands to setup kubectl for Examenbundel:

x-ip aws kubectl tm-stage-EksCluster arn:aws:iam::089261200724:role/tm-eks-examenbundel-test-AdminGroupRole -n examenbundel-test -p examenbundel-test -a examenbundel-test
etc.

I have 2 issues (for now):

AWS region env

I need to explicitly export an AWS_REGION var and set it to eu-west-1. I do have my AWS profiles setup including the region in ~/.aws/config and ~/.aws/credentials:

For example, my config file contains:

[profile examenbundel-test]
region         = eu-west-1
...snip
sso_region     = eu-west-1

[profile examenbundel-prod]
region         = eu-west-1
...snip
sso_region     = eu-west-1

Failing to register this env var generates:

x-ip aws kubectl tm-stage-EksCluster arn:aws:iam::089261200724:role/tm-eks-examenbundel-test-AdminGroupRole -n examenbundel-test -p examenbundel-test -a examenbundel-test

panic: MissingRegion: could not find region configuration

goroutine 1 [running]:
xip/aws/commands.(*AwsCommands).KubectlRun(0x140003a4150, 0x0?, {0x140003bf000?, 0x0?, 0x0?})
        xip/aws/commands/kubectl.go:48 +0x1d8
github.com/spf13/cobra.(*Command).execute(0x14000462000, {0x140003bef80, 0x8, 0x8})
        github.com/spf13/[email protected]/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x1400039c600)
        github.com/spf13/[email protected]/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:968
main.main()

Further error

After setting the region:

x-ip aws kubectl tm-stage-EksCluster arn:aws:iam::089261200724:role/tm-eks-examenbundel-test-AdminGroupRole -n examenbundel-test -p examenbundel-test -a examenbundel-test

panic: NoCredentialProviders: no valid providers in chain. Deprecated.
        For verbose messaging see aws.Config.CredentialsChainVerboseErrors

goroutine 1 [running]:
xip/aws/commands.(*AwsCommands).KubectlRun(0x1400011c210, 0x0?, {0x1400017dd00?, 0x0?, 0x0?})
        xip/aws/commands/kubectl.go:48 +0x1d8
github.com/spf13/cobra.(*Command).execute(0x14000400600, {0x1400017dc80, 0x8, 0x8})
        github.com/spf13/[email protected]/command.go:920 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x140001a6c00)
        github.com/spf13/[email protected]/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:968
main.main()
        xip/main.go:22 +0xe8

I think I have to run this command because it gives me a no context exists error when switching contexts:

kubectl config use-context examenbundel-test                                                                                                                                                <aws:examenbundel-test>

error: no context exists with the name: "examenbundel-test"

Any ideas?

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.