Skip to main content
devtools24

Générateur YAML Kubernetes

Générez des manifestes Kubernetes comme Deployments, Services et ConfigMaps.

Entrée
Sortie
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
  namespace: default
  labels:
    app: my-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
        - name: my-app
          image: nginx:latest
          ports:
            - containerPort: 80
          resources:
            requests:
              memory: "64Mi"
              cpu: "250m"
            limits:
              memory: "128Mi"
              cpu: "500m"
          livenessProbe:
            httpGet:
              path: /health
              port: 80
            initialDelaySeconds: 30
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /ready
              port: 80
            initialDelaySeconds: 5
            periodSeconds: 5
kubectl apply -f my-app.yaml

Kubernetes Manifests - Détails techniques

Kubernetes uses YAML manifests to define resources. Common resources include Deployments (running containers), Services (networking), ConfigMaps (configuration), and Secrets (sensitive data).

Alternative en ligne de commande

kubectl apply -f manifest.yaml
kubectl get pods
kubectl describe deployment my-app

Référence

Voir la spécification officielle