Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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: {}
like image 643
nizam.sp Avatar asked Oct 27 '25 05:10

nizam.sp


1 Answers

You can (now) use a kompose.image-pull-secret label https://github.com/kubernetes/kompose/blob/master/docs/user-guide.md#labels https://github.com/kubernetes/kompose/pull/1040

like image 183
armb Avatar answered Oct 30 '25 02:10

armb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!