You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/deploy/kubernetes/operations.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -288,17 +288,17 @@ The following instructions apply only if you are restoring your databases into a
288
288
289
289
If you are restoring a previously running environment, see the instructions for [restoring a previously running deployment](#restoring-sourcegraph-databases-into-an-existing-environment)
290
290
291
-
A. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into the root of the `deploy-sourcegraph` directory
291
+
A. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into your deployment directory
292
292
293
-
B. Start the database services by running the following command from the root of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph)directory
293
+
B. Start the database services by running the following command from your deployment directory:
C. Copy the database files into the pods by running the following command from the root of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) directory
301
+
C. Copy the database files into the pods by running the following commands:
C. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into the root of the `deploy-sourcegraph` directory
358
+
C. Copy the database dump files (eg. `sourcegraph_db.out`, `codeintel_db.out` and `codeinsights_db.out`) into your deployment directory
E. Copy the database files into the pods by running the following command from the root of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) directory
368
+
E. Copy the database files into the pods by running the following commands:
Copy file name to clipboardExpand all lines: docs/admin/deploy/kubernetes/troubleshoot.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Run `kubectl get ingresses -A` to check if there is more than one ingress for `s
40
40
41
41
#### Error: error when creating "base/cadvisor/cadvisor.ClusterRoleBinding.yaml": subjects[0].namespace: Required value
42
42
43
-
Add `namespace: default` to the [base/cadvisor/cadvisor.ClusterRoleBinding.yaml](https://github.com/sourcegraph/deploy-sourcegraph/blob/master/base/cadvisor/cadvisor.ClusterRoleBinding.yaml) file under `subjects`.
43
+
This error occurs when using legacy deployment manifests. For modern deployments using deploy-sourcegraph-k8s, cadvisor is configured as a DaemonSet with a ServiceAccount and doesn't require a ClusterRoleBinding. If you encounter this error, ensure you're using the latest [deploy-sourcegraph-k8s](https://github.com/sourcegraph/deploy-sourcegraph-k8s) repository.
Copy file name to clipboardExpand all lines: docs/admin/deploy/kubernetes/upgrade.mdx
+1-55Lines changed: 1 addition & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,47 +76,7 @@ Apply the new manifests from the ouput file `cluster.yaml` to your cluster:
76
76
77
77
---
78
78
79
-
### Upgrade with Legacy Kubernetes
80
79
81
-
The following procedure is for performing a **standard upgrade** with Sourcegraph instances in versions **prior to `v4.5.0`**, or which **have not**[**migrated**](/admin/deploy/kubernetes/kustomize/migrate) and still use [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph).
82
-
83
-
**Step 1**: Merge the new version of Sourcegraph into your release branch.
84
-
85
-
```sh
86
-
cd$DEPLOY_SOURCEGRAPH_FORK
87
-
# get updates
88
-
git fetch upstream
89
-
# to merge the upstream release tag into your release branch.
90
-
git checkout release
91
-
# Choose which version you want to deploy from https://github.com/sourcegraph/deploy-sourcegraph/tags
92
-
git merge $NEW_VERSION
93
-
```
94
-
95
-
---
96
-
97
-
**Step 2**: Update your install script `kubectl-apply-all.sh`
98
-
99
-
By default, the install script `kubectl-apply-all.sh` applies our base manifests using [`kubectl apply` command](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply) with a variety of arguments specific to the layout of the [deploy-sourcegraph reference repository](https://github.com/sourcegraph/deploy-sourcegraph).
100
-
101
-
If you have specific commands that should be run whenever you apply your manifests, you should modify this script accordingly.
102
-
103
-
For example, if you use [overlays to make changes to the manifests](https://github.com/sourcegraph/deploy-sourcegraph/tree/master/overlays), you should modify this script to apply the manifests from the `generated cluster` directory instead.
104
-
105
-
---
106
-
107
-
**Step 3**: Apply the updates to your cluster.
108
-
109
-
```sh
110
-
$ ./kubectl-apply-all.sh
111
-
```
112
-
113
-
**Step 4**: Monitor the status of the deployment to determine its success.
114
-
115
-
```sh
116
-
$ kubectl get pods -o wide --watch
117
-
```
118
-
119
-
---
120
80
121
81
## Multi-version upgrades
122
82
@@ -129,7 +89,7 @@ To perform a multi-version upgrade via migrators [upgrade](/admin/updates/migrat
129
89
- Check the `Site Admin > Updates` page to determine [upgrade readiness](/admin/updates/#upgrade-readiness).
130
90
131
91
2.**Pull and merge upstream changes**:
132
-
- Follow the [standard legacy upgrade procedure](#upgrade-with-legacy-kubernetes) to pull and merge upstream changes from the version you are upgrading to to your `release` branch.
92
+
- Follow the [standard upgrade procedure](#upgrade-with-kubernetes-kustomize) to pull and merge upstream changes from the version you are upgrading to to your `release` branch.
133
93
134
94
3.**Update cluster.yaml and scale down non-database deployments and replicas**:
135
95
- In your cluster kustomization file (`instances/my-sourcegraph/kustomize.yaml`), uncomment the [multi-version-upgrade util](https://github.com/sourcegraph/deploy-sourcegraph-k8s/blob/main/instances/template/kustomization.template.yaml#L155). This will scale down all non-database deployments and statefulSets replicas to 0.
@@ -236,10 +196,6 @@ If you are rolling back more than a single version, then you must also [rollback
236
196
237
197
### Rollback with Kustomize
238
198
239
-
**For Sourcegraph version 4.5.0 and above, which have [migrated](/admin/deploy/kubernetes/kustomize/migrate) to [deploy-sourcegraph-k8s](https://github.com/sourcegraph/deploy-sourcegraph-k8s).**
240
-
241
-
For instances deployed using the [deploy-sourcegraph-k8s](https://github.com/sourcegraph/deploy-sourcegraph-k8s) repository:
**For Sourcegraph version prior to 4.5.0 using our legacy [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) manifests.**
255
-
256
-
For instances deployed using the old [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) repository:
257
-
258
-
```sh
259
-
$ ./kubectl-apply-all.sh
260
-
```
261
-
262
208
### Rollback with `migrator downgrade`
263
209
264
210
For rolling back a multiversion upgrade use the `migrator` [downgrade](/admin/updates/migrator/migrator-operations#downgrade) command. Learn mor in our [downgrade docs](/admin/updates/migrator/downgrading).
by [adding a rewrite rule](https://kubernetes.github.io/ingress-nginx/examples/rewrite/). You can also refer to the [ingress configuration examples](https://github.com/sourcegraph/deploy-sourcegraph-k8s/tree/main/examples/ingress-controller).
3. If MinIO is not deployed, create a fork of the [deploy-sourcegraph](https://github.com/sourcegraph/deploy-sourcegraph) repository and make sure you deploy MinIO (or blobstore in 3.4.2+).
26
-
27
-
25
+
3. If blobstore is not deployed, make sure you include the blobstore components in your Sourcegraph deployment. For modern Sourcegraph versions (3.4.2+), blobstore replaces MinIO.
0 commit comments