Trigger Kubernetes from from another kubernetes job Trigger Kubernetes from from another kubernetes job kubernetes kubernetes

Trigger Kubernetes from from another kubernetes job


If you see the error message in detail, you'll find that your client is not using the service account you created (my-sa). Its using the default service account in the namespace instead:

"system:serviceaccount:my-namespace:default" cannot create resource "jobs"

And it should be safe to assume, that the default service account will not be having the privileges to create jobs.

It should be worthwhile to look into the official documentation of fabric8io, to see how you can authenticate with a custom service-account. From what I could find in the docs, it should be mostly handled by mounting the secret, corresponding to the service-account into the pod, then configuring your application code or probably setting up an specific environment variable.