How to deploy to a Kubernetes Cluster on Google Cloud using a managed DBMS on Google Cloud SQL?

3/5/2018

According to the documentation found here, I followed these steps:

  1. Created and Published the 3 Docker images by building them and publishing them correctly to my Docker registry on Google Container Registry
  2. Created a Kubernetes clusters with 3 nodes on Google Cloud Platform
  3. Created a SQL Instance on Google Cloud Platform using PostgreSQL Version 9.6
  4. Installed locally Kubernetes gcloud components install kubectl
  5. Run helm .api/helm/api update

At the end, I run locally this command and get the following error:

helm install --name api ./api/helm/api \
    --set php.repository=eu.gcr.io/my_projet_id/php \
    --set nginx.repository=eu.gcr.io/my_project_id/nginx \
    --set secret=mySecret \
    --set postgresql.postgresPassword=myPostgresPassword \
    --set postgresql.persistence.enabled=true \
    --set corsAllowUrl='^https?://[a-z\]*\.my-domain.io
#x27;
\ --set postgresql.enabled=false \ --set postgresql.url=pgsql://my_db_user:my_db_user_password@ip_sql_instance/my_db_name?serverVersion=9.6 Error: release api failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:default" cannot get namespaces in the namespace "default": Unknown user "system:serviceaccount:kube-system:default"

When I run kubectl get nodes I got a list with the 3 default nodes created by Google Cloud Platform when I created the cluster.

Am I executing the right helm install command?

Which namespace should I use?

-- Erik Saunier
api-platform.com
kubernetes
kubernetes-helm

0 Answers