# k8s-kaniko-job

Builds a container image in a Kubernetes Kaniko Job and pushes it to GHCR. It fits managed deploys running without a Docker daemon.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 374 installs · ★ 83
- Author: labring
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/labring/sealos-skills/tree/HEAD/plugins/sealos/skills/k8s-kaniko-job/SKILL.md
- Updated: 2026-09-28
- HTML: https://affpapa.org/en/nevibecode/skills/k8s-kaniko-job

## What it does

The skill runs `scripts/kaniko-build.py` to package the project context, place it in the local VersityGW store, create a Kaniko Job in the current namespace, and publish the image to GHCR. The command returns an image digest and reference, so deployments can pin the digest instead of relying on a mutable tag.

The build runs inside Kubernetes as `linux/amd64`, with `kubectl`, `python3`, `tar`, `curl`, and `bash` available to the script. GHCR access needs `GITHUB_TOKEN` with `write:packages`; the image owner must match the token login after lowercasing. A Dockerfile must be present in the build context.

Use this skill for `SEALAI_DEPLOY_MODE=managed`. Local interactive deploys use `docker buildx`, so this workflow is the wrong path for them.

## Requirements
- Works with: Kubernetes, Docker

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add labring/sealos-skills --skill k8s-kaniko-job -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/k8s-kaniko-job/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/k8s-kaniko-job/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add labring/sealos-skills --skill k8s-kaniko-job -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/k8s-kaniko-job/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add labring/sealos-skills --skill k8s-kaniko-job -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/k8s-kaniko-job/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install labring/sealos-skills k8s-kaniko-job
```

2. **Manually: put the files in place**
- File: `.github/skills/k8s-kaniko-job/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add labring/sealos-skills --skill k8s-kaniko-job -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/labring/sealos-skills --path plugins/sealos/skills/k8s-kaniko-job
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/k8s-kaniko-job/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add labring/sealos-skills --skill k8s-kaniko-job -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/labring/sealos-skills/tree/HEAD/plugins/sealos/skills/k8s-kaniko-job/SKILL.md

## When to use it
- build an image without a Docker daemon
- send project sources to a Kaniko Job
- push the result to GHCR
- pin a deployment to an image digest
- diagnose a failed context upload

## Example prompts
- Build the project with `scripts/kaniko-build.py` and publish it as `ghcr.io/<owner>/<repo>:<tag>`.
- Run a managed build from the project workspace using `.` as the context and `Dockerfile` as the Dockerfile, then return `image_ref` and `digest`.
- Inspect the Kaniko Job failure and report redacted findings without printing tokens or Secret payloads.

## Similar
- [wizard](https://affpapa.org/en/nevibecode/skills/wizard.md) — skill · 553369 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [setup-pre-commit](https://affpapa.org/en/nevibecode/skills/setup-pre-commit.md) — skill · 489289 installs
- [using-git-worktrees](https://affpapa.org/en/nevibecode/skills/using-git-worktrees.md) — skill · 217153 installs
- [finishing-a-development-branch](https://affpapa.org/en/nevibecode/skills/finishing-a-development-branch.md) — skill · 214439 installs
- [orca-cli](https://affpapa.org/en/nevibecode/skills/orca-cli.md) — skill · 353600 installs

From the same set: [labring/sealos-skills](https://affpapa.org/en/nevibecode/by/labring/sealos-skills.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
