apiVersion: v1
kind: Pod
metadata:
name: example
spec:
containers:
- name: busybox
image: busybox:1.25
API Server가 이 명세를 보고 ectd에 정보를 저장하고 Controller들이 동작하게 됩니다.
ReplicaSet 생성
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: frontend
spec:
replicas: 3
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: web
image: image:v1
ArgoCD(Custom Resource)
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
spec:
project: default
source:
repoURL:
https://github.com/arfoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
destination:
server:
https://kubernetes.default.svc
namespace: guestbook
Object Spec
API 호출하기
원하는 상태(desired state)를 다양한 오브젝트(object)로 정의(spec)하고 API 서버에 yaml 형식으로 전달
참고
https://www.youtube.com/watch?v=IOem05grFkU&list=PLIUCBpK1dpsNf1m-2kiosmfn2nXfljQgb&index=8