Test Your Application in a Kubernetes Setup on the Google Cloud Platform
Before you begin
- Google Cloud account with a project and cluster
- Google Cloud SDK
- Kubectl
- Procedure
- Run these commands from a terminal window:
gcloud auth login gcloud config set project <your project name> gcloud config set container/cluster <your cluster name> gcloud container clusters get-credentials <your cluster name> --zone <your cluster zone name> kubectl get nodes
- Tag the application image created in the previous step.
docker tag bwce-jms-basic-app gcr.io/<your project name>/bwce-jms-basic-app
- Push your application image to Google Container Registry.
gcloud docker push gcr.io/<your project name>/bwce-jms-basic-app
- Confirm that the image is present in the Google Container Registry.
- Open the
manifest.yml
file and update the application image name. Ensure the image name follows the formatgcr.io/<your project name>/<image name>
- Type in the following command to create the service:
kubectl create -f manifest.yml
- To check that application has started successfully, run the following command:
kubectl logs <pod name>
- When the application is successfully deployed, the console will display messages such as:
00:48:07.621 INFO [bwEngThread:In-Memory Process Worker-1] c.t.b.p.g.L.t.b.s.p.j.B.m.LogBeforeReq - Sending The Request 00:48:07.645 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.L.t.b.s.p.j.B.m.LogAfterReply - ***** JMSRequestReply Received the Response ****==*** Sending A Reply Back For Request Message Received ***** 00:48:07.645 INFO [bwEngThread:In-Memory Process Worker-3] c.t.b.p.g.L.t.b.s.p.j.B.m.LogReceiveMessage - Received a Queue Message. Request = Sending a Request JMS Message. JMSMessageID = ID:EMS-SERVER.95A15639F97F35:1