1. 在centos机器安装eksctl

      1. curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
      2. sudo mv /tmp/eksctl /usr/bin
      3. eksctl version
      4. eksctl create cluster --name shayne-eks --zones us-east-1a,us-east-1b --fargate --tags owner=G2-Shayne-Chen
    2. 遇到的问题

    Unable to use kubectl with the EKS cluster…aws: error: argument operation: Invalid choice

    解决:

    1. # Update AWS CLI
    2. sudo yum remove -y aws-cli
    3. pip3 install --user awscli
    4. sudo ln -s $HOME/.local/bin/aws /usr/bin/aws
    5. # Run The kubectl Configuration Commands
    6. aws eks get-token --cluster-name your-cluster-name
    7. aws eks update-kubeconfig --name your-cluster-name