rights reserved. Why Container? - History # Use an official Python runtime as a parent image FROM python:2.7-slim # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app # Install any needed packages specified in requirements.txt RUN pip install --trusted-host pypi.python.org -r requirements.txt # Make port 80 available to the world outside this container EXPOSE 80
rights reserved. Why Container orchestration tool? EC2 Django EC2 Django EC2 Django EC2 Go EC2 Go EC2 Go 2 Apps + 2 AS Groups + 1 ALB Docker 도입 Django Go Application load balancer Nginx 3 Apps + 1 AS Groups Container orchestration tool 을 통해 이걸 해결해보자!
rights reserved. RC / Deployment / Service • ReplicationController (ReplicaSet) • 하나의 Pod 상태를 공유하는 Set • Deployment? • 업데이트! (RC 가 추가됨) • 어떻게 배포할지 설정 가능 How to expose them? Service
rights reserved. Automatic binpacking 2 CPU / 16G 2 CPU / 4G 4 CPU / 8G 2 CPU / 2G 1 CPU / 2G 2 CPU / 16G 1 CPU / 4G 1 CPU / 8G 4 CPU / 8G 2 CPU / 2G 1 CPU / 2G 2 CPU / 16G 1 CPU / 4G 1 CPU / 8G 4 CPU / 8G 2 CPU / 2G 1 CPU / 2G 2 CPU / 16G 1 CPU / 6G 1 CPU / 2G 4 CPU / 8G 2 CPU / 2G 1 CPU / 2G 3 CPU / 4G 1 CPU / 8G
rights reserved. Cluster 구성 • Dashboard 설치 • kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes- dashboard/v1.8.1.yaml • http://api.k8s-test.honeyscreen.com/ui