Skip to content

Commit 30bc184

Browse files
authored
Merge branch 'main' into main
2 parents 6ecdb4a + 59a941e commit 30bc184

3 files changed

Lines changed: 25 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Set AWS EKS kubeconfig
2+
command: aws eks update-kubeconfig --region {{region}} --name {{cluster}} --alias {{alias}}
3+
arguments:
4+
- name: region
5+
description: AWS region of the cluster
6+
- name: cluster
7+
description: The EKS cluster name
8+
- name: alias
9+
description: Alias for the cluster
10+
11+
12+
tags: ["kubeconfig"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Opens a Bash shell into Kubernetes pod
2+
command: kubectl -n {{namespace}} exec -it {{pod_name}} -- /bin/sh
3+
arguments:
4+
- name: namespace
5+
default_value: default
6+
description: The namespace of the pod
7+
- name: pod_name
8+
description: The pod into which to exec
9+
10+
tags: ["kubectl"]

specs/kubernetes/run_a_bash_command_within_a_kubernetes_pod.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
name: Run a Bash command within a Kubernetes pod
3-
command: 'kubectl exec -it --namespace=tools {{pod_name}} -- bash -c "{{bash_command}}"'
3+
command: 'kubectl exec -it --namespace={{namespace}} {{pod_name}} -- bash -c "{{bash_command}}"'
44
tags:
55
- kubernetes
66
description: 'Runs a Bash command in a Kubernetes pod. The double dash symbol "--" is used to separate the command you want to run inside the container from the kubectl arguments.'
77
arguments:
8+
- name: namespace
9+
description: The namespace in which the pod is located
810
- name: pod_name
911
description: The name of the pod
1012
default_value: ~

0 commit comments

Comments
 (0)