The build procedures depend on PROJECT_ID
envionrment variable. Make sure it is set to YOUR project.
export PROJECT_ID=silver-ribbon-717
Check out the source code:
git clone https://github.com/evmin/camel-kubernetes-demo.git
##Gradle Wrapper
And setup the Gradle Wrapper:
cd camel-kubernetes-demo/gke-camel-template
gradle wrapper
The project is managed by Gradle, please refer to to the Tooling Section section for installation instructions.
# Authenticate for Google Cloud Registry push
gcloud docker -a
# Build docker image and push it to Google Container Registry
./gradlew dockerPush
# Generate Config in the build folder
./gradlew k8s
The last command - k8s - is a custom gradle build task that generates the Kubernetes Deployment YAML substituting the placeholders with actual project values.
kubectl create -f ./build/k8s-gke-camel-template-1.0.0-SNAPSHOT.yaml
Check the logs:
kubectl logs -f deploy/8s-gke-camel-template