Test your Application in the Kubernetes Setup on the Google Cloud Platform
Before you begin
- Google Cloud account with a project and cluster
- Google Cloud SDK
- Kubectl
- Procedure
- From a terminal, run these commands:
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-soap-jms-app gcr.io/<your project name>/bwce-soap-jms-app
- Push your application image to Google Container Registry.
gcloud docker push gcr.io/<your project name>/bwce-soap-jms-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 format:gcr.io/<your gcloud project name>/<image name>
- Navigate to the samples directory where the manifest file is present and run the following command to create the service:
kubectl create -f manifest.yml
- To check that application is started successfully, run the following command
kubectl logs <pod name>
Result If the application deploys successfully, you can see a similar output in the console log.
13:49:06.733 INFO [Framework Event Dispatcher: Equinox Container: 608aaa95-52d7-0015-1f90-d3fd61937bf8] com.tibco.thor.frwk.Application - Started by BusinessStudio, ignoring .enabled settings. 13:49:11.962 INFO [bwEngThread:In-Memory Process Worker-6] c.t.b.p.g.L.t.b.s.b.s.j.Z.Log - Output of getCityInfo : 61801 Urbana Illinois Urbana, Illinois, United States 40.11 88.207 Output of getCityDistance : Distance between two cities is : 4 miles. 61801 61820 Urbana Champaign Illinois Illinois Urbana, Illinois, United States Champaign, Illinois, United States