[Docker] Image is missing aws command line executable
aquamatthias opened this issue · 3 comments
Motivation
Accessing EKS clusters requires invoking the aws
command. The kubeconfig file generated by AWS looks like this:
- name: arn:aws:eks:eu-central-1:882347060974:cluster/test
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args:
- --region
- eu-central-1
- eks
- get-token
- --cluster-name
- test
command: aws
Desired Behavior
Users can use access k8s eks clusters without additional effort.
Additional Context
https://aws.amazon.com/premiumsupport/knowledge-center/eks-cluster-connection/
Can I work on this @aquamatthias ? I guess it is to get aws binary shipped with resotocore right?
@kushthedude sure go ahead. This ticket is specifically for the docker image. See the definition of the base image here: https://github.com/someengineering/resoto/blob/main/Dockerfile.resotobase#L27-L54
The resoto components share the same base image. resotoworker
would need access to the executable, if it talks to EKS clusters.
The way to implement it is to either use https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
or https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip
as source depending on the build architecture, download to a build directory and run the installer with install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli
. Since all of /usr/local is synced into the final production image the binary will then be available in the worker.