Skip to content

Deployments

Debian With Infinite Loop

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s-app: debian-example
  name: replace_me #(1)
  namespace: replace_me # (2)
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s-app: debian-example
  strategy:
    type: Recreate 
  template:
    metadata:
      labels:
        k8s-app: debian-example
      name: debian-example
    spec:
      containers:
      - args:
        - -c
        - while true; do echo "$(date +%F\ %T) - hello"; sleep 10;done
        command:
        - /bin/sh
        image: debian:latest
        imagePullPolicy: Always
        name: debian-example
        securityContext:
          privileged: false
  1. Name Of The Deployment
  2. Namespace name where you want to Deploy.

Last update: March 29, 2022
Back to top