Kubernetes YAML Examples

4 production-ready Kubernetes manifest files — covering Deployments with health probes, Services and Ingress with TLS termination, ConfigMaps and Secrets for configuration management, and CronJobs for scheduled workloads.

Kubernetes manifest files describe the desired state of your cluster resources and are applied with kubectl apply -f manifest.yaml. All Kubernetes resources are written in YAML (or JSON), and the format is strict: apiVersion, kind, metadata, and spec are required at the top level of every object. Multiple resources can live in one file separated by ---. Use the DotYAML validator to catch indentation and structural errors before applying to your cluster.

🚀

Deployment

3-replica Deployment with resource requests/limits, readiness and liveness probes, and environment variables from Secrets.

Kubernetes
🌐

Service + Ingress

ClusterIP Service paired with an Nginx Ingress and automatic TLS via cert-manager. Exposes your app over HTTPS.

Kubernetes
🔐

ConfigMap + Secret

ConfigMap for non-sensitive app config with multi-line file data, and a Secret for database URLs and API keys.

Kubernetes

CronJob

Scheduled task with cron expression, timezone, concurrency policy, history limits, and resource constraints.

Kubernetes

Also in the Examples Library

Helm – values.yaml Template Docker Compose – Full Stack GitHub Actions – Docker Build & Push Ansible – Nginx Playbook