Our Kubernetes(K8s) test instance is hosted on Google Kubernetes Engine (GKE) . The instance was setup following the instructions found on Sourcegraph.com. To manage cloud resources and networking you must have access to Sourcegraph Google Cloud.
You can access the instance by visiting https://cse-k8s.sgdev.org/ (note that the URL reflects the old title we used on the team)
WARNING: You are encouraged to use the GKE UI to acccess logs if you are not familiar with Kubernetes and Kubectl. Please see here for the URL to access logs.
To access the CS-GKE instance and run Kubernetes commands locally, you’ll need to do the following:
- Before you begin, please make sure you have gcloud command-line tool and kubectl command-line tool installed on your local machine.
- Generate a kubeconfig entry by running the following command:
gcloud container clusters get-credentials beatrix-test --zone us-central1-c --project beatrix-test-overlay
- Make sure you can access your cluster with kubectl by running the following command:
kubectl config view
- You should now have access to the CS-GKE instance and run Kubernetes commands locally via kubectl.
WARNING: All your kubectl commands from now on are connected to the CS-GKE Kubernetes Instance.
We are currently deployed using this deploy-sourcegraph-cse-k8s repository. To upgrade the instance:
- Clone the deploy-sourcegraph-cse-k8s repository to your local machine.
cdinto the newly cloned directory.
- Make sure you are on the main branch:
git checkout master
- Get the latest version of Sourcegraph from the upstream by running
git fetch upstream
- Merge the latest update from upstream to the release branch:
git checkout release
- Choose which version you want to deploy from the Sourcegraph release page then run:
git merge $NEW_VERSION
- Video on how upgrading the instance looks like: https://drive.google.com/file/d/1aWsXejG2qeFKGrY5BGzpSabwGuU1gLM3/view