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

k8s-operations

kubectl operations for applying, patching, deleting, and executing commands on Kubernetes resources. Use when modifying resources, running commands in pods, or managing resource lifecycle.

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

연동 도구Kubernetes
설치 방법 보기

포함된 파일(1)

  • SKILL.md4.2 KB

SKILL.md(원문)

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

kubectl Operations

Execute kubectl commands using kubectl-mcp-server's operations tools.

When to Apply

Use this skill when:

  • User mentions: "apply", "patch", "delete", "exec", "scale", "rollout"
  • Operations: modifying resources, running commands, scaling workloads
  • Keywords: "update", "change", "modify", "run command", "restart"

Priority Rules

PriorityRuleImpactTools
1Dry run before apply in productionCRITICALkubectl_apply(dry_run=True)
2Check current state before patchingHIGHdescribe_* tools
3Avoid force delete unless necessaryHIGHkubectl_delete
4Verify rollout status after changesMEDIUMkubectl_rollout_status

Quick Reference

TaskToolExample
Apply manifestkubectl_applykubectl_apply(manifest=yaml)
Patch resourcekubectl_patchkubectl_patch(type, name, namespace, patch)
Delete resourcekubectl_deletekubectl_delete(type, name, namespace)
Exec commandkubectl_execkubectl_exec(pod, namespace, command)
Scale deploymentscale_deploymentscale_deployment(name, namespace, replicas)

Apply Resources

kubectl_apply(manifest="""
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  namespace: default
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:latest
""")

kubectl_apply(file_path="/path/to/manifest.yaml")

kubectl_apply(manifest="...", dry_run=True)

Patch Resources

kubectl_patch(
    resource_type="deployment",
    name="nginx",
    namespace="default",
    patch={"spec": {"replicas": 5}}
)

kubectl_patch(
    resource_type="deployment",
    name="nginx",
    namespace="default",
    patch=[{"op": "replace", "path": "/spec/replicas", "value": 5}],
    patch_type="json"
)

kubectl_patch(
    resource_type="service",
    name="my-svc",
    namespace="default",
    patch={"metadata": {"annotations": {"key": "value"}}},
    patch_type="merge"
)

Delete Resources

kubectl_delete(resource_type="pod", name="my-pod", namespace="default")

kubectl_delete(
    resource_type="pods",
    namespace="default",
    label_selector="app=test"
)

kubectl_delete(
    resource_type="pod",
    name="stuck-pod",
    namespace="default",
    force=True,
    grace_period=0
)

Execute Commands

kubectl_exec(
    pod="my-pod",
    namespace="default",
    command="ls -la /app"
)

kubectl_exec(
    pod="my-pod",
    namespace="default",
    container="sidecar",
    command="cat /etc/config/settings.yaml"
)

kubectl_exec(
    pod="my-pod",
    namespace="default",
    command="sh -c 'curl -s localhost:8080/health'"
)

Scale Resources

scale_deployment(name="nginx", namespace="default", replicas=5)

scale_deployment(name="nginx", namespace="default", replicas=0)

kubectl_scale(
    resource_type="statefulset",
    name="mysql",
    namespace="default",
    replicas=3
)

Rollout Management

kubectl_rollout_status(
    resource_type="deployment",
    name="nginx",
    namespace="default"
)

kubectl_rollout_history(
    resource_type="deployment",
    name="nginx",
    namespace="default"
)

kubectl_rollout_restart(
    resource_type="deployment",
    name="nginx",
    namespace="default"
)

rollback_deployment(name="nginx", namespace="default", revision=1)

Labels and Annotations

kubectl_label(
    resource_type="pod",
    name="my-pod",
    namespace="default",
    labels={"env": "production"}
)

kubectl_annotate(
    resource_type="deployment",
    name="nginx",
    namespace="default",
    annotations={"description": "Main web server"}
)

Related Skills

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Configure Kubernetes autoscaling with HPA, VPA, and KEDA. Use for horizontal/vertical pod autoscaling, event-driven scaling, and capacity management.

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

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

Kubernetes backup and restore with Velero. Use when creating backups, restoring applications, managing disaster recovery, or migrating workloads between clusters.

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

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

Browser automation for Kubernetes dashboards and web UIs. Use when interacting with Kubernetes Dashboard, Grafana, ArgoCD UI, or other web interfaces. Requires MCP_BROWSER_ENABLED=true.

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

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

k8s-capi

무료

Cluster API lifecycle management for provisioning, scaling, and upgrading Kubernetes clusters. Use when managing cluster infrastructure or multi-cluster operations.

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

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

k8s-certs

무료

Kubernetes certificate management with cert-manager. Use when managing TLS certificates, configuring issuers, or troubleshooting certificate issues.

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

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

Cilium and Hubble network observability for Kubernetes. Use when managing network policies, observing traffic flows, or troubleshooting connectivity with eBPF-based networking.

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

rohitg00/kubectl-mcp-server9642026년 4월 9일 업데이트

rohitg00의 스킬 모두 보기

이 스킬의 문제 신고