-
Notifications
You must be signed in to change notification settings - Fork 45
Description
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