#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
☸️ FREE · 3 OBJECTS

Kubernetes YAML Generator: Deployment, Service and Ingress

Fill in your app's image, port and resources, and get manifests you can kubectl apply.

  • 📦 Requests and limits
  • ❤️ Readiness and liveness probes
  • 🌐 Optional Ingress

How to use the Kubernetes YAML Generator

  1. 1. Describe your appEnter the name, image, replicas and container port.
  2. 2. Set resources and checksAdd CPU and memory values and a health check path.
  3. 3. ApplyDownload the YAML and run kubectl apply -f with the file.

What the defaults generate

The example app web-api produces 2 objects: a Deployment and a Service. The Deployment runs 2 replicas of ghcr.io/example/web-api:1.4.2 on port 8080, with requests of 100m CPU and 128Mi memory and limits of 500m and 256Mi. Readiness and liveness probes call /healthz, and the security context sets runAsNonRoot: true and blocks privilege escalation. The Service is a ClusterIP that maps port 80 to the container's 8080.

Add an Ingress host such as api.example.com and a third object appears, routing that host to the Service through an ingress controller.

Choosing values

  • Requests are what the scheduler reserves. Set them near normal usage.
  • Limits cap usage. Going over the memory limit kills the container; going over the CPU limit slows it.
  • Readiness failing removes the Pod from the Service; liveness failing restarts it. Give liveness a longer start delay.
  • Service type: ClusterIP for internal traffic, NodePort for testing, LoadBalancer for a cloud load balancer.

runAsNonRoot needs an image that does not run as root, and ingressClassName must match your controller. Keep passwords in a Secret, not in the env list. Convert units with the Kubernetes CPU and memory units converter, and test your knowledge with the Kubernetes MCQ quiz.

Frequently asked questions

Which Kubernetes versions does this work with?

apps/v1 Deployments, v1 Services and networking.k8s.io/v1 Ingress have been stable for years and work on current clusters.

Can I use this with Minikube or kind?

Yes. For a quick test use NodePort or kubectl port-forward instead of an Ingress.

Is the Kubernetes YAML Generator free?

Yes, the Kubernetes YAML Generator is free. The first time you generate your first manifest, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.

More free tools

See all free tools