---
# System prepended metadata

title: Cheat Sheet

---

# Cheat Sheet

```
$ kubectl port-forward svc/basic-tidb 4000:4000 --namespace=demo

$ kubectl port-forward svc/basic-grafana 3000:3000 --namespace=demo

$ kubectl port-forward svc/basic-pd 2379:2379 --namespace=demo

$ mysql -u root -P 4000 -h 127.0.0.1

$ kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/crd.yaml && \
kubectl get crd tidbclusters.pingcap.com

$ helm install pingcap/tidb-operator --name=tidb-operator --namespace=tidb-admin --version=v1.1.0-rc.2.p1 -f values-tidb-operator.yaml

$ helm repo add pingcap https://charts.pingcap.org/

$ helm init --upgrade

$ kubectl get po -n tidb-admin -l app.kubernetes.io/name=tidb-operator

$ hack/kind-cluster-build.sh --k8sVersion v1.14.6
```