Procedure for building a kube environment on amazon linux2 (aws) ~ (with bonus)

Prerequisites

・ Freshly made amazon linux2 (centos)

1. Until docker environment construction on ec2

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

Until kubernetes environment construction

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

kind cluster construction

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

Procedure for building a kube environment on amazon linux2 (aws) ~ (with bonus)
Building a Python3 environment with Amazon Linux2
Procedure for building a CDK environment on Windows (Python)
[Linux] Build a Docker environment with Amazon Linux 2
Build a WardPress environment on AWS with pulumi
Create an environment for MkDocs on Amazon Linux (attempted)
Procedure for creating a Line Bot on AWS Lambda
How to build a Python environment on amazon linux 2
Procedure when building Ubuntu as a virtual environment with Vagrant + Virtualbox for LPIC Level 1.
Install LAMP on Amazon Linux 2 and build a WordPress environment.
Building a kubernetes environment with ansible 2
Building a Python environment on Mac
Prepare pipenv environment with amazon Linux 2
Building a Python environment on Ubuntu
Building a virtual environment with Python 3
Create a Linux environment on Windows 10
Building a kubernetes environment with ansible 1
Introduce Python 3.5.2 environment on Amazon Linux
Build a Selenium environment on Amazon Linux 2 in the shortest time
Building a Windows 7 environment for getting started with machine learning with Python
Create a Docker container image with JRE8 / JDK8 on Amazon Linux
Building a development environment with Maven on Google App Engine [Java]
Building an environment to run ChainerMN on a GPU instance on AWS
A modern environment building procedure for those who want to get started with Python right away
[Pyenv] Building a python environment with ubuntu 16.04
Building a LaTeX environment on Chrome OS
Building a Python 3.6 environment with Windows + PowerShell
Build an LNPP environment on Amazon Linux 2
[Mac] Building a virtual environment for Python
Deployment procedure on AWS ① Network environment settings
[Linux] Build a jenkins environment with Docker
Building a conda environment for ROS users
Building a Python development environment for AI development
Building an environment for "Tello_Video" on Raspbian
Building an environment for "Tello_Video" on Windows
Run a batch of Python 2.7 with nohup on Amazon Linux AMI on EC2
A note for me that I can't add an external repository with rpm --import on Amazon Linux2
[Linux] Review of commands for deploying on AWS
Try Tensorflow with a GPU instance on AWS
Building a python environment with virtualenv and direnv
Build a python environment with ansible on centos6
Building an Anaconda environment for Python with pyenv
Building a Python environment with WLS2 + Anaconda + PyCharm
A story about building an IDE environment with WinPython on an old Windows OS.
Procedure for creating a LineBot made with Python
Creating an environment for OSS-DB Silver # 1_Create a Linux environment (CentOS7 virtual environment) with VirtualBox/Vagrant
Various commands for building an environment with Apache
Building an environment for matplotlib + cartopy on Mac
Start a process with a scheduling policy on Linux
Commands for creating a python3 environment with virtualenv
Build a Kubernetes environment for development on Ubuntu
Procedure for creating a Python quarantine environment (venv environment)
Try building an environment for MayaPython with VisualStudioCode
Building a Python environment on a Sakura VPS server
Install PHP 7 series on Amazon Linux 2 with Amazon Linux Extras
Build a TensorFlow development environment on Amazon EC2 with command copy and paste
Build a mruby development environment for ESP32 (Linux)
How to prepare an environment with different python version and package for each project with pyenv-virtualenv on Amazon Linux
[Building a CI environment in 2 hours] Procedure for building a Python Web server with CircleCI and passing an HTTP communication test
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
Building a Python environment for pyenv, pyenv-virtualenv, Anaconda (Miniconda)