How to specify imagePullSecrets in docker-compose.yml to get converted by kompose

3/5/2018

I have got a following yml file after doing kompose convert But, I want to add imagePullSecrets in the conversion output. Instead of everytime making a local change, I would like to put something in docker-compose.yml so that it gets converted automatically in kubernetes yml.

Similar usecase is needed for number of replicas as well.

How to achieve this?

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert -f monitor.yml
    kompose.deployment.spec.replicas: "2" 
  name: monitor
spec:
  replicas: 1
  template:
    spec:
      containers:
      - command:
        - python
        image: example.com/monitor

        name: monitor
        ports:
        - containerPort: 9990
        resources: {}
        stdin: true
        tty: true
        workingDir: /path/to/code
      restartPolicy: Always
status: {}
-- nizam.sp
kompose
kubernetes

1 Answer

6/25/2019
-- armb
Source: StackOverflow