<p>I have a requirement to scale down OpenShift pods at the end of each business day automatically.</p>

<p>How might I schedule this automatically?</p>

Radiant
<p>OpenShift, like Kubernetes, is an api-driven application. Essentially all application functionality is exposed over the control-plane API running on the master hosts.</p>

<p>You can use any orchestration tool that is capable of making API calls to perform this activity. Information on calling the OpenShift API directly can be found in the official documentation in the <a href="https://docs.openshift.com/container-platform/3.11/rest_api/index.html" rel="nofollow noreferrer">REST API Reference Overview</a> section.</p>

<p>Many orchestration tools have plugins that allow you to interact with OpenShift/Kubernetes API more natively than running network calls directly. In the case of Jenkins for example there is the <a href="https://github.com/openshift/jenkins-client-plugin" rel="nofollow noreferrer">OpensShift Pipeline Jenkins</a> plugin that allows you to perform OpenShift activities directly from Jenkins pipelines. In the cases of Ansible there is the <a href="https://docs.ansible.com/ansible/latest/modules/k8s_module.html#openshift-raw-module" rel="nofollow noreferrer">k8s module</a>.</p>

<p>If you were to combine this with Jenkins capability to run jobs on a schedule you have something that meets your requirements.</p>

<p>For something much simpler you could just schedule Ansible or bash scripts on a server via cron to execute the appropriate API commands against the OpenShift API.</p>

<p>Executing these commands from <em>within</em> OpenShift would also be possible via the <a href="https://docs.openshift.com/container-platform/3.11/dev_guide/cron_jobs.html" rel="nofollow noreferrer">CronJob</a> object.</p>
