Prerequisites

Setup

  1. Set up a GitHub SSH key here.
  2. For this example, the generated private key will be in test_ssh_key
  3. Create a --kind=git-ssh secret
$ konduktor secret create --kind=git-ssh --from-file=test_ssh_key my-ssh-name
  1. Check that the secret was properly created with:
$ konduktor secret list

For more details, check out the setup of secrets here.

Current Working Directory

$ ls
task.yaml   test_ssh_key
$ cat test_ssh_key
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS
1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQR9WZPeBSvixkhjQOh9yCXXlEx5CN9M
yh94CJJ1rigf8693gc90HmahIR5oMGHwlqMoS7kKrRw+4KpxqsF7LGvxAAAAqJZtgRuWbY
EbAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH1Zk94FK+LGSGNA
6H3IJdeUTHkI30zKH3gIknWuKB/zr3eBz3QeZqEhHmgwYfCWoyhLuQqtHD7gqnGqwXssa/
EAAAAgBzKpRmMyXZ4jnSt3ARz0ul6R79AXAr5gQqDAmoFeEKwAAAAOYWpAYm93aWUubG9j
YWwBAg==
-----END OPENSSH PRIVATE KEY-----

Launching

$ konduktor launch task.yaml

Task.yaml

name: git-ssh-secrets

resources:
  cpus: 1
  memory: 1
  image_id: ubuntu
  labels:
    kueue.x-k8s.io/queue-name: user-queue
    maxRunDurationSeconds: "3200"

run: |
  git clone git@github.com:<user-name>/<app-name>.git