・ Freshly made amazon linux2 (centos)
First, build docker on amazon linux2 referring to here. https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/developerguide/docker-basics.html
Update packages installed on your instance
sudo yum update -y
yum install git-all
pip3 install boto3
yum -y install python3
pip3 install awscli --upgrade
sudo pip install --upgrade awscli --ignore-installed six
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Install the latest Docker Community Edition package.
#amazon linux2
sudo amazon-linux-extras install docker
#amazon linux
sudo yum install docker
#Start the Docker service.
sudo service docker start
#ec2-You can add user to the docker group to run Docker commands without using sudo.
sudo usermod -a -G docker ec2-user
#Log out and log back in to get new docker group access.
#This can be achieved by closing the current SSH terminal window and reconnecting to the instance in a new window.
#The new SSH session has the appropriate docker group privileges.
#ec2-Make sure that user can execute Docker commands without using sudo.
#Check if the docker environment is created
docker info
docker --version
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.9/2020-08-04/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin
mkdir -p $HOME/bin && mv ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
kubectl version --short --client
aws eks describe-cluster --name eks-from-eksctl --region us-west-2
How to build the head family See below https://kind.sigs.k8s.io/docs/user/quick-start/
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind
Recommended Posts