DevOpsDocs Help

Deploy Base Image

Kubernetes keeps restarting pods whose image is a base image because they don't have an executable that starts a process and keeps that process running.

To deploy a base image you need to set the following values for it

spec.containers.args: - sh spec.containers.stdin: true spec.containers.stdinOnce: true spec.containers.tty: true spec.terminationGracePeriodSeconds: 30

for example of a deployment

apiVersion: apps/v1 kind: Deployment metadata: name: maven spec: selector: matchLabels: app: maven spec: containers: - name: maven image: maven:3.8.6-jdk-11 imagePullPolicy: IfNotPresent args: - sh stdin: true stdinOnce: true tty: true terminationGracePeriodSeconds: 30
Last modified: 07 March 2024