This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adds the converted origin certficate | |
gcloud compute ssl-certificates create ingress-cert \ | |
--certificate ./certs/<DOMAIN>.pem \ | |
--private-key ./certs/<DOMAIN>.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ingress-service.yaml | |
--- | |
apiVersion: "extensions/v1beta1" | |
kind: "Ingress" | |
metadata: | |
name: "ingress" | |
annotations: | |
kubernetes.io/ingress.global-static-ip-name: "my-dev-ip" | |
ingress.gcp.kubernetes.io/pre-shared-cert: "ingress-cert" | |
spec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud compute addresses create my-dev-ip --global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# api-service.yaml | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: api | |
labels: | |
io.kompose.service: api | |
spec: | |
type: NodePort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl create -f api-service.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install `gsutil` and configure `gcloud` with the project | |
curl https://sdk.cloud.google.com | bash | |
exec -l $SHELL | |
gcloud init | |
<PROJECT_NAME> | |
# Create the path within the persistent volume to transfer the files to | |
mkdir -p $MODELS_PATH | |
gsutil rsync gs://$GCS_BUCKET $MODELS_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run `bash` within pod | |
kubectl exec -it <POD_NAME> -- /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get pods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsutil -m cp -r models gs://my-models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# api-deployment.yaml | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: api-deployment | |
spec: | |
selector: | |
matchLabels: | |
io.kompose.service: api |