-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
en: improve GKE cloud shell docs #527
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,25 +98,17 @@ If you see `Ready` for all nodes, congratulations! You've set up your first Kube | |
TiDB Operator uses [Custom Resource Definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions) to extend Kubernetes. Therefore, to use TiDB Operator, you must first create the `TidbCluster` CRD. | ||
|
||
```shell | ||
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/crd.yaml && \ | ||
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/v1.1.2/manifests/crd.yaml && \ | ||
kubectl get crd tidbclusters.pingcap.com | ||
``` | ||
|
||
After the `TidbCluster` CRD is created, install TiDB Operator in your Kubernetes cluster. | ||
|
||
1. Install TiDB Operator: | ||
|
||
```shell | ||
kubectl create namespace tidb-admin | ||
helm install --namespace tidb-admin tidb-operator pingcap/tidb-operator --version v1.1.0 | ||
kubectl get po -n tidb-admin -l app.kubernetes.io/name=tidb-operator | ||
``` | ||
|
||
2. Create the `pd-ssd` StorageClass: | ||
|
||
``` shell | ||
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/gke/persistent-disk.yaml | ||
``` | ||
```shell | ||
kubectl create namespace tidb-admin | ||
helm install --namespace tidb-admin tidb-operator pingcap/tidb-operator --version v1.1.2 | ||
kubectl get po -n tidb-admin -l app.kubernetes.io/name=tidb-operator | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to install
|
||
|
||
## Deploy the TiDB cluster | ||
|
||
|
@@ -201,15 +193,15 @@ kubectl -n demo edit tc basic | |
|
||
## Access the Grafana dashboard | ||
|
||
To access the Grafana dashboards, you can forward a port from the Cloud Shell to the Grafana service in Kubernetes. (Cloud Shell already uses port 3000 so we use port 3003 in this example instead.) | ||
To access the Grafana dashboards, you can forward a port from the Cloud Shell to the Grafana service in Kubernetes. (Cloud Shell already uses port 3000 so we use port 8080 in this example instead.) | ||
|
||
To do so, use the following command: | ||
|
||
```shell | ||
kubectl -n demo port-forward svc/basic-grafana 3003:3000 &>/tmp/pf3003.log & | ||
kubectl -n demo port-forward svc/basic-grafana 8080:3000 &>/tmp/pf8080.log & | ||
``` | ||
|
||
Open this URL to view the Grafana dashboard: <https://ssh.cloud.google.com/devshell/proxy?port=3003> . (Alternatively, in Cloud Shell, click on the Web Preview button and enter 3003 for the port. If not using Cloud Shell, point a browser to `localhost:3000`. | ||
Open this URL to view the Grafana dashboard: <https://ssh.cloud.google.com/devshell/proxy?port=8080> . (Alternatively, in Cloud Shell, click the Web Preview button on the upper right corner and change the port to 8080 if necessary. If not using Cloud Shell, point a browser to `localhost:8080`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
The default username and password are both "admin". | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install the same version as the tidb-operator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this very much, because it means we have to remember to update this every time we have a new release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we should update this but the tutorial still work even if we forget