<p>I have Kubernetes replication controller which is running 2 pods of PHP applicaton. Now, I need to schedule 3 cronjobs which run some PHP scripts in those pods. How can I achieve it? (The base image for the container is centos:7).</p>

Arun
<p>As said in comments your best option is create <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="nofollow noreferrer">Kubernetes CronJobs</a>.</p>

<p>If you don't want to expose you PHP functions, you can always use a container that execute commands in your PHP pods.</p>

<p>Here is an example that create a cronjob. This cronjob runs kubectl exec for every pod with label app=my-php, calling ls in each pod.</p>

<pre><code>  apiVersion: batch/v1beta1
  kind: CronJob
  metadata:
    name: hello-cron
  spec:
    schedule: "*/1 * * * *"
    jobTemplate:
      spec:
        template:
          spec:
            containers:
            - name: kubectl
              image: lachlanevenson/k8s-kubectl
              command:
                - /bin/sh
                - -c
              args: 
                - kubectl get pod -l app=my-php -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | xargs -i kubectl exec {} ls
            restartPolicy: Never
</code></pre>
