Kubernetes on GCP
Context
The purpose of this page is to describe how to create the necessary infrastructure to deploy Vectice on a Kubernetes cluster in GCP, followed by instructions to deploy the Vectice software
1. Understanding prerequisites
Infrastructure requirements
# | Requirement | Notes or details |
Note: Within the same VPC | ||
1 | Security Groups | Port 443 (HTTPS) 3128 Outbound (pip install) SMTP Port (e.g 2525) |
2 | Kubernetes Cluster | v1.16+ deployed 2 nodes with e2-standard-4 |
3 | GCS Bucket | In the same region |
4 | Managed PostgreSQL | 13.x Cloud SQL instance |
Other requirements
# | Requirement | Notes or Details |
5 | Domain Name | Example: https://vectice.my-company.com |
6 | SSL Certificate | Must be associated with the domain name above Self-signed certificates are not recommended |
Deployment environment with the following tools: | ||
7 | Helm v3 | |
8 | Kubectl | |
9 | Gcloud | |
10 | Gsutil | |
11 | Openssl |
2. How to provision the infrastructure
You have two ways to create the infrastructure necessary for running Vectice.
Provisioning via Terraform (with Terragrunt wrapper)
Expected time: 40 minutes
Steps:
Complete instructions, including the Terraform script, are found in the package your Vectice account team provided you. Contact support@vectice.com if you require assistance.
Provisioning via GCP console
Expected time: 2 hours
Steps:
Create a VPC, or reuse an existing one
PostgreSQL Instance creation, see Appendix 1: Creating the SQL Instance
Service account role and Bucket creation, see Appendix 2: Creating the Bucket and Service Account
Kubernetes cluster creation, see Appendix 3: Cluster Creation
3. How to deploy the Vectice application
The provisioning of Vectice on Kubernetes will happen in 4 steps:
Step 1: Connect to the cluster and create the Vectice namespace
Step 2: Install the Cert Manager
Step 3: Create secrets for Ingress and Docker image retriever
Step 4: Install the Vectice stack
For any questions or assistance with deployment, please reach out to support@vectice.com
Step 1: Connect to the cluster and create the Vectice namespace
First, define the variables for the next steps and retrieve connections from your deployment machine. Below, sample values are provided in between brackets
The expected output should look like this:
Next, test the connection:
The expected output should look like this:
Finally, create the Vectice namespace where applications will be deployed:
Step 2: Install the Cert Manager
Next, install the cert-manager and cert-manager-csi-driver applications on the cluster.
Cert-manager is used to implement SSL for internal communication between Vectice pods, Cert-manager-csi-driver will attach a CSI volume containing the certificates to the Vectice pods
Next, generate a custom Certificate Authority and create its associated secret:
Step 3: Create secrets for Ingress and Docker image retriever
First, create a self-signed certificate using the following command, replacing the item highlighted with your own Common Name (CN). Below, sample values are provided between brackets
Then, use the command below to install your certificates in the cluster
To deploy the software, you can retrieve the necessary Docker images directly from the Vectice Registry. Alternatively, if you prefer, we can provide the images via an alternative delivery method that would be defined together. If your Kubernetes cluster is configured to pull images directly from the Vectice Registry, navigate to the location of the “vectice-image-puller.json” file. This is found in the package your Vectice account team provided you. Contact support@vectice.com if you require assistance. Use this file to create the secret that will be used to pull the docker images from the Vectice GAR registry.
Step 4: Install the Vectice stack
From the package your account team provided, untar helm vectice chart and create myvalues.yml
from values.yml
file. Below, sample values are provided between brackets.
Please refer to the configuration page and comments inside the file myvalues.yaml
to customize values.
Next, fill in the values in myvalues.yaml
according to your environment deployment, and deploy Vectice global objects using Helm:
Once this is done, retrieve the Vectice Ingress IP. Note: this might take up to 5 minutes to appear:
The expected output should look like this, below are example values:
Finally, add the A record as a new entry in your DNS resolver.
Learn more about A DNS records.
In this example, the A record would look like below.
Last updated