Cluster Startup 1. Watch tidb-cluster up and running watch kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }} -o wide 2. List services in the tidb-cluster kubectl get services --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }} {{- if .Values.tidb.passwordSecretName }} 3. Wait until tidb-initializer pod becomes completed watch kubectl get po --namespace {{ .Release.Namespace }} -l app.kubernetes.io/component=tidb-initializer 4. Get the TiDB password kubectl get secret -n {{ .Release.Namespace }} {{ .Values.tidb.passwordSecretName }} -ojsonpath='{.data.root}' | base64 --decode {{- end }} Cluster access * Access tidb-cluster using the MySQL client kubectl port-forward -n {{ .Release.Namespace }} svc/{{ template "cluster.name" . }}-tidb 4000:4000 & {{- if .Values.tidb.passwordSecretName }} mysql -h 127.0.0.1 -P 4000 -u root -D test -p {{- else }} mysql -h 127.0.0.1 -P 4000 -u root -D test Set a password for your user SET PASSWORD FOR 'root'@'%' = '{{ (randAlphaNum 10) }}'; FLUSH PRIVILEGES; {{- end -}} {{- if .Values.monitor.create }} * View monitor dashboard for TiDB cluster kubectl port-forward -n {{ .Release.Namespace }} svc/{{ template "cluster.name" . }}-grafana 3000:3000 Open browser at http://localhost:3000. The default username and password is admin/admin. If you are running this from a remote machine, you must specify the server's external IP address. {{- end -}}