Deployment Guide for Google Kubernetes Engine (GKE).
Katana ML, Andrej Baranovskij
-
Push Skipper images to Docker registry, this registry should be accessible from GKE
-
Open GKE Cloud Shell, follow GKE instructions in Kubernetes setup wizard
-
Install NGINX Ingress Controller for GKE
-
Clone Skipper repo
git clone https://github.com/katanaml/katana-skipper
- Edit rabbitmq/rabbit-statefulset.yaml file, change storageClassName to 'standard-rwo'
vim rabbitmq/rabbit-statefulset.yaml
- Edit api/api-ingress.yaml file, remove 'host' element to configure Ingress with GKE public IP
vim api/api-ingress.yaml
- There is no need to create Persistent Volume on GKE, it will be provisioned automatically by Volume Claim. Remove this line from kubectl-setup.sh:
kubectl apply -f services/trainingservice/trainingservice-pv.yaml
- Edit services/trainingservice/trainingservice-pvc.yaml, change it to support dynamic provisioning for Persistent Volume, remove storageClassName
vim services/trainingservice/trainingservice-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: training-service-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
- There is no need to create Persistent Volume on GKE, it will be provisioned automatically by Volume Claim. Remove this line from kubectl-setup.sh:
kubectl apply -f services/servingservice/servingservice-pv.yaml
- Edit services/servingservice/servingservice-pvc.yaml, change it to support dynamic provisioning for Persistent Volume, remove storageClassName
vim services/servingservice/servingservice-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: serving-service-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
- Serving service runs multiple Pods, we must assign all Pod instances to the same Kubernetes node, to make sure all instances can access Persistent Volume. Read more - Assigning Pods to Nodes
kubectl get nodes
kubectl label nodes <node-name> skipper=serving
kubectl get nodes --show-labels
- Add nodeSelector to servingservice-pod.yaml
nodeSelector:
skipper: serving
- Setup Kubernetes services:
./kubectl-setup.sh
- Skipper API endpoint URL
http://<Load Balancer IP>/api/v1/skipper/tasks/docs
Check Load Balancer IP:
Licensed under the Apache License, Version 2.0. Copyright 2020-2021 Katana ML, Andrej Baranovskij. Copy of the license.