I have to write a deployment file for my application which takes run time commands and arguments at runtime. e.g. ./foo bar -a=A -b=B
This is my deployment file :
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: foo
spec:
replicas: 1
template:
metadata:
labels:
name: foo
spec:
containers:
- name: foo
image: username/image:tag
# command that to be executed at run time
command: ["bar"]
args:
# This is the flag to pass at runtime
- -a=A
- -b=B
ports:
- containerPort: 9500
It says container command 'foo' not found or doesnot exist. i'm passing a script as entrypoint and it has exec /usr/local/bin/foo
. What's wrong with it ?
所有评论(0)