The mms app can be installed as k8s application in GKE.
Follow this doc to install mpdev
tool and application crd
make sure to replace this line gcloud_original_path=(--env "GCLOUD_ORIGINAL_PATH=$(readlink -f ${GCLOUD_CONFIG})")
with this line gcloud_original_path=(--env "GCLOUD_ORIGINAL_PATH=${GCLOUD_CONFIG}")
in the mpdev
file.
Make sure gke
cluster is created and gcr
container registry is authenticated by follow this doc
Make sure kubectl
is pointing to the newly created gke
cluster.
Follow this doc for better understading but need not create any files. This following files are already in this repo
# Set the registry to your project GCR repo.
export REGISTRY=gcr.io/$(gcloud config get-value project | tr ':' '/')
export APP_NAME=mms
docker build --tag $REGISTRY/$APP_NAME/deployer .
Push your built to the remote GCR so that your app running in your GKE cluster can access the image:
docker push $REGISTRY/$APP_NAME/deployer
Create a new namespace to cleanly deploy your app:
clone marketplace-k8s-app-tools repo
git clone git@github.com:GoogleCloudPlatform/marketplace-k8s-app-tools.git
cd marketplace-k8s-app-tools
kubectl create namespace test-ns
mpdev scripts/install \
--deployer=$REGISTRY/$APP_NAME/deployer \
--parameters='{"name": "test-deployment", "namespace": "test-ns"}'
You can see your application in GKE UI by following this link:
https://console.cloud.google.com/kubernetes/application?project=YOUR_PROJECT
All the code snipets and docs are copied from marketplace-k8s-app-tools