본문으로 건너뛰기
cccskills
무료GitHub에 공개

kubernetes-deploying

Deploy applications to Kubernetes — Deployments, Services, Ingress, ConfigMaps, Secrets, health checks, and scaling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Kubernetes
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Kubernetes Deploying

Deploy and manage applications on Kubernetes.

Core Resources

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
  labels:
    app: my-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
        - name: my-app
          image: my-registry/my-app:v1.2.3
          ports:
            - containerPort: 3000
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 500m
              memory: 512Mi
          livenessProbe:
            httpGet:
              path: /healthz
              port: 3000
            initialDelaySeconds: 10
            periodSeconds: 30
          readinessProbe:
            httpGet:
              path: /ready
              port: 3000
            initialDelaySeconds: 5
            periodSeconds: 10
          env:
            - name: DATABASE_URL
              valueFrom:
                secretKeyRef:
                  name: my-app-secrets
                  key: database-url
            - name: NODE_ENV
              value: production

Service

apiVersion: v1
kind: Service
metadata:
  name: my-app
spec:
  selector:
    app: my-app
  ports:
    - port: 80
      targetPort: 3000
  type: ClusterIP

Ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-app
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
  tls:
    - hosts:
        - app.example.com
      secretName: my-app-tls
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: my-app
                port:
                  number: 80

ConfigMap & Secret

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-app-config
data:
  LOG_LEVEL: info
  FEATURE_FLAGS: '{"darkMode": true}'
---
apiVersion: v1
kind: Secret
metadata:
  name: my-app-secrets
type: Opaque
stringData:
  database-url: postgresql://user:pass@host:5432/db
  api-key: sk-abc123

Common Commands

# Apply manifests
kubectl apply -f k8s/

# Check deployment status
kubectl rollout status deployment/my-app

# View pods
kubectl get pods -l app=my-app

# View logs
kubectl logs -f deployment/my-app

# Execute into a pod
kubectl exec -it <pod-name> -- /bin/sh

# Scale
kubectl scale deployment/my-app --replicas=5

# Rollback
kubectl rollout undo deployment/my-app

# Port forward for local debugging
kubectl port-forward svc/my-app 3000:80

Deployment Strategies

StrategyHowWhen
Rolling update (default)Replace pods one at a timeMost deployments
RecreateKill all old pods, start new onesWhen you can't run two versions simultaneously
Blue/greenRun two full environments, switch trafficNeed instant rollback
CanaryRoute small % of traffic to new versionHigh-risk changes

Rolling update config:

spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0

Health Checks

Always set both:

  • livenessProbe: "Is the process healthy?" — restarts the pod if it fails
  • readinessProbe: "Can it handle traffic?" — removes from service if it fails

Common probe types:

  • httpGet: Hit an HTTP endpoint (most common)
  • exec: Run a command in the container
  • tcpSocket: Check if a port is open

Horizontal Pod Autoscaler

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: my-app
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  minReplicas: 2
  maxReplicas: 10
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70

Tips

  • Always set resource requests and limits
  • Use namespaces to isolate environments (dev, staging, prod)
  • Never put secrets in plaintext YAML committed to git — use Sealed Secrets, SOPS, or external secret managers
  • Tag images with specific versions, never use :latest in production
  • Set PodDisruptionBudget for high-availability workloads

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use Cursor's browser aria snapshots to audit a page for accessibility issues — missing labels, broken tab order, contrast, and ARIA misuse.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

0xAidan/polymarket-bot-test42026년 9월 4일 업데이트

Add PostHog analytics to a web application, including event tracking, page views, feature flags, and session replay.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

0xAidan/polymarket-bot-test42026년 9월 4일 업데이트

Generate OpenAPI/Swagger documentation for an API, including endpoint schemas, request/response types, and interactive docs UI.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

0xAidan/polymarket-bot-test42026년 9월 4일 업데이트

Add authentication to a web application using NextAuth.js (Auth.js), including OAuth providers, session management, and protected routes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

0xAidan/polymarket-bot-test42026년 9월 4일 업데이트

Dockerize an application with a production-ready Dockerfile, docker-compose setup, and .dockerignore.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

0xAidan/polymarket-bot-test42026년 9월 4일 업데이트

Set up Playwright end-to-end testing in a project, including test configuration, example tests, and CI integration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

0xAidan/polymarket-bot-test42026년 9월 4일 업데이트

0xAidan의 스킬 모두 보기

이 스킬의 문제 신고