Skip to content

Instantly share code, notes, and snippets.

View mvillarrealb's full-sized avatar
🏠
Working from home

Marco Villarreal mvillarrealb

🏠
Working from home
View GitHub Profile
@mvillarrealb
mvillarrealb / init_tiller_helm.sh
Created April 7, 2019 02:48
Create tiller service account and links to kubernetes cluster
#Create tiller service account
kubectl -n kube-system create serviceaccount tiller
#Create cluster role binding for tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
#Initialize tiller
helm init --service-account tiller
@mvillarrealb
mvillarrealb / mysql.yaml
Created April 7, 2019 02:50
values.yaml for stable/mysql helm deployment test
---
mysqlUser: localUsr
mysqlPassword: localUsrxPwd#
mysqlRootPassword: FUnIsntSOmethingOneConsiderWhenBalancingTheUniverse
persistence:
enabled: true
storageClass: local-path
@mvillarrealb
mvillarrealb / install_mysql.sh
Created April 7, 2019 02:51
Install Mysql using helm
helm install --name local-database --namespace test -f mysql.yaml stable/mysql
@mvillarrealb
mvillarrealb / port_forward.sh
Created April 7, 2019 02:52
SImple port forward demo
#create a port forward wich exposes your mysql service to the local machine
kubectl port-forward svc/local-database-mysql 3306 -n test
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=FUnIsntSOmethingOneConsiderWhenBalancingTheUniverse
#Use mysql-client to connect to the host
mysql -h $MYSQL_HOST -P$MYSQL_PORT -u root -p$MYSQL_ROOT_PASSWORD