Coding & Developmentšuniversal
Create namespace
A Kubernetes-native system for executing AI-powered tasks
Quick Start
Install this Skill
npx skills add kubeopencode/kubeopencode<p align="center">
<img src="docs/images/logo.png" alt="KubeOpenCode Logo" width="500">
</p>
<p align="center">
<em>A Kubernetes-native system for executing AI-powered tasks</em>
</p>
> **Note**: This project uses [OpenCode](https://opencode.ai) as its AI coding agent. KubeOpenCode is not built by or affiliated with the OpenCode team.
<p align="center">
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a>
<a href="https://goreportcard.com/report/github.com/kubeopencode/kubeopencode"><img src="https://goreportcard.com/badge/github.com/kubeopencode/kubeopencode" alt="Go Report Card"></a>
</p>
## Overview
KubeOpenCode enables you to execute [OpenCode](https://opencode.ai) AI agent tasks using Kubernetes Custom Resources. It provides a simple, declarative, GitOps-friendly approach to running AI coding agents as Kubernetes Pods.
## Architecture
```
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Kubernetes API Server ā
ā - Custom Resource Definitions (CRDs) ā
ā - RBAC & Authentication ā
āāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā KubeOpenCode Controller (Operator) ā
ā - Watch Task CRs ā
ā - Create Kubernetes Pods for tasks ā
ā - Update CR status ā
āāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Kubernetes Pods ā
ā - Execute tasks using AI agents ā
ā - Context files mounted as volumes ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
```
### Core Concepts
- **Task**: Single task execution (the primary API)
- **TaskTemplate**: Reusable template for Task creation (similar to Argo WorkflowTemplate)
- **Agent**: AI agent configuration (HOW to execute)
- **KubeOpenCodeConfig**: System-level configuration (optional)
> **Note**: Workflow orchestration and webhook triggers have been delegated to Argo Workflows and Argo Events respectively. KubeOpenCode focuses on the core Task/Agent abstraction.
## Quick Start
### Prerequisites
- Kubernetes 1.25+
- Helm 3.8+
### Installation
```bash
# Create namespace
kubectl create namespace kubeopencode-system
# Install from OCI registry
helm install kubeopencode oci://quay.io/kubeopencode/helm-charts/kubeopencode \
--namespace kubeopencode-system
# Or install from local chart (for development)
helm install kubeopencode ./charts/kubeopencode \
--namespace kubeopencode-system
```
### Example Usage
#### 1. Create an Agent
KubeOpenCode uses a **two-container pattern**:
- **Init Container** (`agentImage`): Copies OpenCode binary to `/tools` shared volume
- **Worker Container** (`executorImage`): Runs tasks using `/tools/opencode`
```yaml
apiVersion: kubeopencode.io/v1alpha1
kind: Agent
metadata:
name: default
namespace: kubeopencode-system
spec:
agentImage: quay.io/kubeopencode/kubeopencode-agent-opencode:latest
executorImage: quay.io/kubeopencode/kubeopencode-agent-devbox:latest
workspaceDir: /workspace
serviceAccountName: kubeopencode-agent
credentials:
- name: opencode-api-key
secretRef:
name: ai-credentials
key: opencode-key
env: OPENCODE_API_KEY
```
#### 2. Create a Task
```yaml
apiVersion: kubeopencode.io/v1alpha1
kind: Task
metadata:
name: update-service-a
namespace: kubeopencode-system
spec:
# Task description (becomes /workspace/task.md)
description: |
Update dependencies to latest versions.
Run tests and create PR.
# Optional inline contexts
contexts:
- type: Text
text: |
# Coding Standards
- Use descriptive names
- Write unit tests
```
#### 3. Monitor Progress
```bash
# Watch Task status
kubectl get tasks -n kubeopencode-system -w
# Check detailed status
kubectl describe task update-service-a -n kubeopencode-system
# View task logs
kubectl logs $(kubectl get task update-service-a -o jsonpath='{.status.podName}') -n kubeopencode-system
```
#### 4. Use TaskTemplate for Reusable Configurations
TaskTemplates let you define common Task configurations that can be shared across multiple Tasks:
```yaml
# Create a TaskTemplate with shared configuration
apiVersion: kubeopencode.io/v1alpha1
kind: TaskTemplate
metadata:
name: pr-task-template
namespace: kubeopencode-system
spec:
agentRef:
name: default
contexts:
- type: ConfigMap
configMap:
name: coding-standards
---
# Create Tasks that reference the template
apiVersion: kubeopencode.io/v1alpha1
kind: Task
metadata:
name: fix-issue-123
spec:
taskTemplateRef:
name: pr-task-template
description: |
Fix issue #123: Login button not working on mobile.
```
**Merge Strategy:**
| Field | Merge Behavior |
|-------|---------------
... (truncated)Repository
4stars
1forks
Details
Related Skills
More coding & development skills you might like
Reticle
Coding & DevelopmentAI agents can generate code, but still struggle to understand what they build. Reticle brings Jev-style machine-native runtime perception to web & desktop applications.
š¤claudešuniversal
1.2k
190
View
agentscope-java
Coding & DevelopmentExpert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
šuniversal
6.0k
1.5k
View
ospec
Coding & DevelopmentDocument-driven OSpec workflow for initialization, change/goal routing, validation, archiving, and durable project knowledge.
āØgeminiš¤claudeš¬gptšuniversal
524
34
View
misakanet-failure-memory
Coding & Developmentš A zero-dependency, git-backed micro-lesson library for AI Agents to asynchronously share and search verified debugging experience. Python stdlib only. | https://misakanet.org
š¤claudeāØļøcursoršuniversal
424
158
View