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

k8s-yaml-connectKubernetes YAML connect 部署

Agent Skill

k8s-yaml-connect 用于辅助部署、云资源、容器和基础设施运维,适合在 OpenClaw 中需要检查配置、整理部署步骤或排查环境问题时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,672

周安装

150

GitHub Stars

公开资料未说明

下载量

1,188
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install k8s-yaml-connect

简介

用于通过 YAML 配置文件连接和操作 Kubernetes 集群。

  • 适合在 OpenClaw 中部署、验证和管理容器化应用时使用。
  • 支持 kubectl 资源操作,需结合具体 YAML 配置使用。
  • 安装前请确认集群访问权限和网络连通性。k8s-yaml-connect 属于运维类 Skill,可作为该场景下的辅助能力补充。
  • 涉及集群操作时注意资源变更的幂等性和回滚机制。

SKILL.md

name
k8s-yaml-connect
description
Connect to Kubernetes clusters using YAML configuration files. Use when you need to apply, validate, or manage Kubernetes resources via kubectl with YAML input. Handles kubeconfig creation, context switching, and resource deployment from YAML content.

Kubernetes YAML Connect Skill

This skill enables connection to Kubernetes clusters using YAML configuration files as input. It provides tools to apply, validate, and manage Kubernetes resources through kubectl commands.

When to Use

Use this skill when:

  • You have Kubernetes YAML configuration files that need to be applied to a cluster
  • You need to validate YAML syntax before deployment
  • You want to create or update kubeconfig from YAML input
  • You need to switch between Kubernetes contexts
  • You want to check cluster status and resources

Prerequisites

Required

  • kubectl must be installed and available in PATH
  • Kubernetes cluster accessible (local or remote)
  • Appropriate permissions for the target cluster

Installing kubectl

If kubectl is not installed, you can install it using:

macOS:

# Using Homebrew
brew install kubectl

# Or download directly
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

Linux:

# Using package manager (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install -y kubectl

# Or download directly
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/

Windows:

# Using Chocolatey
choco install kubernetes-cli

# Or download from official release

Verify installation:

kubectl version --client

Core Workflow

1. Validate YAML Syntax

Before applying any YAML, always validate the syntax:

kubectl apply --dry-run=client -f - <<'EOF'
[YAML_CONTENT]
EOF

2. Apply YAML to Cluster

Apply validated YAML to the current context:

kubectl apply -f - <<'EOF'
[YAML_CONTENT]
EOF

3. Create/Update Kubeconfig from YAML

If you have kubeconfig YAML, save it and update context:

# Save kubeconfig
cat > /tmp/kubeconfig.yaml <<'EOF'
[KUBECONFIG_YAML]
EOF

# Set KUBECONFIG environment variable
export KUBECONFIG=/tmp/kubeconfig.yaml

# Verify connection
kubectl cluster-info

4. Context Management

List and switch contexts:

# List available contexts
kubectl config get-contexts

# Switch to specific context
kubectl config use-context [CONTEXT_NAME]

# Get current context
kubectl config current-context

Common Operations

Deploy a Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

Create a Service

apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  type: LoadBalancer

Create a ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  APP_ENV: "production"
  LOG_LEVEL: "info"

Error Handling

Check for Common Issues

# Check if kubectl is installed
command -v kubectl

# Check cluster connectivity
kubectl version --short

# Check if context is set
kubectl config view --minify

Validate YAML Before Applying

Always use dry-run first to catch errors:

kubectl apply --dry-run=client -f [FILE_OR_STDIN]

Security Considerations

  1. Never commit sensitive data in YAML files (use Secrets or external config)
  2. Validate YAML from untrusted sources before applying
  3. Use namespaces to isolate resources
  4. Apply least privilege RBAC permissions

Examples

Example 1: Apply Simple Deployment

# YAML content as variable
YAML_CONTENT=$(cat <<'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
      - name: test
        image: nginx:alpine
EOF
)

# Apply to cluster
kubectl apply -f - <<< "$YAML_CONTENT"

Example 2: Multi-resource YAML

kubectl apply -f - <<'EOF'
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  key: value
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: app
        image: myapp:latest
        envFrom:
        - configMapRef:
            name: app-config
EOF

References

For more detailed information, see:

Troubleshooting

Common Issues

  1. Connection refused: Check if cluster is running and accessible
  2. Unauthorized: Verify kubeconfig and permissions
  3. YAML syntax error: Validate YAML with kubectl apply --dry-run
  4. Resource already exists: Use kubectl apply for updates or kubectl replace for forced updates

Debug Commands

# Get detailed error information
kubectl describe [RESOURCE_TYPE] [RESOURCE_NAME]

# Check events
kubectl get events --sort-by='.lastTimestamp'

# Check pod logs
kubectl logs [POD_NAME]

Remember: Always test YAML in a non-production environment first when possible.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

92.99%
按下载量换算1,105

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills