title: How To Restart Self Managed Airflow Webserver in Google Composer
body: <p>I'm using Google Composer however due to the fact that I'm trying to create a dynamically created DAG, I'm unable to use the managed web server [1]. So in the end I need to add a plugins because I need to access the Airflow Webserver using REST API, so I install the following plugins, because the experimental REST API is not sufficient for my case [2]:</p>
  
  <ul>
  <li><a href="https://github.com/teamclairvoyant/airflow-rest-api-plugin" rel="nofollow noreferrer">https://github.com/teamclairvoyant/airflow-rest-api-plugin</a></li>
  </ul>
  
  <p>My managed Airflow Webserver was able to pick up changes when I updated my plugins. However my self managed Airflow Webserver was unable to pick up the changes.</p>
  
  <p>I understand that I need to restart my Airflow Webserver, however it seems like my pods are not got restarted after I perform this command:</p>
  
  <pre><code>kubectl get deploy airflow-webserver -o yaml | kubectl replace --force -f -
  </code></pre>
  
  <p>For your reference my <em>deployment.yaml</em> can be seen if you're doing the steps mentioned in [3].</p>
  
  <p>Restarting the pods by using kubectl patch for certain unused environment variable also seems to be not working.</p>
  
  <p>[1] <a href="https://stackoverflow.com/questions/52889241/dynamically-creating-dag-based-on-row-available-on-db-connection">Dynamically Creating DAG based on Row available on DB Connection</a></p>
  
  <p>[2] <a href="https://github.com/apache/airflow/blob/master/docs/api.rst" rel="nofollow noreferrer">https://github.com/apache/airflow/blob/master/docs/api.rst</a></p>
  
  <p>[3] <a href="https://cloud.google.com/composer/docs/how-to/managing/deploy-webserver" rel="nofollow noreferrer">https://cloud.google.com/composer/docs/how-to/managing/deploy-webserver</a></p>