Skip to content

Instantly share code, notes, and snippets.



Last active May 18, 2018
What would you like to do?
Cloud Native PDX May 17 2018 Demo Commands
echo "OSBA (the broker for Azure) and service-catalog (the adapter for Kubernetes) are installed:"
helm list
echo "we also have a cool catalog of services we can create and hook up to:"
kubectl get clusterserviceclasses
echo "that's lame ... let's use svcat to see a friendly version:"
svcat get classes
echo "let's create a new wordpress deployment with our one-liner"
helm install azure/wordpress --name wp-live --namespace wp-live
echo "it's backed by a new Azure DB:"
svcat get instances -n wp-live
svcat get bindings -n wp-live
echo "the pod is also not started yet, because it's waiting for service-catalog to create the secret"
kubectl get pods -n wp-live
echo "the mysql creation is gonna take some time... let's use our WP deployment that I already spun up"
helm status wp
echo "notice the ServiceInstance and ServiceBinding. let's inspect those"
svcat get instances -n wp
svcat get bindings -n wp
echo "service-catalog spit out a secret that has the Azure MySQL creds:"
kubectl get secrets -n wp
echo "here's what is in the secret:"
kubectl get secret -n wp wp-wordpress-mysql-secret -o yaml
echo "and the pod is up and running"
kubectl get pods -n wp
echo "now let's see the WP deployment in action"
echo "get the IP of the load balancer"
IP=$(kubectl get svc -n wp wp-wordpress -o="jsonpath={.status.loadBalancer.ingress[0].ip}")
echo "now go to that IP"
open http://$IP
echo "now log into the admin page"
echo "note: the username/password is user/gg5cRlMN7y. that's for this install only. your install will have a new one"
open http://$IP/wp-admin
echo "create a new blog post, and enjoy!"
echo "check out for more details on all this tech :)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment