This is a sample SpringBoot application that performs Geo Bounded queries against an Elastic Search instance and plots the data on a map interactively. This application can be run on a workstation or in a cloud environment such as Cloud Foundry. In this example, I will show how to deploy the application on a running Cloud Foundry instance.
In order to install the PKS CLI please follow these instructions: https://docs.pivotal.io/runtimes/pks/1-3/installing-pks-cli.html. Note, you will need to register with network.pivotal.io in order to download the CLI.
Alternatively, you can grab it here.
You can install the kubectl CLI from PivNet as well, or grab it here https://network.pivotal.io/products/pivotal-container-service
What you download is the executable. After downloading, rename the file to kubectl
, move it to where you like and make sure it’s in your path.
For reference, here are some other ways to install, https://kubernetes.io/docs/tasks/tools/install-kubectl
You will need to retrieve the cluster credentials from PKS. First login using the the PKS credentials that were provided to you for this lab exercise.
pks login -a api.ws.pks101.com -u USERNAME -p PASSWORD -k
Now you can retrive your Kubernetes cluster credentials. Please use the cluster name that was provided to you for this lab exercise.
pks get-credentials CLUSTER-NAME
Ensure that you can access the API Endpoints on the Master
kubectl cluster-info
You should see something similar to the following:
Kubernetes master is running at https://wscluster.ws.pks101.com:8443
Heapster is running at https://wscluster.ws.pks101.com:8443/api/v1/namespaces/kube-system/services/heapster/proxy
KubeDNS is running at https://wscluster.ws.pks101.com:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubernetes-dashboard is running at https://wscluster.ws.pks101.com:8443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy
monitoring-influxdb is running at https://wscluster.ws.pks101.com:8443/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy
To access Dashboard from your local workstation you must create a secure channel to your Kubernetes cluster. Run the following command:
kubectl proxy
Now access Dashboard at:
When prompted for choosing either the Kubeconfig or Token, choose Kubeconfig. You will need to browse to HOME-DIR/.kube and select the file named config
.
On Windows, you may want to use Firefox or Chrome as Explorer has some issues.
If for some reason you are not able to pick the config file, you can also use Token. Find id-token
of your user from HOME-DIR/.kube/config
file and copy paste the token.