Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make setup-aws-creds fails with missing kubectl #26

Closed
Schnitzel opened this issue Jan 9, 2025 · 3 comments · Fixed by #50
Closed

make setup-aws-creds fails with missing kubectl #26

Schnitzel opened this issue Jan 9, 2025 · 3 comments · Fixed by #50
Assignees

Comments

@Schnitzel
Copy link
Collaborator

make setup-aws-creds does not use the on the fly installed kubectl, so if you don't have kubectl it fails:

$ make setup-aws-creds
make[1]: Entering directory '/home/ec2-user/k0rdent-demos'
envsubst < setup/aws-credentials.yaml | kubectl apply -f -
/bin/bash: line 1: kubectl: command not found
@Algeran Algeran self-assigned this Jan 9, 2025
@soerenschneider
Copy link
Collaborator

I only changed two lines of code in this PR to use a dockerized kubectl. No need to check versions, download, check signatures, etc.

So far only tested with a couple of (random) Makefile targets, also has room for improvements, for instance

  • not use the host network, instead use the "kind" network
  • maybe replace the image

I'd like to hear opinions first before going down that road. @Schnitzel @Algeran

@Algeran
Copy link
Collaborator

Algeran commented Jan 10, 2025

I would prefer not to use containerized kubectl due to we use it a lot and start container each time to execute the kubectl command will increase the execution time of all demos significantly (take into account that not everyone run it on Mac M2 laptops). Additionally, for kubectl we use:

  • templates, manifests. Here we need to make sure that all required directories attached via volumes
  • in combination with envsubst, yq calls - here we need to make sure that these binaries exist in kubectl container. If envsubst is the built-in tool, the yq is not and more likely you will come with the solution where you will install yq each time during the kubectl execution or will build some custom container with kubectl and yq

It's fine to use containers for some commands instead of downloading binaries if we use them 1-2 times during the whole demo (like openssl).

For the particular issue we just forgot to replace kubectl with $(KUBECTL) in couple places.

@Algeran
Copy link
Collaborator

Algeran commented Jan 10, 2025

I fixed and closed this issue to unblock demos. To continue usage of containerized binaries discussion, please create the separate issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants