# % _____ %%% | __ \ ###%%%%%%%%%%%%* | |__) |__ _ __ ___ ___ _ __ __ _ ### ##%% %%%% | ___/ _ \ '__/ __/ _ \| '_ \ / _` | #### ##% %%%% | | | __/ | | (_| (_) | | | | (_| | ### #### %%% |_| \___|_| \___\___/|_| |_|\__,_| ,((### ### %%% _ _ _____ _ (((( (### #### %%%% | | / _ \ / ____| | | ((( ((# ###### | | _| (_) |___ | (___ __ _ _ _ __ _ __| | (((( (((# #### | |/ /> _ >> https://percona.com/k8s <<< Percona Server for MongoDB cluster is deployed now. Get the username and password: ADMIN_USER=$(kubectl -n {{ .Release.Namespace }} get secrets {{ include "psmdb-database.fullname" . }}-secrets -o jsonpath="{.data.MONGODB_USER_ADMIN_USER}" | base64 --decode) ADMIN_PASSWORD=$(kubectl -n {{ .Release.Namespace }} get secrets {{ include "psmdb-database.fullname" . }}-secrets -o jsonpath="{.data.MONGODB_USER_ADMIN_PASSWORD}" | base64 --decode) Connect to the cluster: {{- if .Values.sharding.enabled }} kubectl run -i --rm --tty percona-client --image=percona/percona-server-mongodb:5.0 --restart=Never \ -- mongo "mongodb://${ADMIN_USER}:${ADMIN_PASSWORD}@{{ include "psmdb-database.fullname" . }}-mongos.{{ .Release.Namespace }}.svc.cluster.local/admin?ssl=false" {{- else }} kubectl run -i --rm --tty percona-client --image=percona/percona-server-mongodb:5.0 --restart=Never \ -- mongo "mongodb+srv://${ADMIN_USER}:${ADMIN_PASSWORD}@{{ include "psmdb-database.fullname" . }}-{{ (index .Values.replsets 0).name }}.{{ .Release.Namespace }}.svc.cluster.local/admin?replicaSet=rs0&ssl=false" {{- end }}