Skip to content

Unable to fetch K8s job after creation #5405

Answered by shawkins
xeronix asked this question in Q&A
Discussion options

You must be logged in to vote

If job is not existing, shouldn't client return exception ?

No, get returns null if the resource does not exist. There's a require method that will throw an exception.

In what cases this is possible ? Does K8s server, queue the request to create job and immediately return the response and there can be delay between actual creation of job and responding to create job request ?

The create call should return the job that was created, and subsequent gets should return the resource (if it exists). If you are getting a null, then presumably the resource does not exist at that time. As for why that would be the case, you'll need to double check that nothing else is deleting it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xeronix
Comment options

Answer selected by xeronix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants