setup.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. # define rbac rules for tiller
  3. kubectl create -f rbac-config.yml
  4. helm init --service-account tiller
  5. # add bitnami helm charts
  6. helm repo add bitnami https://charts.bitnami.com/bitnami
  7. helm repo update
  8. # hit a snag where this was already here. don't know why.
  9. # also not sure what state my cluster was in when i ran this,
  10. # but it worked at least once.
  11. kubectl delete namespace kubeapps
  12. # install the chart
  13. helm install --name kubeapps --namespace kubeapps bitnami/kubeapps
  14. # configure the user account
  15. kubectl create serviceaccount kubeapps-operator
  16. kubectl create clusterrolebinding kubeapps-operator --clusterrole=cluster-admin --serviceaccount=default:kubeapps-operator
  17. # get the key to log in with
  18. kubectl get -n default secret $(kubectl get -n default serviceaccount kubeapps-operator -o jsonpath='{.secrets[].name}') -o jsonpath='{.data.token}' | base64 --decode
  19. # part 2
  20. # service catalog
  21. helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com
  22. helm install svc-cat/catalog --name catalog --namespace catalog