Logo van Complete Cicd Pipeline Deployment For Kubernetes From Scratch

Complete Cicd Pipeline Deployment For Kubernetes From Scratch

Community
selvarajmurugesan90
complete-cicd-pipeline-deployment-for-kubernetes-from-scratch

Builds a complete CI/CD pipeline for a Kubernetes-targeted service from an empty repo — source checkout, container image build, SCA/SAST security gates, registry push, and a deploy step that ends at a GitOps handoff (committing a new image tag to a manifests repo) rather than a direct kubectl apply or helm upgrade against the cluster. Use when the user asks to "build a full CI/CD pipeline for Kubernetes from scratch," "set up CI/CD that ends in a GitOps commit, not a cluster deploy," "wire a container build pipeline into Argo CD/Flux," or "go from an empty repo to a Kubernetes service deployed via GitOps end-to-end."

Overzicht

Uitgeverselvarajmurugesan90
Repositoryops-engineering-skills
Skillnaamcomplete-cicd-pipeline-deployment-for-kubernetes-from-scratch
Sterren
44
Forks
18
Meegeleverde bestanden
Alleen instructies
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door selvarajmurugesan90 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Complete Cicd Pipeline Deployment For Kubernetes From Scratch in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/cicd-tooling/skills/complete-cicd-pipeline-deployment-for-kubernetes-from-scratch
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/selvarajmurugesan90/ops-engineering-skills.git /tmp/ops-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/ops-engineering-skills/plugins/cicd-tooling/skills/complete-cicd-pipeline-deployment-for-kubernetes-from-scratch .claude/skills/complete-cicd-pipeline-deployment-for-kubernetes-from-scratch
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Complete Cicd Pipeline Deployment For Kubernetes From Scratch in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Complete Cicd Pipeline Deployment For Kubernetes From Scratch automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Complete Cicd Pipeline Deployment For Kubernetes From Scratch niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Complete CI/CD Pipeline Deployment for Kubernetes, From Scratch

Purpose

A Kubernetes-targeted pipeline's defining mechanical trait is where its job ends: it builds a container image, gates it, and pushes it to a registry — but it does not touch the cluster. The last step is a Git commit (a new image tag in a manifests/config repo), and a separate in-cluster GitOps operator (Argo CD/Flux) performs the actual apply. This is the opposite shape from the VM-based and serverless variants of this skill, both of which end with the pipeline itself calling a deploy API against live infrastructure. Every individual mechanic here — the Dockerfile, the SAST/SCA tool invocations, the GitOps repo structure — already has its own deep skill; this one sequences them into one coherent "empty repo to running-via-GitOps" walkthrough and is explicit about the handoff boundary so a well-meaning "just add a deploy step" doesn't reintroduce direct cluster credentials into CI.

When to use

  • A new Kubernetes-targeted service has no pipeline yet, and the team wants source-to-GitOps-handoff wired up in one pass rather than individually bolting on build, scan, and deploy steps over time.
  • An existing pipeline currently ends with kubectl apply/helm upgrade run directly from CI, and the user wants to migrate it to a GitOps handoff instead.
  • The user wants to understand exactly where CI's responsibility ends and the GitOps operator's begins for a containerized workload.
  • Standing up the SAST/SCA gate sequence specifically for a container-image build (as opposed to a zip/layer or AMI-baking build).

Prerequisites & environment

  • A Git host and CI platform already available — github-actions-single-repo-workflows or jenkins-declarative-pipeline-per-repo cover the concrete pipeline-authoring mechanics this skill sequences; either works, and examples below show GitHub Actions with a Jenkins note where the shape differs.
  • A container registry the pipeline can push to (GHCR, ECR, ACR, Artifact Registry, or a self-hosted Harbor) with least-privilege push credentials stored as CI secrets.
  • A separate GitOps config/manifests repo already set up — per gitops-workflow — with an Argo CD Application/ApplicationSet (or Flux Kustomization) already watching it. This skill assumes that operator-side setup exists; see the four complete-gitops-argocd-deployment-on-*-from-scratch skills in gitops-argo-ecosystem if it doesn't yet.
  • Write access (a bot/service account, ideally opening a PR rather than pushing directly) from the application repo's CI to the config repo.
  • SAST/SCA tooling chosen per sast-integration and software-composition-analysis-sca.

Step-by-step guidance

Phase 1 — Source and trigger scoping

Standard trigger/concurrency setup per ci-cd-pipeline-design and github-actions-single-repo-workflows: run the full pipeline on PRs and pushes to main, path-filtered in a monorepo.

Phase 2 — Build the container image

Follow container-build-and-release in full for the Dockerfile itself (multi-stage, non-root, pinned base image, immutable tagging by commit SHA). This is the Kubernetes-specific build artifact — contrast with Phase 2 of the serverless variant of this skill (a zip/layer, no Dockerfile at all) and the VM variant (a full machine image, not a container layer).

Phase 3 — SAST and SCA gates, scoped to the diff

Per sast-integration and software-composition-analysis-sca, run diff-aware static analysis and a dependency/lockfile scan before the image is pushed anywhere — failing fast on a critical finding before spending registry storage and pipeline minutes on an image that won't ship:

yaml
jobs:
  sast:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - run: semgrep ci --config p/owasp-top-ten --baseline-commit "${{ github.event.pull_request.base.sha }}"
  sca:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: aquasecurity/trivy-action@0.24.0
        with: { scan-type: 'fs', severity: 'CRITICAL,HIGH', exit-code: '1', ignore-unfixed: true }

Phase 4 — Push the built image to the registry

Only after Phase 3 passes:

yaml
  build-and-push:
    needs: [sast, sca]
    runs-on: ubuntu-latest
    permissions: { contents: read, packages: write }
    steps:
      - uses: actions/checkout@v4
      - uses: docker/setup-buildx-action@v3
      - uses: docker/login-action@v3
        with: { registry: ghcr.io, username: "${{ github.actor }}", password: "${{ secrets.GITHUB_TOKEN }}" }
      - uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          tags: |
            ghcr.io/example/payments-api:${{ github.sha }}

A follow-on image scan (per software-composition-analysis-sca's container-image scanning step) on the pushed digest catches base-image CVEs the filesystem scan in Phase 3 couldn't see.

Phase 5 — The deploy step: a GitOps handoff, not a cluster touch

This is the defining step. The pipeline's last action is a Git commit against the manifests repo, bumping the image tag/digest in the relevant overlay — never a direct kubectl apply, helm upgrade, or any command carrying a cluster credential:

yaml
  update-manifests:
    needs: build-and-push
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          repository: example/gitops-config
          token: ${{ secrets.GITOPS_REPO_TOKEN }}
      - run: |
          cd apps/payments-api/overlays/staging
          kustomize edit set image payments-api=ghcr.io/example/payments-api:${{ github.sha }}
          git config user.name "ci-bot"
          git config user.email "ci-bot@example.com"
          git commit -am "payments-api: bump to ${{ github.sha }}"
          git push

GITOPS_REPO_TOKEN is scoped only to the manifests repo (never a cluster kubeconfig or cloud credential) — the in-cluster Argo CD Application/ApplicationSet (see the relevant complete-gitops-argocd-deployment-on-*-from-scratch skill) picks up this commit and performs the actual kubectl apply on its own reconciliation loop, per gitops-workflow.

Phase 6 — Verify the handoff, not the deploy

The pipeline's own success/failure only reflects "the manifests repo was updated correctly" — it cannot and should not report "the cluster is running the new version," since that's the GitOps operator's job. Separately, monitor argocd app get payments-api-staging (or a notification wired from Argo CD/Flux) for the actual rollout outcome.

Best practices

  • Never let this pipeline hold a cluster kubeconbig, a cloud IAM role with cluster-apply permissions, or any credential capable of a direct kubectl apply — the entire point of the GitOps handoff is that CI's blast radius, if compromised, is "can propose a manifest change," not "can directly mutate the cluster."
  • Prefer opening a PR against the manifests repo (with required review) for production overlays, and a direct commit only for lower environments (staging/dev) where the team has decided fast, unreviewed promotion is acceptable — mirroring the sync-policy trust progression in argocd-application-configuration.
  • Tag the image with the exact commit SHA the manifests-repo commit references, so the Git history of the config repo is a complete, traceable audit trail of what's running where at any point in time.
  • Run the container-image scan (post-push, on the actual digest) as a separate gate from the pre-push filesystem SCA scan — they catch different things (application dependencies vs. base-image OS packages).
  • Keep the "update manifests" step's credential (a fine-grained PAT or deploy key scoped to one repo) rotated and audited exactly like any other CI secret, per secrets-management.

Common pitfalls

  • Symptom: Someone adds a "quick fix" kubectl apply step directly to the pipeline "just for this one hotfix," and it works — until the next regular GitOps sync reverts the hotfix moments later because the config repo was never updated to match. Fix: This is exactly the sequencing failure this skill exists to prevent — any change to what's running must go through the manifests repo commit (Phase 5), even for an emergency fix; a direct kubectl apply against a selfHeal: true Application is reverted on the next reconciliation, per the drift-handling behavior in gitops-workflow.

  • Symptom: The pipeline reports green ("deploy succeeded") but the service in the cluster is still running the old version an hour later. Fix: "Pipeline green" here only means the manifests-repo commit landed — it says nothing about whether Argo CD/Flux actually reconciled it. Check argocd app get <app> (or Flux's equivalent) separately; if it's OutOfSync/stuck, that's a GitOps-operator issue (see argocd-application-configuration), not a pipeline bug.

  • Symptom: Two different pipelines (the app's own CI, and a separate "promote to prod" job) both push commits to the same manifests-repo overlay, and their commits race, silently overwriting each other's image tag bump. Fix: Give exactly one pipeline stage ownership of writing to a given overlay path per environment, and have any "promotion" step read the currently-deployed staging tag and bump prod to that exact value rather than independently recomputing it — avoid two automated writers racing on the same file.

  • Symptom: The SAST/SCA gates (Phase 3) are placed after the image build and push (Phase 4) "to save a rebuild if it fails," and a vulnerable image sits in the registry (and is briefly pullable) before the gate result comes back. Fix: Order gates before the push, not after — a failed post-push gate still leaves a bad image in the registry for however long it takes to notice and delete it; scanning the filesystem/dependencies before docker build/push (Phase 3 before Phase 4) means a failing gate never produces a pushed artifact at all.

Worked example

Scenario: payments-api, a Node.js service, gets its first full pipeline: PR-time SAST/SCA, main-branch image build/push to GHCR, and a GitOps handoff bumping the staging overlay in example/gitops-config.

.github/workflows/ci-cd.yml (abbreviated to the phases above; full Dockerfile/scan config lives in the linked skills):

yaml
name: ci-cd
on:
  pull_request: { branches: [main] }
  push: { branches: [main] }

jobs:
  sast:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }
      - run: semgrep ci --config p/owasp-top-ten --baseline-commit "${{ github.event.pull_request.base.sha || github.event.before }}"

  sca:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: aquasecurity/trivy-action@0.24.0
        with: { scan-type: 'fs', severity: 'CRITICAL,HIGH', exit-code: '1' }

  build-and-push:
    needs: [sast, sca]
    if: github.event_name == 'push'
    runs-on: ubuntu-latest
    permissions: { contents: read, packages: write }
    steps:
      - uses: actions/checkout@v4
      - uses: docker/login-action@v3
        with: { registry: ghcr.io, username: "${{ github.actor }}", password: "${{ secrets.GITHUB_TOKEN }}" }
      - uses: docker/build-push-action@v6
        with: { push: true, tags: "ghcr.io/example/payments-api:${{ github.sha }}" }

  update-manifests:
    needs: build-and-push
    if: github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { repository: example/gitops-config, token: "${{ secrets.GITOPS_REPO_TOKEN }}" }
      - run: |
          cd apps/payments-api/overlays/staging
          kustomize edit set image payments-api=ghcr.io/example/payments-api:${{ github.sha }}
          git config user.name "ci-bot" && git config user.email "ci-bot@example.com"
          git commit -am "payments-api: bump to ${{ github.sha }}"
          git push

Argo CD's payments-api-staging Application (automated: {prune: true, selfHeal: true} per argocd-application-configuration) picks up the new commit on its next poll and reconciles the cluster — the CI pipeline itself never held a cluster credential at any point.

Cross-references

Veelgestelde vragen

Wat doet de AI-skill Complete Cicd Pipeline Deployment For Kubernetes From Scratch?

Builds a complete CI/CD pipeline for a Kubernetes-targeted service from an empty repo — source checkout, container image build, SCA/SAST security gates, registry push, and a deploy step that ends at a GitOps handoff (committing a new image tag to a manifests repo) rather than a direct kubectl apply or helm upgrade against the cluster. Use when the user asks to "build a full CI/CD pipeline for Kubernetes from scratch," "set up CI/CD that ends in a GitOps commit, not a cluster deploy," "wire a container build pipeline into Argo CD/Flux," or "go from an empty repo to a Kubernetes service deplo...

Waarom Complete Cicd Pipeline Deployment For Kubernetes From Scratch gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Complete Cicd Pipeline Deployment For Kubernetes From Scratch bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Complete Cicd Pipeline Deployment For Kubernetes From Scratch in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/cicd-tooling/skills/complete-cicd-pipeline-deployment-for-kubernetes-from-scratch. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Complete Cicd Pipeline Deployment For Kubernetes From Scratch gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Complete Cicd Pipeline Deployment For Kubernetes From Scratch gebruiken?

Zoveel als je wilt. Je kunt Complete Cicd Pipeline Deployment For Kubernetes From Scratch gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Complete Cicd Pipeline Deployment For Kubernetes From Scratch gratis?

Ja. Deze skill is door selvarajmurugesan90 op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇