How to Deploy a Django App to Kubernetes With Cloud Foundry

Shedrack Akintayo
Cloud Foundry Foundation
2 min readJan 14, 2021

--

Promotional Image

Django developers face a couple problems when it comes to deploying their apps in production, especially with Kubernetes running on their infrastructure. With Cloud Foundry, they can resolve some of these deployment issues easily.

Here’s a short video that helps you understand how to deploy a Ruby application to Kubernetes using Cloud Foundry. The cf push developer experience is possible thanks to cf-for-k8s, an open source project led by the Cloud Foundry community.

Video Tutorial

Summary of Steps:

  1. Install cf-for-k8s on any of your preferred infrastructure (local machine, GKE, Digital Ocean)
  2. Clone the application repository (Github, Gitlab etc.)
  3. Navigate to the application folder
  4. Log on to the Cloud Foundry CLI by typing cf login in your terminal and provide the appropriate credentials.
  5. Make sure to create a Procfile in your application folder, this should contain a command that is required to start the application server. For example:

6. Then deploy your application by running cf push <preferred app name> and sit back for Cloud Foundry to do it’s magic.

7. Copy the route that is generated and open it in a browser. You will be able to access the app in your browser

If you’d like to know more about the #cf-for-k8s project or Cloud Foundry in general, please join us on Slack. You can also reach out to us via our Twitter handle @cloudfoundry!

--

--