Token导航 LogoToken导航TokenDH.com
运维敏感数据clawhub未标认证来源可访问clear审计通过

kubernetes-devopsKubernetes devops 部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

85,679

周安装

3,606

GitHub Stars

1

下载量

30,002
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:kubernetes-devops(Kubernetes devops 部署)
来源仓库:https://github.com/wpank/kubernetes-devops
安装命令:
openclaw skills install kubernetes-devops
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install kubernetes-devops

简介

内容:Kubernetes 清单生成 - 部署、StatefulSets、CronJobs、服务、入口、

  • 具有生产级安全性和运行状况检查的 ConfigMap、Secret 和 PVC。
  • 何时:用户需要创建 K8s 清单、部署容器、配置服务/入口, 管理 ConfigMaps/Secrets、设置持久存储或组织多环境配置。
  • 关键词: kubernetes, k8s, 清单, 部署, 有状态集, cronjob, 服务, 入口, configmap、secret、pvc、pod、容器、yaml、kustomize、helm、命名空间、探针、安全上下文

SKILL.md

model
fast
description
|
WHAT
Kubernetes manifest generation - Deployments, StatefulSets, CronJobs, Services, Ingresses,
WHEN
User needs to create K8s manifests, deploy containers, configure Services/Ingress,
KEYWORDS
kubernetes, k8s, manifest, deployment, statefulset, cronjob, service, ingress,
version
1.0.0

Kubernetes

Production-ready Kubernetes manifest generation covering Deployments, StatefulSets, CronJobs, Services, Ingresses, ConfigMaps, Secrets, and PVCs with security contexts, health checks, and resource management.

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install kubernetes

When to Use

ScenarioExample
Create deployment manifestsNew microservice needing Deployment + Service
Define networking resourcesClusterIP, LoadBalancer, Ingress with TLS
Manage configurationConfigMaps for app config, Secrets for credentials
Stateful workloadsDatabases with StatefulSets + PVCs
Scheduled jobsCronJobs for batch processing
Multi-environment setupKustomize overlays for dev/staging/prod

Workload Selection

Workload TypeResourceWhen to Use
Stateless appDeploymentWeb servers, APIs, microservices
Stateful appStatefulSetDatabases, message queues, caches
One-off taskJobMigrations, data imports
Scheduled taskCronJobBackups, reports, cleanup
Per-node agentDaemonSetLog collectors, monitoring agents

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
  namespace: production
  labels:
    app.kubernetes.io/name: my-app
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/component: backend
spec:
  replicas: 3
  selector:
    matchLabels:
      app.kubernetes.io/name: my-app
  template:
    metadata:
      labels:
        app.kubernetes.io/name: my-app
        app.kubernetes.io/version: "1.0.0"
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 1000
        fsGroup: 1000
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: my-app
          image: registry.example.com/my-app:1.0.0
          ports:
            - containerPort: 8080
              name: http
          resources:
            requests:
              cpu: 250m
              memory: 256Mi
            limits:
              cpu: 500m
              memory: 512Mi
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop: [ALL]
          livenessProbe:
            httpGet:
              path: /health
              port: http
            initialDelaySeconds: 30
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /ready
              port: http
            initialDelaySeconds: 5
            periodSeconds: 5
          env:
            - name: LOG_LEVEL
              valueFrom:
                configMapKeyRef:
                  name: my-app-config
                  key: LOG_LEVEL
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: my-app-secret
                  key: DATABASE_PASSWORD

Services

ClusterIP (Internal)

apiVersion: v1
kind: Service
metadata:
  name: my-app
  namespace: production
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: my-app
  ports:
    - name: http
      port: 80
      targetPort: 8080
      protocol: TCP

LoadBalancer (External)

apiVersion: v1
kind: Service
metadata:
  name: my-app-lb
  namespace: production
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
  type: LoadBalancer
  selector:
    app.kubernetes.io/name: my-app
  ports:
    - name: http
      port: 80
      targetPort: 8080

Service Type Quick Reference

TypeScopeUse Case
ClusterIPCluster-internalInter-service communication
NodePortExternal via node IPDev/testing, on-prem
LoadBalancerExternal via cloud LBProduction external access
ExternalNameDNS aliasMapping to external services

Ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-app
  namespace: production
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/rate-limit: "100"
spec:
  ingressClassName: nginx
  tls:
    - hosts: [app.example.com]
      secretName: app-tls
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: my-app
                port:
                  number: 80

ConfigMap & Secret

ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-app-config
  namespace: production
data:
  LOG_LEVEL: info
  APP_MODE: production
  DATABASE_HOST: db.internal.svc.cluster.local
  app.properties: |
    server.port=8080
    server.host=0.0.0.0

Secret

apiVersion: v1
kind: Secret
metadata:
  name: my-app-secret
  namespace: production
type: Opaque
stringData:
  DATABASE_PASSWORD: "changeme"
  API_KEY: "secret-api-key"
Important: Never commit plaintext Secrets to Git. Use Sealed Secrets, External Secrets Operator, or Vault for production.

Persistent Storage

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-app-data
  namespace: production
spec:
  accessModes: [ReadWriteOnce]
  storageClassName: gp3
  resources:
    requests:
      storage: 10Gi

Mount in a container:

containers:
  - name: app
    volumeMounts:
      - name: data
        mountPath: /var/lib/app
volumes:
  - name: data
    persistentVolumeClaim:
      claimName: my-app-data
Access ModeAbbreviationUse Case
ReadWriteOnceRWOSingle-pod databases
ReadOnlyManyROXShared config/static assets
ReadWriteManyRWXMulti-pod shared storage

Security Context

Pod-Level

spec:
  securityContext:
    runAsNonRoot: true
    runAsUser: 1000
    fsGroup: 1000
    seccompProfile:
      type: RuntimeDefault

Container-Level

securityContext:
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  capabilities:
    drop: [ALL]

Security Checklist

CheckStatus
runAsNonRoot: trueRequired
allowPrivilegeEscalation: falseRequired
readOnlyRootFilesystem: trueRecommended
capabilities.drop: [ALL]Required
seccompProfile: RuntimeDefaultRecommended
Specific image tags (never :latest)Required
Resource requests and limits setRequired

Standard Labels

metadata:
  labels:
    app.kubernetes.io/name: my-app
    app.kubernetes.io/instance: my-app-prod
    app.kubernetes.io/version: "1.0.0"
    app.kubernetes.io/component: backend
    app.kubernetes.io/part-of: my-system
    app.kubernetes.io/managed-by: kubectl

Manifest Organization

Option 1 — Separate Files

manifests/
├── configmap.yaml
├── secret.yaml
├── deployment.yaml
├── service.yaml
└── pvc.yaml

Option 2 — Kustomize

base/
├── kustomization.yaml
├── deployment.yaml
├── service.yaml
└── configmap.yaml
overlays/
├── dev/
│   └── kustomization.yaml
└── prod/
    ├── kustomization.yaml
    └── resource-patch.yaml

Validation

# Client-side dry run
kubectl apply -f manifest.yaml --dry-run=client

# Server-side validation
kubectl apply -f manifest.yaml --dry-run=server

# Lint with kube-score
kube-score score manifest.yaml

# Lint with kube-linter
kube-linter lint manifest.yaml

Troubleshooting Quick Reference

ProblemDiagnosisFix
Pod stuck Pendingkubectl describe pod — check eventsFix resource requests, node capacity, PVC binding
ImagePullBackOffWrong image name/tag or missing pull secretVerify image exists, add imagePullSecrets
CrashLoopBackOffApp crashes on startCheck logs: kubectl logs <pod> --previous
Service not reachableSelector mismatchVerify kubectl get endpoints <svc> is non-empty
ConfigMap not loadingName mismatch or wrong namespaceCheck names match and namespace is correct
Readiness probe failingWrong path or portVerify health endpoint works inside container
OOMKilledMemory limit too lowIncrease resources.limits.memory

NEVER Do

Anti-PatternWhyDo Instead
Use :latest image tagNon-reproducible deploymentsPin exact version: image:1.2.3
Skip resource limitsPods can starve the nodeAlways set requests and limits
Run as rootContainer escape = full host accessSet runAsNonRoot: true + USER
Commit plaintext SecretsCredentials in Git history foreverUse Sealed Secrets / External Secrets / Vault
Skip health checksK8s can't detect unhealthy podsAlways configure liveness + readiness probes
Omit labelsCannot filter, select, or organizeUse standard app.kubernetes.io/* labels
Single replica for productionZero availability during updatesUse replicas: 3 minimum for HA
Hardcode config in containersRequires rebuild for config changesUse ConfigMaps and Secrets

Assets & References

Assets (Templates)

TemplateDescription
assets/deployment-template.yamlProduction Deployment with security + probes
assets/service-template.yamlClusterIP, LoadBalancer, NodePort examples
assets/configmap-template.yamlConfigMap with data types
assets/statefulset-template.yamlStatefulSet with headless Service + PVC
assets/cronjob-template.yamlCronJob with concurrency + history
assets/ingress-template.yamlIngress with TLS, rate limiting, CORS

References

ReferenceDescription
references/deployment-spec.mdDetailed Deployment specification
references/service-spec.mdService types and networking details

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

78.17%
按下载量换算23,453

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills