Deploy Django app to Google Cloud By Using GKE

Prerequisites:

  • Google cloud account
  • Access to GKE

    Steps:

  1. Login your Google Cloud Service Console:
  1. From Navigation Menu, choose Kubenetes Engine  Clusters:

  2. Click Create cluster:

  3. Leave all fields with default value and click Create:

It will take few minutes to finish…

  1. Activate Cloud Shell:

  2. Download source code from Github(run command from cloud shell terminal):

    1
    git clone https://github.com/yanyuqu/video_analysis.git
  3. Create Deployment pods and Services in GKE:

    1
    2
    cd video_analysis
    kubectl create -f video-analysis.yaml
  4. Check the status of pods:

    1
    kubectl get pods
  5. Check the status of services:

    1
    kubectl get services
  6. After all pods are ready and you get external IP from services, you can view the app from below url:

    1
    http://{your-extenal-ip}:8000