EMAIL SUPPORT
dclessons@dclessons.comLOCATION
AFLAB Introduction to Kubernetes Engine
LAB: Introduction to Kubernetes Engine
Task:
- Login into the GCP Console.
- Starting Cloud Shell.
- Creating a basic python application.
- Building a docker image.
- Creating a cluster with 2 nodes and deploying the image.
- Testing the API.
Solution
Login to Google Console , and Click on Kubernetes Engine icon.
Click on the Cloud Shell icon in the top right corner as shown below
The Cloud Shell window will load at the bottom of your screen. Set the Project ID variable
to your assigned Project ID, which we will use later in the commands, instead of re-writing the project id every time, we can re-use using avariable. Replace <username> with the User name.
export project_id=<project_id>
export username=<username>
export app_name=gke-app
export cluster_name=dclessons-cluster
export deployment_name=dclessons-deployment
export service_name=gke-app-service
Enter the below command to create a directory named gke-app.
mkdir gke-app
Enter the below command to change the directory to your created directory.
cd gke-app
Enter the below command to create a file dclessonsapp.py and open it in a text editor.
Nano dclessonsapp.py
LEAVE A COMMENT
Please login here to comment.