Custodian (EKS) AWS CLI 2
?
S
BashCLI commands for managing Custodian policies on Amazon EKS clusters using AWS CLI version 2.
1FROM amazon/aws-cli
2
3ENV ENVIRONMENT=production
4ENV KUBECONFIG=$KUBECONFIG:/~/.kube/rogue
5ENV AWS_ACCESS_KEY_ID="xx"
6ENV AWS_SECRET_ACCESS_KEY="yyy"
7ENV AWS_DEFAULT_REGION="eu-west-2"
8
9RUN \
10 echo "Installing kubectl..." && \
11 export KUBECONFIG=$KUBECONFIG:/~/.kube/rogue \
12 && \
13 set -x && \
14 curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.14.6/bin/linux/amd64/kubectl \
15 && \
16 echo "Applying execute permissions for kubectl..." \
17 && \
18 ls -lah \
19 && \
20 chmod +x ./kubectl \
21 && \
22 cp ./kubectl /usr/local/bin/kubectl \
23 && \
24 echo 'Checking version' \
25 && \
26 kubectl version --short --client
27
28RUN \
29 echo "Installing AWS IAM Authenticator" \
30 && \
31 aws eks --region eu-west-2 update-kubeconfig --name rogue-eks \
32 && \
33 kubectl get pods
34
35# COPY ./deploy.sh /bin/
36# RUN cd var
37
38ENTRYPOINT ["/bin/sh"]
39Created on 5/1/2020