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

Is kubectl binary required when testing from Golang container ? #1320

Open
Constantin07 opened this issue Jun 28, 2023 · 2 comments
Open

Is kubectl binary required when testing from Golang container ? #1320

Constantin07 opened this issue Jun 28, 2023 · 2 comments
Labels

Comments

@Constantin07
Copy link

This is more an question to understand existing approach(es) as I couldn't find explicit answer documented.

I'm trying to run the tests in Golang container but when executing the KubectlApply it complains about missing kubectl.

Is there a way to deploy test K8s infra without the need of kubectl (using k8s client) ?

I'm not building a dedicated docker image with copied tests inside, just running the Golang container and mounting current folder with test(s).

PS: I would like to avoid creating a custom Golang image with just kubectl inside.

@denis256
Copy link
Member

Hi,
kubectl is required to be installed in the environment

References:
https://github.com/gruntwork-io/terratest/blob/master/modules/k8s/kubectl.go#L40

@Constantin07
Copy link
Author

Thanks @denis256 for confirmation.

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

No branches or pull requests

2 participants