Generador de Manifiestos Kubernetes
Genera Deployment, Service, Ingress con TLS y HPA de Kubernetes para una aplicación, con recursos, sondas y buenas prácticas de seguridad.
Gratis y sin registro · Última revisión:
Ctrl+Enter calcular · Esc limpiar foco · / buscar
Generador de Manifiestos Kubernetes
Genera Deployment, Service, Ingress con TLS y HPA de Kubernetes para una aplicación, con recursos, sondas y buenas prácticas de seguridad.
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
namespace: default
labels:
app.kubernetes.io/name: web
spec:
replicas: 2
revisionHistoryLimit: 5
selector:
matchLabels:
app.kubernetes.io/name: web
template:
metadata:
labels:
app.kubernetes.io/name: web
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: web
image: ghcr.io/empresa/web:1.0.0
ports:
- name: http
containerPort: 8080
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
readinessProbe:
httpGet:
path: /health
port: http
periodSeconds: 10
livenessProbe:
httpGet:
path: /health
port: http
periodSeconds: 10
initialDelaySeconds: 15
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
---
apiVersion: v1
kind: Service
metadata:
name: web
namespace: default
labels:
app.kubernetes.io/name: web
spec:
selector:
app.kubernetes.io/name: web
ports:
- name: http
port: 80
targetPort: http
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web
namespace: default
annotations:
cert-manager.io/cluster-issuer: letsencrypt
spec:
ingressClassName: nginx
tls:
- hosts:
- web.ejemplo.com
secretName: web-tls
rules:
- host: web.ejemplo.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web
port:
name: http
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: web
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: web
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
bash
kubectl apply --dry-run=server -f web.yaml
kubectl apply -f web.yaml
kubectl rollout status deployment/web -n defaultCómo usarla
- Rellena «Nombre de la aplicación», «Imagen», «Puerto del contenedor», «Réplicas» (o pulsa «Ejemplo» para ver uno ya hecho).
- El resultado se calcula al momento, mientras escribes. Todo se procesa en tu navegador: los datos no salen de tu equipo.
- Copia el resultado, descárgalo o comparte el enlace (incluye los datos introducidos, salvo contraseñas y ficheros).