Skip to content

Using aws-cli in Kubernetes pod #12

@idgdmg

Description

@idgdmg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions