Hi i am new to kubernetes.
I want to create dynamically pod when an event occured.for example when a push a file in directory.i want to create pod dynamically to process this file.I work in a local cluster(minikube)
Write a service that continuously keeps on monitoring your directory and provision pod for provisioning it.
You said you want to create a pod
when a push a file in directory
What do you mean by push ? You mean using an SCM like Git for example ?
Anyway, this seems a basic CI/CD workflow to me. You can certainly do it using the Kubernetes API as told in comment but (in my opinion) it will be more simple to just do it with your CI/CD tool (supposing you're using one).
If not, here are some hints :
Those are not the only existing tools, but probably the most popular with the most help and documentation out there.