Skip to content

Install tools

Install utilities

sudo yum update -y
sudo yum install -y unzip jq bash-completion
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y unzip jq bash-completion
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Note

You should run this command as administrator.

Install kubectl

Kubernetes 1.27
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.27.1/2023-04-19/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.26
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.26.4/2023-05-11/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.25
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.25.9/2023-05-11/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.24
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.24.13/2023-05-11/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.23
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.23.17/2023-05-11/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.27
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.27.1/2023-04-19/bin/linux/arm64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.26
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.26.4/2023-05-11/bin/linux/arm64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.25
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.25.9/2023-05-11/bin/linux/arm64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.24
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.24.13/2023-05-11/bin/linux/arm64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
Kubernetes 1.23
curl -LO https://s3.us-west-2.amazonaws.com/amazon-eks/1.23.17/2023-05-11/bin/linux/arm64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/bin/kubectl
kubectl version --short --client
sudo kubectl version --short --client
rm kubectl
choco install kubernetes-cli
Kubernetes 1.27
curl.exe -LO "https://s3.us-west-2.amazonaws.com/amazon-eks/1.27.1/2023-04-19/bin/windows/amd64/kubectl.exe"
Kubernetes 1.26
curl.exe -LO "https://s3.us-west-2.amazonaws.com/amazon-eks/1.26.4/2023-05-11/bin/windows/amd64/kubectl.exe"
Kubernetes 1.25
curl.exe -LO "https://s3.us-west-2.amazonaws.com/amazon-eks/1.25.9/2023-05-11/bin/windows/amd64/kubectl.exe"
Kubernetes 1.24
curl.exe -LO "https://s3.us-west-2.amazonaws.com/amazon-eks/1.24.13/2023-05-11/bin/windows/amd64/kubectl.exe"
Kubernetes 1.23
curl.exe -LO "https://s3.us-west-2.amazonaws.com/amazon-eks/1.23.17/2023-05-11/bin/windows/amd64/kubectl.exe"
Enable Shell Autocomplete
kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null
sudo chmod a+r /etc/bash_completion.d/kubectl

AWS Documentation

Install eksctl

curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp
sudo cp /tmp/eksctl /usr/local/bin
sudo cp /tmp/eksctl /usr/bin
eksctl version
sudo eksctl version
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_arm64.tar.gz" | tar xz -C /tmp
sudo cp /tmp/eksctl /usr/local/bin
sudo cp /tmp/eksctl /usr/bin
eksctl version
sudo eksctl version
choco install eksctl
curl.exe -LO https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Windows_amd64.zip
Expand-Archive ./eksctl_Windows_amd64.zip -DestinationPath ./
rm eksctl_Windows_amd64.zip
Enable Shell Autocomplete
eksctl completion bash | sudo tee /etc/bash_completion.d/eksctl > /dev/null
sudo chmod a+r /etc/bash_completion.d/eksctl
Minimum IAM policies for eksctl
AmazonEC2FullAccess (AWS Managed Policy)
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "ec2:*",
            "Effect": "Allow",
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "elasticloadbalancing:*",
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "cloudwatch:*",
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "autoscaling:*",
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "iam:CreateServiceLinkedRole",
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:AWSServiceName": [
                        "autoscaling.amazonaws.com",
                        "ec2scheduled.amazonaws.com",
                        "elasticloadbalancing.amazonaws.com",
                        "spot.amazonaws.com",
                        "spotfleet.amazonaws.com",
                        "transitgateway.amazonaws.com"
                    ]
                }
            }
        }
    ]
}
AWSCloudFormationFullAccess (AWS Managed Policy)
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "cloudformation:*"
            ],
            "Resource": "*"
        }
    ]
}
EksAllAccess
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "eks:*",
            "Resource": "*"
        },
        {
            "Action": [
                "ssm:GetParameter",
                "ssm:GetParameters"
            ],
            "Resource": [
                "arn:aws:ssm:*:<account_id>:parameter/aws/*",
                "arn:aws:ssm:*::parameter/aws/*"
            ],
            "Effect": "Allow"
        },
        {
            "Action": [
            "kms:CreateGrant",
            "kms:DescribeKey"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
            "logs:PutRetentionPolicy"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }        
    ]
}
IamLimitedAccess
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "iam:CreateInstanceProfile",
                "iam:DeleteInstanceProfile",
                "iam:GetInstanceProfile",
                "iam:RemoveRoleFromInstanceProfile",
                "iam:GetRole",
                "iam:CreateRole",
                "iam:DeleteRole",
                "iam:AttachRolePolicy",
                "iam:PutRolePolicy",
                "iam:ListInstanceProfiles",
                "iam:AddRoleToInstanceProfile",
                "iam:ListInstanceProfilesForRole",
                "iam:PassRole",
                "iam:DetachRolePolicy",
                "iam:DeleteRolePolicy",
                "iam:GetRolePolicy",
                "iam:GetOpenIDConnectProvider",
                "iam:CreateOpenIDConnectProvider",
                "iam:DeleteOpenIDConnectProvider",
                "iam:TagOpenIDConnectProvider",
                "iam:ListAttachedRolePolicies",
                "iam:TagRole",
                "iam:GetPolicy",
                "iam:CreatePolicy",
                "iam:DeletePolicy",
                "iam:ListPolicyVersions"
            ],
            "Resource": [
                "arn:aws:iam::<account_id>:instance-profile/eksctl-*",
                "arn:aws:iam::<account_id>:role/eksctl-*",
                "arn:aws:iam::<account_id>:policy/eksctl-*",
                "arn:aws:iam::<account_id>:oidc-provider/*",
                "arn:aws:iam::<account_id>:role/aws-service-role/eks-nodegroup.amazonaws.com/AWSServiceRoleForAmazonEKSNodegroup",
                "arn:aws:iam::<account_id>:role/eksctl-managed-*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:GetRole"
            ],
            "Resource": [
                "arn:aws:iam::<account_id>:role/*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:CreateServiceLinkedRole"
            ],
            "Resource": "*",
            "Condition": {
                "StringEquals": {
                    "iam:AWSServiceName": [
                        "eks.amazonaws.com",
                        "eks-nodegroup.amazonaws.com",
                        "eks-fargate.amazonaws.com"
                    ]
                }
            }
        }
    ]
}

eksctl Documentation

AWS Documentation

Install helm

curl -LO https://get.helm.sh/helm-v3.12.2-linux-amd64.tar.gz
tar -xvzf helm-v3.12.2-linux-amd64.tar.gz
sudo install -o root -g root -m 0755 linux-amd64/helm /usr/local/bin/helm
sudo install -o root -g root -m 0755 linux-amd64/helm /usr/bin/helm
helm version
sudo helm version
rm -rf linux-amd64
rm -rf helm-v3.12.2-linux-amd64.tar.gz
curl -LO https://get.helm.sh/helm-v3.12.2-linux-arm64.tar.gz
tar -xvzf helm-v3.12.2-linux-arm64.tar.gz
sudo install -o root -g root -m 0755 linux-arm64/helm /usr/local/bin/helm
sudo install -o root -g root -m 0755 linux-arm64/helm /usr/bin/helm
helm version
sudo helm version
rm -rf linux-arm64
rm -rf helm-v3.12.2-linux-arm64.tar.gz
choco install kubernetes-helm
curl.exe -LO https://get.helm.sh/helm-v3.12.2-windows-amd64.zip
Expand-Archive ./helm-v3.12.2-windows-amd64.zip -DestinationPath ./
cp windows-amd64/helm.exe ./helm.exe
rm helm-v3.12.2-windows-amd64.zip
rm -r windows-amd64
Enable Shell Autocomplete
helm completion bash | sudo tee /etc/bash_completion.d/helm > /dev/null
sudo chmod a+r /etc/bash_completion.d/helm

AWS Documentation

Install docker

sudo yum install -y docker
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -a -G docker ec2-user
echo "export DOCKER_BUILDKIT=1" | sudo tee -a /etc/bashrc
sudo apt-get install -y docker docker.io
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -a -G docker ubuntu
echo "export DOCKER_BUILDKIT=1" | sudo tee -a /etc/bashrc
Enable Shell Autocomplete
sudo curl -sL -o /etc/bash_completion.d/docker https://raw.githubusercontent.com/docker/cli/master/contrib/completion/bash/docker
sudo chmod a+r /etc/bash_completion.d/docker

Install docker buildx

export DOCKER_BUILDKIT=1
wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64
mkdir -p ~/.docker/cli-plugins
mv buildx-v0.11.2.linux-amd64 ~/.docker/cli-plugins/docker-buildx
chmod a+x ~/.docker/cli-plugins/docker-buildx
docker run --privileged --rm ghcr.io/marcus16-kang/binfmt:amd64 --install all
export DOCKER_BUILDKIT=1
wget https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-arm64
mkdir -p ~/.docker/cli-plugins
mv buildx-v0.11.2.linux-arm64 ~/.docker/cli-plugins/docker-buildx
chmod a+x ~/.docker/cli-plugins/docker-buildx
docker run --privileged --rm ghcr.io/marcus16-kang/binfmt:arm64 --install all
Note

You can build and push using this command:

docker buildx build --platform linux/amd64,linux/arm64 --tag <IMAGE_TAG> --push .

Buildx Repository

Install k9s

YOU SHOULD INSTALL awscliv2 IN HERE

curl --silent --location "https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_amd64.tar.gz" | tar xz -C /tmp
sudo cp /tmp/k9s /usr/local/bin
sudo cp /tmp/k9s /usr/bin
k9s version
sudo k9s version
curl --silent --location "https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_arm64.tar.gz" | tar xz -C /tmp
sudo cp /tmp/k9s /usr/local/bin
sudo cp /tmp/k9s /usr/bin
k9s version
sudo k9s version
choco install k9s
curl.exe -LO https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Windows_amd64.zip
Expand-Archive ./k9s_Windows_amd64.zip -DestinationPath ./
rm k9s_Windows_amd64.zip
rm LICENSE
rm README.md
./k9s.exe version
Enable Shell Autocomplete
k9s completion bash | sudo tee /etc/bash_completion.d/k9s > /dev/null
sudo chmod a+r /etc/bash_completion.d/k9s

K9s Documentation

Install kubectx

wget https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubectx
sudo install -o root -g root -m 0755 kubectx /usr/local/bin/kubectx
sudo install -o root -g root -m 0755 kubectx /usr/bin/kubectx
kubectx -h
rm ./kubectx
wget https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubectx
sudo install -o root -g root -m 0755 kubectx /usr/local/bin/kubectx
sudo install -o root -g root -m 0755 kubectx /usr/bin/kubectx
kubectx -h
rm ./kubectx
choco install kubectx
curl.exe -LO https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubectx_v0.9.5_windows_x86_64.zip
Expand-Archive ./kubectx_v0.9.5_windows_x86_64.zip -DestinationPath ./
rm kubectx_v0.9.5_windows_x86_64.zip
rm LICENSE
Enable Shell Autocomplete
sudo curl -sL -o /etc/bash_completion.d/kubectx https://raw.githubusercontent.com/ahmetb/kubectx/master/completion/kubectx.bash
sudo chmod a+r /etc/bash_completion.d/kubectx

kubectx Documentations

Install kubens

wget https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubens
sudo install -o root -g root -m 0755 kubens /usr/local/bin/kubens
sudo install -o root -g root -m 0755 kubens /usr/bin/kubens
kubens -h
rm ./kubens
wget https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubens
sudo install -o root -g root -m 0755 kubens /usr/local/bin/kubens
sudo install -o root -g root -m 0755 kubens /usr/bin/kubens
kubens -h
rm ./kubens
choco install kubens
curl.exe -LO https://github.com/ahmetb/kubectx/releases/download/v0.9.5/kubens_v0.9.5_windows_x86_64.zip
Expand-Archive ./kubens_v0.9.5_windows_x86_64.zip -DestinationPath ./
rm kubens_v0.9.5_windows_x86_64.zip
rm LICENSE
Enable Shell Autocomplete
sudo curl -sL -o /etc/bash_completion.d/kubens https://raw.githubusercontent.com/ahmetb/kubectx/master/completion/kubens.bash
sudo chmod a+r /etc/bash_completion.d/kubens

kubens Documentations

Install argocd

curl -LO https://github.com/argoproj/argo-cd/releases/download/v2.8.0/argocd-linux-amd64
sudo install -o root -g root -m 0755 argocd-linux-amd64 /usr/local/bin/argocd
sudo install -o root -g root -m 0755 argocd-linux-amd64 /usr/bin/argocd
rm argocd-linux-amd64
argocd -h
curl -LO https://github.com/argoproj/argo-cd/releases/download/v2.8.0/argocd-linux-arm64
sudo install -o root -g root -m 0755 argocd-linux-arm64 /usr/local/bin/argocd
sudo install -o root -g root -m 0755 argocd-linux-arm64 /usr/bin/argocd
rm argocd-linux-arm64
argocd -h
choco install argocd-cli
curl.exe -L https://github.com/argoproj/argo-cd/releases/download/v2.8.0/argocd-windows-amd64.exe -o argocd.exe
Enable Shell Autocomplete
argocd completion bash | sudo tee /etc/bash_completion.d/argocd > /dev/null
sudo chmod a+r /etc/bash_completion.d/argocd