Created
February 23, 2019 06:04
-
-
Save kasunbg/2624106bf3e10064418cd69acc3a0a05 to your computer and use it in GitHub Desktop.
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
# Instructions and command outputs when running helm install for apim-analytics | |
# Repo: https://github.com/wso2/kubernetes-apim/tree/master/helm/pattern-1 | |
kasun@gaje:~/k8s/kubernetes-apim/helm/pattern-1$ helm install --name wso2apim-with-analytics-rdbms-service -f mysql/values.yaml stable/mysql --namespace wso2 | |
NAME: wso2apim-with-analytics-rdbms-service | |
LAST DEPLOYED: Sat Feb 23 11:30:01 2019 | |
NAMESPACE: wso2 | |
STATUS: DEPLOYED | |
RESOURCES: | |
==> v1/Secret | |
NAME TYPE DATA AGE | |
wso2apim-with-analytics-rdbms-service-mysql Opaque 2 1s | |
==> v1/ConfigMap | |
NAME DATA AGE | |
wso2apim-with-analytics-rdbms-service-mysql-initialization 1 1s | |
wso2apim-with-analytics-rdbms-service-mysql-test 1 1s | |
==> v1/PersistentVolumeClaim | |
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE | |
wso2apim-with-analytics-rdbms-service-mysql Pending standard 1s | |
==> v1/Service | |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
wso2apim-with-analytics-rdbms-service-mysql ClusterIP 10.39.241.118 <none> 3306/TCP 1s | |
==> v1beta1/Deployment | |
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE | |
wso2apim-with-analytics-rdbms-service-mysql 1 1 1 0 1s | |
==> v1/Pod(related) | |
NAME READY STATUS RESTARTS AGE | |
wso2apim-with-analytics-rdbms-service-mysql-546b59c4f4-mg7x2 0/1 Pending 0 1s | |
NOTES: | |
MySQL can be accessed via port 3306 on the following DNS name from within your cluster: | |
wso2apim-with-analytics-rdbms-service-mysql.wso2.svc.cluster.local | |
To get your root password run: | |
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace wso2 wso2apim-with-analytics-rdbms-service-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo) | |
To connect to your database: | |
1. Run an Ubuntu pod that you can use as a client: | |
kubectl run -i --tty ubuntu --image=ubuntu:16.04 --restart=Never -- bash -il | |
2. Install the mysql client: | |
$ apt-get update && apt-get install mysql-client -y | |
3. Connect using the mysql cli, then provide your password: | |
$ mysql -h wso2apim-with-analytics-rdbms-service-mysql -p | |
To connect to your database directly from outside the K8s cluster: | |
MYSQL_HOST=127.0.0.1 | |
MYSQL_PORT=3306 | |
# Execute the following command to route the connection: | |
kubectl port-forward svc/wso2apim-with-analytics-rdbms-service-mysql 3306 | |
mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u root -p${MYSQL_ROOT_PASSWORD} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment