**Tags:** "Hello World" Examples · Kubernetes

# Zerops k8s showcase

Run upstream [Kubernetes](https://kubernetes.io/) inside a single Zerops project — nested kubeadm cluster, Calico CNI, Gateway API ingress, and profile-specific add-ons (Istio/Longhorn/Headlamp on **Full**, Traefik/Longhorn on **Production**, Traefik-only on **Staging**). Cluster lifecycle is driven by [zerops-recipe-apps/zerops-k8s](https://github.com/zerops-recipe-apps/zerops-k8s) GitHub Actions after the project import.

### Available Environments

- [Staging](https://app.zerops.io/recipes/zerops-k8s-showcase.md?environment=staging)
- **Production** ← current
- [Full](https://app.zerops.io/recipes/zerops-k8s-showcase.md?environment=full)

### Services in this Environment

**Services:**

- **core** (core:ha@2)
  - Containers: 3 × Shared Core, 0.00 GB RAM, 0 GB Disk
- **k8scp1** (alpine/docker@26.1.5)
  - Containers: 1 × Dedicated Core, 8.00 GB RAM, 20 GB Disk
- **k8sworker1** (alpine/docker@26.1.5)
  - Containers: 1 × Dedicated Core, 8.00 GB RAM, 50 GB Disk
- **k8sworker2** (alpine/docker@26.1.5)
  - Containers: 1 × Dedicated Core, 8.00 GB RAM, 50 GB Disk
- **k8sedge** (ubuntu/go@1.22)
  - Containers: 2 × Shared Core, 0.56 GB RAM, 1 GB Disk
- **k8sbackups** (object-storage)
  - Containers: 1 × Shared Core, 0.00 GB RAM, 0 GB Disk

**Total Resources:** 9 containers, 25.12 GB RAM, 122 GB Disk

### One-Click Deploy (Import YAML)

Use this YAML with `zcli project import` to deploy this environment:

```yaml
# yaml-language-server: $schema=https://api.app-prg1.zerops.io/api/rest/public/settings/import-project-yaml-json-schema.json
#zeropsPreprocessor=on
# Compact production: redundant data plane and edge, one control plane.
# This profile intentionally omits the dedicated observability services; the
# normal Zerops logger/statistics surfaces cover the outer runtime services.
project:
  name: zerops-k8s-production
  corePackage: SERIOUS
  tags:
    - zerops-recipe
    - kubernetes
    - github-zerops-recipe-apps-zerops-k8s
    - zerops-k8s-profile-production
  envVariables:
    K8S_MANAGED: "true"
    K8S_PROFILE: production
    K8S_REPOSITORY: zerops-recipe-apps/zerops-k8s
    K8S_VERSION: v1.36.2
    K8S_NODE_IMAGE: zerops-k8s-node:v1.36.2
    K8S_IMAGE_OBJECT: node-images/zerops-k8s-node-v1.36.2.tar.gz
    K8S_IMAGE_SHA256_OBJECT: node-images/zerops-k8s-node-v1.36.2.tar.gz.sha256
    K8S_VRRP_PREFIX_LENGTH: "22"
    K8S_VRRP_HOST_OCTET: "222"
    K8S_VRRP_VIRTUAL_ROUTER_ID: "222"
    K8S_POD_CIDR: 10.244.0.0/16
    K8S_SERVICE_CIDR: 10.96.0.0/16
    K8S_ETCD_RETENTION_RECENT: "28"
    K8S_ETCD_RETENTION_DAILY: "7"
    K8S_ETCD_RETENTION_WEEKLY: "4"
    K8S_ETCD_RETENTION_MONTHLY: "3"
    K8S_LONGHORN_SYSTEM_BACKUP_RETAIN: "8"
    K8S_BACKUP_QUOTA_GB: "25"
    K8S_BACKUP_WARN_PERCENT: "70"
    K8S_BACKUP_FAIL_PERCENT: "95"

services:
  # Single control plane: this is intentionally not control-plane HA. Generated
  # kubeadm/encryption credentials live only in Zerops service secrets.
  - hostname: k8scp1
    type: docker@26.1.5
    startWithoutCode: true
    minContainers: 1
    maxContainers: 1
    verticalAutoscaling:
      cpuMode: DEDICATED
      minCpu: 4
      maxCpu: 4
      startCpuCoreCount: 4
      minRam: 8
      maxRam: 8
      minDisk: 20
      maxDisk: 20
      swapEnabled: false

  # Two fixed workers provide data-plane redundancy. Kubernetes HPA scales
  # workloads inside the cluster; the optional third node uses explicit resize.
  - hostname: k8sworker1
    type: docker@26.1.5
    startWithoutCode: true
    minContainers: 1
    maxContainers: 1
    verticalAutoscaling:
      cpuMode: DEDICATED
      minCpu: 4
      maxCpu: 4
      startCpuCoreCount: 4
      minRam: 8
      maxRam: 8
      minDisk: 50
      maxDisk: 50
      swapEnabled: false

  - hostname: k8sworker2
    type: docker@26.1.5
    startWithoutCode: true
    minContainers: 1
    maxContainers: 1
    verticalAutoscaling:
      cpuMode: DEDICATED
      minCpu: 4
      maxCpu: 4
      startCpuCoreCount: 4
      minRam: 8
      maxRam: 8
      minDisk: 50
      maxDisk: 50
      swapEnabled: false

  # Keepalived elects one of two HAProxy edge containers to own a project-local
  # VRRP VIP. Multicast election avoids static replica addresses, so container
  # replacement and address changes do not require peer configuration updates.
  - hostname: k8sedge
    type: go@1.22
    startWithoutCode: true
    enableSubdomainAccess: true
    minContainers: 2
    maxContainers: 2
    verticalAutoscaling:
      cpuMode: SHARED
      minCpu: 1
      maxCpu: 2
      startCpuCoreCount: 1
      minRam: 0.5
      maxRam: 1
      minDisk: 1
      maxDisk: 2
      swapEnabled: false

  # The only outer dependency: private recovery storage for etcd, Longhorn,
  # and the reproducible node-image cache.
  - hostname: k8sbackups
    type: object-storage
    priority: 10
    objectStorageSize: 25
    objectStoragePolicy: private

```

---

## Next Steps

After deploying one of the environments and getting to know Zerops, you have two paths to choose from:

1. **Template Flow** — Clone our GitHub repositories and use the whole recipe as a template
2. **Integrate Flow** — If you already have an existing application on a similar stack, integrate the recipe setup with your application

Select a flow: [Template Flow](https://app.zerops.io/recipes/zerops-k8s-showcase.md?environment=production&guideFlow=template) or [Integrate Flow](https://app.zerops.io/recipes/zerops-k8s-showcase.md?environment=production&guideFlow=integrate)

Both flows are shown below:

## How to take over the Production environment

### 🎯 What's next?

**Deploy other environments** — Ready to scale? Deploy additional environments for different stages of your workflow:

- [Staging](https://app.zerops.io/recipes/zerops-k8s-showcase.md?environment=staging)
- [Full](https://app.zerops.io/recipes/zerops-k8s-showcase.md?environment=full)

## Knowledge Base

### Platform Reference

- [Routing & Domains](https://docs.zerops.io/features/access)
- [Scaling](https://docs.zerops.io/features/scaling)
- [Environment Variables](https://docs.zerops.io/features/env-variables)
- [CLI (zcli)](https://docs.zerops.io/references/cli)

### Service Type Reference

**Docker**

- [Build & Deploy Pipeline](https://docs.zerops.io/alpine/how-to/build-pipeline)
- [Customize Runtime](https://docs.zerops.io/alpine/how-to/customize-runtime)

**Docker**

- [Tech overview](https://docs.zerops.io/docker/overview#why-vms)
- [Configuration](https://docs.zerops.io/docker/overview#configuration-guide)
- [Examples](https://docs.zerops.io/docker/overview#implementation-examples)

**Golang**

- [Build & Deploy](https://docs.zerops.io/bun/how-to/build-pipeline)
- [Customize Runtime](https://docs.zerops.io/bun/how-to/customize-runtime)

---

## Related Recipes

- [Go Hello World](https://app.zerops.io/recipes/go-hello-world.md)
- [Java Hello World](https://app.zerops.io/recipes/java-hello-world.md)
- [SolidStart SSR Hello World](https://app.zerops.io/recipes/solidstart-ssr-hello-world.md)
- [Astro SSR Hello World](https://app.zerops.io/recipes/astro-ssr-hello-world.md)

