File tree Expand file tree Collapse file tree 3 files changed +53
-10
lines changed
Expand file tree Collapse file tree 3 files changed +53
-10
lines changed Original file line number Diff line number Diff line change 2626 type : boolean
2727
2828env :
29- AWS_DEFAULT_REGION : us-west-2
29+ AWS_DEFAULT_REGION : us-east-1
3030
3131jobs :
3232 cleanup-aws-resources :
@@ -43,13 +43,19 @@ jobs:
4343 with :
4444 aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
4545 aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
46- aws-region : us-west-2
46+ aws-region : us-east-1
4747
4848 - name : Install prerequisites
4949 run : |
5050 # Install required tools
5151 sudo apt-get update
52- sudo apt-get install -y jq awscli
52+ sudo apt-get install -y jq curl unzip
53+
54+ # Install AWS CLI v2
55+ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
56+ unzip awscliv2.zip
57+ sudo ./aws/install
58+ aws --version
5359
5460 # Install eksctl
5561 curl --silent --location "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
6066 curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
6167 chmod +x kubectl
6268 sudo mv kubectl /usr/local/bin/
69+ kubectl version --client
6370
6471 - name : Set cleanup parameters
6572 id : params
Original file line number Diff line number Diff line change 6060 required : false
6161 default : ' '
6262 type : string
63- azure_subscription :
64- description : ' Azure Subscription ID (Azure only)'
65- required : false
66- default : ' '
67- type : string
63+ # azure_subscription:
64+ # description: 'Azure Subscription ID (Azure only)'
65+ # required: false
66+ # default: ''
67+ # type: string
6868
6969env :
7070 AWS_DEFAULT_REGION : us-east-1
@@ -233,7 +233,7 @@ jobs:
233233
234234 case "${{ inputs.cloud || 'aws' }}" in
235235 aws)
236- REGION="${{ inputs.region || 'us-west-2 ' }}"
236+ REGION="${{ inputs.region || 'us-east-1 ' }}"
237237 echo "# Update kubeconfig for AWS EKS cluster:"
238238 if [[ -n "${{ inputs.aws_profile }}" ]]; then
239239 echo "aws eks update-kubeconfig --region $REGION --name $CLUSTER_NAME --profile ${{ inputs.aws_profile }}"
@@ -310,7 +310,7 @@ jobs:
310310
311311 case "${{ inputs.cloud || 'aws' }}" in
312312 aws)
313- REGION="${{ inputs.region || 'us-west-2 ' }}"
313+ REGION="${{ inputs.region || 'us-east-1 ' }}"
314314 echo '```bash'
315315 if [[ -n "${{ inputs.aws_profile }}" ]]; then
316316 echo "aws eks update-kubeconfig --region $REGION --name $CLUSTER_NAME --profile ${{ inputs.aws_profile }}"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Install prerequisites for Kubernetes cluster management
4+ # This script installs required tools for AWS, GCP, and Azure
5+
6+ set -e
7+
8+ echo " Installing prerequisites..."
9+
10+ # Update package lists
11+ sudo apt-get update
12+
13+ # Install basic tools
14+ echo " Installing basic tools..."
15+ sudo apt-get install -y jq curl unzip
16+
17+ # Install AWS CLI v2
18+ echo " Installing AWS CLI v2..."
19+ if ! command -v aws & > /dev/null; then
20+ curl " https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o " awscliv2.zip"
21+ unzip awscliv2.zip
22+ sudo ./aws/install
23+ rm -rf awscliv2.zip aws/
24+ fi
25+ aws --version
26+
27+ # Install kubectl
28+ echo " Installing kubectl..."
29+ if ! command -v kubectl & > /dev/null; then
30+ curl -LO " https://dl.k8s.io/release/$( curl -L -s https://dl.k8s.io/release/stable.txt) /bin/linux/amd64/kubectl"
31+ chmod +x kubectl
32+ sudo mv kubectl /usr/local/bin/
33+ fi
34+ kubectl version --client
35+
36+ echo " Prerequisites installation completed!"
You can’t perform that action at this time.
0 commit comments