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

Using aws-cli in Kubernetes pod #12

Open
idgdmg opened this issue Nov 27, 2019 · 0 comments
Open

Using aws-cli in Kubernetes pod #12

idgdmg opened this issue Nov 27, 2019 · 0 comments

Comments

@idgdmg
Copy link

idgdmg commented Nov 27, 2019

Trying to use the aws-cli container in Kubernets pod - I have the below config, but it does NOT work

Essentially I am trying to pass the environment credentials from Kubernetes secrets and run the aws cli commands from within the Kubernetes pod

apiVersion: batch/v1beta1 kind: CronJob metadata: name: "pcwlog" namespace: owaspzapscanner spec: schedule: "*/5 * * * *" concurrencyPolicy: Forbid jobTemplate: spec: template: spec: volumes: - name: owasp-zap-volume persistentVolumeClaim: claimName: efs containers: - name: aws-cli image: mikesir87/aws-cli:latest env: - name: AWS_ACCESS_KEY_ID valueFrom: secretKeyRef: name: aws-fastly-secret key: aws_access_key_id - name: AWS_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: aws-fastly-secret key: aws_secret_access_key command: ["/bin/sh", "-c"] args: ["aws s3 ls"] imagePullPolicy: Always name: "pcwlog" resources: {} volumeMounts: - name: owasp-zap-volume mountPath: /zap/wrk restartPolicy: Never securityContext: fsGroup: 1000

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

No branches or pull requests

1 participant