6. Motivation
Provisioner의 한계
• 설치를 위한 provisioner dependency가 추가됨
• 설치 과정을 모두 스크립트화 하여야 한다. 별도의 관리가 필요함
• 설치 외 Scale, Upgrade, Uninstall에 대한 스크립트를 별도 구성해야 함
• 서버 상태 모니터링 하기 어려움
• Cloud Instance, Baremetal 모두 Host 설치 단계가 별도로 필요함
7. 2017. 4. 11., DK Lee
Network Technology R&D Center
Corporate R&D Center
SK Telecom
7 SK Telecom Proprietary 2019
Motivation
Cluster API
10. Cluster API: Introduction
• K8S cluster lifecycle SIG의 subproject로 2017년에 시작
• Cluster API Project Goals
• 선언적 API를 사용해 K8S Component를 Create부터 Scale, Upgrade,
Destroy 까지 전반적인 Lifecycle 관리한다.
• On-Prem, Public Cloud 모두 지원한다.
• Default Implementation을 제공하고 이를 치환 가능하게 한다
• 회복 가능한 Infrastructure를 만든다.
11. Cluster API: Introduction
• Cluster API Project Non-goals
• K8S Core API로 추가
• K8S Cluster와 관련 없는 Component 관리
• GKE, AKS, EKS 등의 기존 lifecycle 관리 툴에 API 사용을 강요
• 멀티 인프라 프로바이더로 단일 cluster 구성
• 생성/업그레이드 작업 외에 Machine을 구성
12. Cluster API: Components
1. Infrastructure Provider
AWS, Azure, Google 등의 퍼블릭 클라우드와 Vmware, metal3.io, OpenStack 등의
VM provider에서 제공해주는 리소스 관리 소스
2. Bootstrap Provider
cloud-init처럼 Cluster node의 bootstrap 작업을 하는 주체.
Kubeadm을 사용.
13. Cluster API: Components
3. CRDs (Custom Resource Definitions)
: Kubernetes에서 제공하는 기본 Resource와 별개로 Customizing해서 만드는
resource. Custom Resource와 Custom Controller를 통해 정의하고 구현된다.
• Cluster{}
• Machine{}
• MachineSet{}
• MachineDeployment{}
15. Cluster API: Components
2. Machine{}
• Kubernetes Cluster 내의 Node에 대한 설정
apiVersion: cluster.k8s.io/v1alpha2 machine.yaml
kind: Machine
metadata:
name: first-machine
spec:
…
version:
kubelet: 1.12.1
…
16. Cluster API: Components
3. MachineSet{}
• 같은 형상을 가진 Machine 그룹
apiVersion: cluster.k8s.io/v1alpha2 machine.yaml
kind: MachineSet
metadata:
name: first-machine-sets
spec:
replicas: 5
…
17. Cluster API: Components
4. MachineDeployment{}
• MachineSet을 만들고 관리하며, Machine을 Scale/Update 할 수 있다.
apiVersion: cluster.k8s.io/v1alpha2 deployment.yaml
kind: MachineDeployment
metadata:
name: first-machine
spec:
replicas: 10
strategy:
rollingUpdate:
maxSurge: 1
…
18. 2017. 4. 11., DK Lee
Network Technology R&D Center
Corporate R&D Center
SK Telecom
18 SK Telecom Proprietary 2019
Motivation
Cluster API Provider
19. Cluster API Provider
Infrastructure Provider에 따라 Cluster를 구성하는 프로젝트가 나뉘어진다.
• CAPA (Cluster API Provider AWS)
• CAPG (Cluster API Provider Google Cloud)
• CAPO (Cluster API Provider OpenStack)
• CAPZ (Cluster API Provider Azure)
• 그 외…
20. Cluster API Provider OpenStack
CAPO란?
: OpenStack을 이용하여 VM을 생성하여 Kubernetes Cluster로 구성한다.
별도의 CRDs(OpenStackMachine, OpenStackCluster)와 Controller가
있다.
25. What we do?
Centralized Control plane
CLI
w/ custom plugin
Manifests
Monitoring
Dashboard
K8s cluster
Cluster API
OpenStack
26. LINKS
더 자세한 내용은
• https://github.com/kubernetes-sigs/cluster-api-provider-openstack
• https://github.com/openinfradev/tacoplay
• https://github.com/openinfradev/operator-helm
27. 2017. 4. 11., DK Lee
Network Technology R&D Center
Corporate R&D Center
SK Telecom
27 SK Telecom Proprietary 2019
Questions?