-
Notifications
You must be signed in to change notification settings - Fork 500
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
docs on how to deploy tidb cluster with tidb-operator in minikube #451
Conversation
7567d48
to
22ab5aa
Compare
|
||
### Install minikube and start a Kubernetes cluster | ||
|
||
See [Installing Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) to install |
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.
Add minimal version requirement of minikube.
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.
done
Install helm tiller: | ||
|
||
``` | ||
helm init |
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.
Does the default service account of tiller have the right permission?
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, the tiller is deployed in kube-system namespace, default account of kube-system namespace in minikube has the correct permissions required by helm.
``` | ||
|
||
If it shows only the client version, `helm` cannot yet connect to the server. Use | ||
`kubectl` to see if any tiller pods are running. |
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.
Add the related command here.
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.
done, kubectl -n kube-system get pods -l app=helm
is added here.
docs/minikube-tutorial.md
Outdated
|
||
``` | ||
helm delete --purge tidb-cluster | ||
kubectl delete pvc -l app.kubernetes.io/managed-by=tidb-operator # clean old PVs |
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.
The PV reclaim policy is set to Retain
by tidb-operator by default. So delete PVC would not delete the related PV.
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.
kubectl get pv -l app.kubernetes.io/instance=tidb-cluster -o name | xargs -I {} kubectl patch {} -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}} # update reclaim policy of PVs used by tidb-cluster to Delete
is added here to update reclaim policy of PVs.
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.
Sorry, I clicked the Approve
button by mistake.
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.
LGTM
### Launch a TiDB cluster | ||
|
||
``` | ||
helm install charts/tidb-cluster --name tidb-cluster --set \ |
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.
It will be easier for the user to make helm changes if we have a minikube-values.yaml file. So just one option --values minikube-values.yaml
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.
Setting values from command line makes it easier for users to copy/paste. Besides, if use a separate values.yaml
, we have to keep it in sync with the default values.yaml
.
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.
minikube-values.yaml
would have just the values to override, it wouldn't contain all the values.
What problem does this PR solve?
fixes #447
What is changed and how it works?
Check https://github.com/cofyc/tidb-operator/blob/fix447/docs/minikube-tutorial.md
Check List
Tests
Code changes
Side effects
Related changes