본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)41k · #6716

gitops-workflow

하는 일

이 스킬은 Git을 사용해 Kubernetes에 애플리케이션을 배포하는 과정을 자동화하도록 돕습니다. ArgoCD나 Flux 같은 도구를 설정하여, Git 저장소에서 만든 변경 사항이 클러스터에 자동으로 적용되도록 합니다.

사용하는 경우

  • ✓Kubernetes에 애플리케이션을 자동으로 배포하도록 설정할 때.
  • ✓코드 변경 사항이 자동으로 적용되기를 원할 때.
  • ✓Git을 기반으로 인프라를 선언적으로 관리할 때.

스킬 링크

https://github.com/wshobson/agents/blob/main/plugins/kubernetes-operations/skills/gitops-workflow/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/kubernetes-operations/skills/gitops-workflow/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“ArgoCD를 사용해 내 Kubernetes 클러스터에 GitOps를 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

애플리케이션의 원하는 상태를 파일에 정의(선언적)하고, 이 파일을 Git 저장소에 보관합니다. ArgoCD나 Flux 같은 도구가 이 저장소를 감시하며 변경 사항을 Kubernetes에 자동으로 적용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

GitOps Workflow

Complete guide to implementing GitOps workflows with ArgoCD and Flux for automated Kubernetes deployments.

Purpose

Implement declarative, Git-based continuous delivery for Kubernetes using ArgoCD or Flux CD, following OpenGitOps principles.

When to Use This Skill

  • Set up GitOps for Kubernetes clusters
  • Automate application deployments from Git
  • Implement progressive delivery strategies
  • Manage multi-cluster deployments
  • Configure automated sync policies
  • Set up secret management in GitOps

OpenGitOps Principles

  1. Declarative - Entire system described declaratively
  2. Versioned and Immutable - Desired state stored in Git
  3. Pulled Automatically - Software agents pull desired state
  4. Continuously Reconciled - Agents reconcile actual vs desired state

ArgoCD Setup

1. Installation

# Create namespace
kubectl create namespace argocd

# Install ArgoCD
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Get admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

Reference: See references/argocd-setup.md for detailed setup

2. Repository Structure

gitops-repo/
├── apps/
│   ├── production/
│   │   ├── app1/
│   │   │   ├── kustomization.yaml
│   │   │   └── deployment.yaml
│   │   └── app2/
│   └── staging/
├── infrastructure/
│   ├── ingress-nginx/
│   ├── cert-manager/
│   └── monitoring/
└── argocd/
    ├── applications/
    └── projects/

3. Create Application

# argocd/applications/my-app.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/org/gitops-repo
    targetRevision: main
    path: apps/production/my-app
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

4. App of Apps Pattern

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: applications
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/org/gitops-repo
    targetRevision: main
    path: argocd/applications
  destination:
    server: https://kubernetes.default.svc
    namespace: argocd
  syncPolicy:
    automated: {}

Flux CD Setup

1. Installation

The example uses Homebrew. For other systems, follow the official Flux installation guide.

# Install the Flux CLI with Homebrew
brew install fluxcd/tap/flux
flux check --pre

# Bootstrap Flux
flux bootstrap github \
  --owner=org \
  --repository=gitops-repo \
  --branch=main \
  --path=clusters/production \
  --personal

2. Create GitRepository

apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 1m
  url: https://github.com/org/my-app
  ref:
    branch: main

3. Create Kustomization

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 5m
  path: ./deploy
  prune: true
  sourceRef:
    kind: GitRepository
    name: my-app

Sync Policies

Auto-Sync Configuration

ArgoCD:

syncPolicy:
  automated:
    prune: true # Delete resources not in Git
    selfHeal: true # Reconcile manual changes
    allowEmpty: false
  retry:
    limit: 5
    backoff:
      duration: 5s
      factor: 2
      maxDuration: 3m

Flux:

spec:
  interval: 1m
  prune: true
  wait: true
  timeout: 5m

Reference: See references/sync-policies.md

Progressive Delivery

Canary Deployment with ArgoCD Rollouts

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: my-app
spec:
  replicas: 5
  strategy:
    canary:
      steps:
        - setWeight: 20
        - pause: { duration: 1m }
        - setWeight: 50
        - pause: { duration: 2m }
        - setWeight: 100

Blue-Green Deployment

strategy:
  blueGreen:
    activeService: my-app
    previewService: my-app-preview
    autoPromotionEnabled: false

Secret Management

External Secrets Operator

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: db-credentials
spec:

…
자주 묻는 질문

GitOps란 무엇인가요?

Git을 유일한 기준으로 삼아 인프라와 애플리케이션을 관리하는 방식입니다. 변경은 Git의 '풀 리퀘스트'를 통해 이루어지고 환경에 자동으로 적용됩니다.

ArgoCD와 Flux는 어떻게 다른가요?

둘 다 Kubernetes에서 GitOps를 구현하는 도구입니다. ArgoCD는 그래픽 인터페이스와 고급 기능으로 알려져 있고, Flux는 더 가볍고 명령줄 중심입니다.

GitOps에서 비밀 정보(비밀번호, 키)는 어떻게 관리하나요?

비밀 정보를 Git에 직접 저장하지 않는 것이 좋습니다. External Secrets Operator나 Sealed Secrets 같은 도구가 GitOps와 연동하여 비밀 정보를 안전하게 관리하도록 도와줍니다.

상세 정보

작성자의 원본 설명

Implement GitOps workflows with ArgoCD and Flux for automated, declarative Kubernetes deployments with continuous reconciliation. Use when implementing GitOps practices, automating Kubernetes deployments, or setting up declarative infrastructure management.

repo: wshobson/agents

인기도

GitHub 스타
41k
순위
#6716
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬