I have a python script and I used on Kubernetes. After process ended on python script Kubernetes restart pod. And I don't want to this.
I tried to add a line of code from python script like that:
text = input("please a key for exiting")
And I get EOF error, so its depends on container has no EOF config on my Kubernetes.
After that I tried to use restartPolicy: Never. But restartPolicy is can not be Never and I get error like that:
error validating data: ValidationError(Deployment.spec.template): unknown field \"restartPolicy\" in io.k8s.api.core.v1.PodTemplateSpec;
How can I make this? I just want to no restart for this pod. Its can be on python script or Kubernetes yaml file.