본문 바로가기

Compute/EC2

Amazon EC2 Linux 2 minikube 설치

[Docker Install]

 

의 Docker 기본 사항Amazon ECS - Amazon Elastic Container Service

경우에 따라서는 ec2-user가 도커 데몬에 액세스할 수 있는 권한을 제공하기 위해 인스턴스를 재부팅해야 할 수도 있습니다. 다음 오류가 표시될 경우 인스턴스를 재부팅해 보십시오. Cannot connect t

docs.aws.amazon.com

 

[kubectl Install]

 

Install and Set Up kubectl on Linux

Before you begin You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. Using the latest version of kubectl helps avoid unforeseen issues. Install

kubernetes.io

 

 

[minikube Install]

 

minikube start

minikube is local Kubernetes

minikube.sigs.k8s.io

 

 

[root@ip-172-31-3-214 ~]# minikube start --driver=none
* minikube v1.18.1 on Amazon 2 (xen/amd64)
* Using the none driver based on user configuration

X Exiting due to GUEST_MISSING_CONNTRACK: Sorry, Kubernetes 1.20.2 requires conntrack to be installed in root's path

 

[Conntrack 설치 후 재시작]

[root@ip-172-31-3-214 ~]# yum install conntrack
...
[root@ip-172-31-3-214 ~]# minikube start --driver=none
* minikube v1.18.1 on Amazon 2 (xen/amd64)
* Using the none driver based on user configuration
* Starting control plane node minikube in cluster minikube
* Running on localhost (CPUs=2, Memory=3942MB, Disk=51187MB) ...
* OS release is Amazon Linux 2
    > kubectl.sha256: 64 B / 64 B [--------------------------] 100.00% ? p/s 0s                                                                                                                                                            \
    > kubectl: 38.37 MiB / 38.37 MiB [---------------] 100.00% 27.60 MiB p/s 2s                                                                                                                                                            /
    > kubelet: 108.73 MiB / 108.73 MiB [-------------] 100.00% 34.07 MiB p/s 3s
  - Generating certificates and keys ...
  - Booting up control plane ...
  - Configuring RBAC rules ...
* Configuring local host environment ...
*
! The 'none' driver is designed for experts who need to integrate with an existing VM
* Most users should use the newer 'docker' driver instead, which does not require root!
* For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/none/
*
! kubectl and minikube configuration will be stored in /root
! To use kubectl or minikube commands as your own user, you may need to relocate them. For example, to overwrite your own settings, run:
*
  - sudo mv /root/.kube /root/.minikube $HOME
  - sudo chown -R $USER $HOME/.kube $HOME/.minikube
*
* This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true
* Verifying Kubernetes components...
  - Using image gcr.io/k8s-minikube/storage-provisioner:v4
* Enabled addons: default-storageclass, storage-provisioner
* kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

 

Amazon Linux 2 minikube status