skip to content
Alvin Lucillo

Command and args

/ 1 min read

Suppose we have the Dockerfile below with default base command (entrypoint) and args (cmd). To override them in a pod container definition, use

  • command to override entrypoint
  • args to override cmd
FROM ubuntu
ENTRYPOINT ["sleep"]
CMD ["5"]
apiVersion: v1
kind: Pod
metadata:
  name: sleeper
spec:
  containers:
    - name: ubuntu-sleeper
      image: ubuntu-sleeper
      command: ["sleep2.0"]
      args: ["10"]