apiVersion: batch/v1
kind: Job
metadata:
  name: ssl-creator
  labels:
    app: ssl-creator
spec:
  template:
    metadata:
      name: ssl-creator
    spec:
      containers:
      - name: ssl-creator
        image: bitnami/minideb:buster
        command: 
        - "/bin/bash"
        - "-c"
        - |-
          sudo apt-get update
          sudo apt-get install -y software-properties-common
          sudo add-apt-repository ppa:certbot/certbot
          sudo apt-get update
          sudo apt-get install -y certbot
          echo This script won't work for aws, as it's black listed in letsencrypt
          certbot_home=/etc/letsencrypt/archive/$dns_name
      restartPolicy: OnFailure
