Skip to content

Instantly share code, notes, and snippets.

@lpsm-dev
Last active October 6, 2022 20:04
Show Gist options
  • Select an option

  • Save lpsm-dev/6e158e275ae1c95cde2975684a6be4d0 to your computer and use it in GitHub Desktop.

Select an option

Save lpsm-dev/6e158e275ae1c95cde2975684a6be4d0 to your computer and use it in GitHub Desktop.
[Kubernetes] - Deploy AWS CLI pod to test some commands
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: aws-test
namespace: project-develop
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::<aws-account-id>:role/<aws-role>
imagePullSecrets:
- name: image-pull-secret
---
apiVersion: v1
kind: Pod
metadata:
name: aws-cli
namespace: project-develop
spec:
serviceAccountName: aws-test
containers:
- name: aws-cli
image: amazon/aws-cli
command: [ "/bin/bash", "-c", "--" ]
args: [ "while true; do sleep 30; done;" ]
tolerations:
- operator: Exists
effect: NoSchedule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment