googlearchive / k8s-service-catalog

[DEPRECATED] Commandline tool to manage Service Catalog lifecycle and GCP Service Broker atop Kubernetes Cluster
Apache License 2.0
69 stars 31 forks source link

sc add-gcp-broker states "The Service Broker has been added successfully." ,however it is not created successfully. #227

Closed mart3051 closed 5 years ago

mart3051 commented 5 years ago

Steps to recreate:- 1.kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value account) Got clusterrolebinding.rbac.authorization.k8s.io/cluster-admin-binding created 2.sc check Got the expected result Dependency check passed. You are good to go. 3.sc install O/p Service Catalog installed successfully

  1. kubectl get deployment -n service-catalog O/p NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE apiserver 1 1 1 1 2m controller-manager 1 1 1 1 2m etcd-cluster-backup-sidecar 1 1 1 1 2m etcd-operator 1 1 1 1 3m 5.sc add-gcp-broker O/p using project: kubeservicebroker27 enabling a GCP API: servicebroker.googleapis.com enabling a GCP API: bigquery-json.googleapis.com enabling a GCP API: bigtableadmin.googleapis.com enabling a GCP API: ml.googleapis.com enabling a GCP API: pubsub.googleapis.com enabling a GCP API: spanner.googleapis.com enabling a GCP API: sqladmin.googleapis.com enabling a GCP API: storage-api.googleapis.com enabled required APIs: servicebroker.googleapis.com bigquery-json.googleapis.com bigtableadmin.googleapis.com ml.googleapis.com pubsub.googleapis.com spanner.googleapis.com sqladmin.googleapis.com storage-api.googleapis.com generated the key at: /tmp/service-catalog-gcp290646345/key.json Broker "default", already exists The Service Broker has been added successfully. 6.kubectl describe clusterservicebrokers/gcp-broker O/p `Name: gcp-broker Namespace:
    Labels: Annotations: kubectl.kubernetes.io/last-applied-configuration: {"apiVersion":"servicecatalog.k8s.io/v1beta1","kind":"ClusterServiceBroker","metadata":{"annotations":{},"name":"gcp-broker"},"spec":{"aut... API Version: servicecatalog.k8s.io/v1beta1 Kind: ClusterServiceBroker Metadata: Creation Timestamp: 2019-03-11T11:57:33Z Finalizers: kubernetes-incubator/service-catalog Generation: 1 Resource Version: 3 Self Link: /apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers/gcp-broker UID: dafb98db-43f4-11e9-8102-0a580a24001a Spec: Auth Info: Bearer: Secret Ref: Name: gcp-svc-account-secret Namespace: google-oauth Relist Behavior: Duration Relist Duration: 15m0s Relist Requests: 0 URL: https://servicebroker.googleapis.com/v1beta1/projects/kubeservicebroker27/brokers/default Status: Conditions: Last Transition Time: 2019-03-11T11:57:33Z Message: Error fetching catalog. Error getting broker auth credentials: secrets "gcp-svc-account-secret" not found Reason: ErrorFetchingCatalog Status: False Type: Ready Reconciled Generation: 0 Events: Type Reason Age From Message

    Warning ErrorGettingAuthCredentials 18s (x13 over 40s) service-catalog-controller-manager Error getting broker auth credentials: secrets "gcp-svc-account-secret" not found`

Step 5 o/p is not inline to Step 6. Memory is also good. Expectation:-Step 5 should give success only if service broker is created successfully. Moreover the reason for absence of gcp-svc-account-secret is not apparent.

Additional details

kubectl top nodes O/p NAME CPU(cores) CPU% MEMORY(bytes) MEMORY% gke-mcsbcluster-default-pool-7cc9386e-zqh1 139m 14% 883Mi 33%

sc version O/p sc version 0.1.1 linux/amd64

mart3051 commented 5 years ago

My bad it was due to resource crunch. My cluster had only one node and auto scaling disabled . Enabled the auto scaling and made max size=3 and the google auth pod which was not getting scheduled and had caused the issue got scheduled and the issue got resolved