1) 연결
2) docker 설치
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install \apt-transport-https \ca-certificates \curl \gnupg \lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
3) vi 편집기
i insert
esc > :wq
4) Docker Hub
https://hub.docker.com/
1) 관련 사이트
https://kubernetes.io/ko/docs/concepts/overview/components/
https://www.youtube.com/watch?v=6n5obRKsCRQ&list=PLApuRlvrZKohaBHvXAOhUD-RxD0uQ3z0c&ab_channel=TTABAE-LEARN
https://giljae.medium.com/%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C%EC%84%9C%EB%B9%84%EC%8A%A4-%EC%95%84%ED%82%A4%ED%85%8D%EC%B2%98-microservices-architecture-%EC%9D%98-%EC%9E%A5%EC%A0%90%EA%B3%BC-%EB%8B%A8%EC%A0%90-7c45615cfe1a
2) Minikube 실습
curl -LO https://storage.googleapis.com/minikube/releases/v1.22.0/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube --help
curl -LO https://dl.k8s.io/release/v1.22.1/bin/linux/amd64/kubectl
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl --help
minikube start --driver=docker
kubectl get pod -n kube-system
vi pod.yaml
apiVersion: v1 # kubernetes resource 의 API Version
kind: Pod # kubernetes resource name
metadata: # 메타데이터 : name, namespace, labels, annotations 등을 포함
name: counter
spec: # 메인 파트 : resource 의 desired state 를 명시
containers:
- name: count # container 의 이름
image: busybox # container 의 image
args: [/bin/sh, -c, 'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done'] # 해당 image 의 entrypoint 의 args 로 입력하고 싶은 부분
kubectl apply -f pod.yaml
kubectl get pod
kubectl exec -it counter sh
kubectl delete pod counter
kubectl delete pod -f pod.yaml
kubectl get pod