Created
February 19, 2020 06:48
-
-
Save Jeffwan/7146adf215a3d19262ebcd124e114c81 to your computer and use it in GitHub Desktop.
kaniko.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: docker-config | |
data: | |
config.json: |- | |
{ | |
"credHelpers": { | |
"xxxxx.dkr.ecr.us-west-2.amazonaws.com": "ecr-login" | |
} | |
} | |
~ | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: kaniko | |
annotations: | |
sidecar.istio.io/inject: "false" | |
spec: | |
containers: | |
- name: kaniko | |
image: gcr.io/kaniko-project/executor:v0.14.0 | |
args: ["--dockerfile=Dockerfile", | |
"--context=s3://kubeflow-xxx-us-west-2/fairing_builds/32AC7893", | |
"--destination=xxxxx.dkr.ecr.us-west-2.amazonaws.com/mnist:32AC7893"] | |
volumeMounts: | |
- name: docker-config | |
mountPath: /kaniko/.docker/ | |
# when not using instance role | |
# - name: aws-secret | |
# mountPath: /root/.aws/ | |
env: | |
- name: AWS_REGION | |
value: us-west-2 | |
- name: AWS_ACCESS_KEY_ID | |
valueFrom: | |
secretKeyRef: | |
name: aws-secret | |
key: AWS_ACCESS_KEY_ID | |
- name: AWS_SECRET_ACCESS_KEY | |
valueFrom: | |
secretKeyRef: | |
name: aws-secret | |
key: AWS_SECRET_ACCESS_KEY | |
restartPolicy: Never | |
volumes: | |
# - name: aws-secret | |
# secret: | |
# secretName: aws-secret-raw | |
- name: docker-config | |
configMap: | |
name: docker-config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment