gke quickstart.sh install error
I download quickstart.sh to my gke home/users/tmp folder from project, and I got list error messages after this operation.
Are you ready to continue the install?[Yn]
Deploying the operator to the Kubernetes cluster...
CO_IMAGE_PREFIX here is crunchydata
Error from server (NotFound): secrets "pgo-auth-secret" not found
Error from server (NotFound): configmaps "pgo-config" not found
Error from server (NotFound): services "postgres-operator" not found
Error from server (NotFound): deployments.extensions "postgres-operator" not found
Error from server (NotFound): deployments.extensions "crunchy-scheduler" not found
Error from server (NotFound): roles.rbac.authorization.k8s.io "pgo-role" not found
ERROR: pgo-role was not found in namespace
my install command process
$ ./quickstart.sh
CO_BASEOS is set to centos7
centos7 is the baseos entered
CO_VERSION is set to 3.4.0
3.4.0 is the version entered
Which namespace do you want to install into? [demo]pgo-operator
setting CO_NAMESPACE=pgo-operator
pgo-operator is the namespace entered
CCP_IMAGE_TAG is set to centos7-10.6-2.2.0
centos7-10.6-2.2.0 is the CCP image tag entered
CO_IMAGE_PREFIX is set to crunchydata
CCP_IMAGE_PREFIX is set to crunchydata
crunchydata is the CO image prefix entered
crunchydata is the CCP image prefix entered
Is this a 'kube' install or an 'ocp' install?[kube]
Testing for dependencies...
Testing kubectl connection...
NAME STATUS AGE
default Active 3h
kube-public Active 3h
kube-system Active 3h
Using current context gke_sturdy-hangar-223902_asia-east1-b_standard-cluster-1
Connected to cluster
The postgres-operator will be installed into the current namespace which is [].
Do you want to continue the installation? [Yn] y
Setting environment variables in /home/botcenter002/.bashrc...
Setting up installation directory...
Installing pgo server configuration...
Installing pgo client...
The available storage classes on your system:
NAME PROVISIONER AGE
standard (default) kubernetes.io/gce-pd 3h
Enter the name of the storage class to use: standard
Setting up pgo storage configuration for the selected storageclass...
Setting up pgo client authentication...
For pgo bash completion you will need to install the bash-completion package.
Do you want to deploy the operator? [Yn] y
Installing the CRDs and Kube RBAC for the operator to
the Kubernetes cluster.
NOTE: this step requires cluster-admin privs...
in another terminal window, log in as a cluster-admin and
execute the following command...
export CO_CMD=kubectl
export CO_NAMESPACE=
export PATH=/home/botcenter002/gopath/bin:/google/gopath/bin:/google/google-cloud-sdk/bin:/usr/local/go/bin:/opt/gradle/bin:/opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/nvm/versions/node/v8.9.4/bin:/google/go_appengine:/google/google_appengine:/home/botcenter002/odev/bin:/home/botcenter002/odev/bin:/home/botcenter002/odev/bin:/home/botcenter002/odev/bin
/home/botcenter002/odev/src/github.com/crunchydata/postgres-operator/deploy/install-rbac.sh
Are you ready to continue the install?[Yn]
Deploying the operator to the Kubernetes cluster...
CO_IMAGE_PREFIX here is crunchydata
Error from server (NotFound): secrets "pgo-auth-secret" not found
Error from server (NotFound): configmaps "pgo-config" not found
Error from server (NotFound): services "postgres-operator" not found
Error from server (NotFound): deployments.extensions "postgres-operator" not found
Error from server (NotFound): deployments.extensions "crunchy-scheduler" not found
Error from server (NotFound): roles.rbac.authorization.k8s.io "pgo-role" not found
ERROR: pgo-role was not found in namespace
Verify you ran install-rbac.sh
Installation complete.
At this point you can access the operator by using a port-forward command similar to:
kubectl port-forward 18443:8443
Run this in another terminal or in the background.
WARNING: For the postgres-operator settings to take effect, it is necessary to log out of your session and back in or reload your .bashrc file.
NOTE: In order to access the pgo CLI, place it within your PATH from its default location in /home/botcenter002/odev/bin/pgo.
How can I resolve this problem?
did you do the following step?
the Kubernetes cluster. NOTE: this step requires cluster-admin privs... in another terminal window, log in as a cluster-admin and execute the following command...
export CO_CMD=kubectl export CO_NAMESPACE= export PATH=/home/botcenter002/gopath/bin:/google/gopath/bin:/google/google-cloud-sdk/bin:/usr/local/go/bin:/opt/gradle/bin:/opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/nvm/versions/node/v8.9.4/bin:/google/go_appengine:/google/google_appengine:/home/botcenter002/odev/bin:/home/botcenter002/odev/bin:/home/botcenter002/odev/bin:/home/botcenter002/odev/bin /home/botcenter002/odev/src/github.com/crunchydata/postgres-operator/deploy/install-rbac.sh
@jmccormick2001 I try again, thanks.
@jmccormick2001 I try to install again, and I got new error message in another command.
this is in another command
$ /home/botcenter002/odev/src/github.com/crunchydata/postgres-operator/deploy/install-rbac.sh
Sghtq0MYf74EVY8KdsFe5HgT3f+sLbHXFgpVAHURxjD5OyuFjj7z7o35JZuX3dQy0Ljg4+OHHLExqUbajCED5kkNZS9EE22o/HgzoV4OMaY+wswfags/vswnxt52kRmj4+OWuhjQw8RIiuuizmpShcHVebpIoBiHE=]]} ownerrules=[{[create] [authorization.k8s.io] [selfsubjectaccessreviews selfsubjectrulesreviews] [] []} {[get] [] [] [] [/api /api/* /apis /apis/* /healthz /openapi /openapi/* /swagger-2.0.0.pb-v1 /swagger.json /swaggerapi /swaggerapi/* /version /version/]}] ruleResolutionErrors=[]
serviceaccount "postgres-operator" created
rolebinding.rbac.authorization.k8s.io "pgo-role-binding" created
serviceaccount "pgo-backrest" created
rolebinding.rbac.authorization.k8s.io "pgo-backrest-role-binding" created
Error from server (Forbidden): error when creating "STDIN": roles.rbac.authorization.k8s.io "pgo-role" is forbidden: attempt to grant extra privileges: [{[*] [*] [*] [] []} {[*] [] [pods] [] []} {[*] [] [services] [] []} {[*] [] [endpoints] [] []} {[*] [] [persistentvolumeclaims] [] []} {[*] [] [events] [] []} {[*] [] [configmaps] [] []} {[*] [] [secrets] [] []} {[*] [apps] [deployments] [] []} {[*] [apps] [daemonsets] [] []} {[*] [apps] [replicasets] [] []} {[*] [apps] [statefulsets] [] []}] user=&{[email protected] [system:authenticated] map[user-assertion.cloud.google.com:[AK5xou9NNRzQDZwGB6QG2E4r3fcQc0nGJcWMM2paNsEXYCafoDqXOsUlWUOvituUdOpZFNHXdWSghtq0MYf74EVY8KdsFe5HgT3f+sLbHXFgpVAHURxjD5OyuFjj7z7o35JZuX3dQy0Ljg4+OHHLExqUbajCED5kkNZS9EE22o/HgzoV4OMaY+wswfags/vswnxt52kRmj4+OWuhjQw8RIiuuizmpShcHVebpIoBiHE=]]} ownerrules=[{[create] [authorization.k8s.io] [selfsubjectaccessreviews selfsubjectrulesreviews] [] []} {[get] [] [] [] [/api /api/* /apis /apis/* /healthz /openapi /openapi/* /swagger-2.0.0.pb-v1 /swagger.json /swaggerapi /swaggerapi/* /version /version/]}] ruleResolutionErrors=[]
Error from server (Forbidden): error when creating "STDIN": roles.rbac.authorization.k8s.io "pgo-backrest-role" is forbidden: attempt to grant extra privileges: [{[get] [] [pods] [] []} {[list] [] [pods] [] []} {[create] [] [pods/exec] [] []}] user=&{[email protected] [system:authenticated] map[user-assertion.cloud.google.com:[AK5xou9NNRzQDZwGB6QG2E4r3fcQc0nGJcWMM2paNsEXYCafoDqXOsUlWUOvituUdOpZFNHXdWSghtq0MYf74EVY8KdsFe5HgT3f+sLbHXFgpVAHURxjD5OyuFjj7z7o35JZuX3dQy0Ljg4+OHHLExqUbajCED5kkNZS9EE22o/HgzoV4OMaY+wswfags/vswnxt52kRmj4+OWuhjQw8RIiuuizmpShcHVebpIoBiHE=]]} ownerrules=[{[create] [authorization.k8s.io] [selfsubjectaccessreviews selfsubjectrulesreviews] [] []} {[get] [] [] [] [/api /api/* /apis /apis/* /healthz /openapi /openapi/* /swagger-2.0.0.pb-v1 /swagger.json /swaggerapi /swaggerapi/* /version /version/]}] ruleResolutionErrors=[]
serviceaccount "scheduler-sa" created
Error from server (Forbidden): error when creating "STDIN": clusterroles.rbac.authorization.k8s.io "scheduler-sa" is forbidden: attempt to grant extra privileges: [{[get] [] [namespaces] [] []} {[list] [] [namespaces] [] []} {[watch] [] [namespaces] [] []} {[get] [] [pods] [] []} {[list] [] [pods] [] []} {[watch] [] [pods] [] []} {[get] [] [configmaps] [] []} {[list] [] [configmaps] [] []} {[watch] [] [configmaps] [] []} {[get] [] [deployments] [] []} {[list] [] [deployments] [] []} {[watch] [] [deployments] [] []} {[get] [] [secrets] [] []} {[list] [] [secrets] [] []} {[watch] [] [secrets] [] []} {[get] [batch] [jobs] [] []} {[list] [batch] [jobs] [] []} {[watch] [batch] [jobs] [] []} {[create] [batch] [jobs] [] []} {[update] [batch] [jobs] [] []} {[patch] [batch] [jobs] [] []} {[delete] [batch] [jobs] [] []} {[get] [extensions] [jobs] [] []} {[list] [extensions] [jobs] [] []} {[watch] [extensions] [jobs] [] []} {[create] [extensions] [jobs] [] []} {[update] [extensions] [jobs] [] []} {[patch] [extensions] [jobs] [] []} {[delete] [extensions] [jobs] [] []} {[get] [extensions] [deployments] [] []} {[list] [extensions] [deployments] [] []} {[watch] [extensions] [deployments] [] []} {[get] [apps] [deployments] [] []} {[list] [apps] [deployments] [] []} {[watch] [apps] [deployments] [] []} {[list] [] [] [] [/apis]} {[watch] [] [] [] [/apis]} {[create] [] [pods/exec] [] []}] user=&{[email protected] [system:authenticated] map[user-assertion.cloud.google.com:[AK5xou9NNRzQDZwGB6QG2E4r3fcQc0nGJcWMM2paNsEXYCafoDqXOsUlWUOvituUdOpZFNHXdWSghtq0MYf74EVY8KdsFe5HgT3f+sLbHXFgpVAHURxjD5OyuFjj7z7o35JZuX3dQy0Ljg4+OHHLExqUbajCED5kkNZS9EE22o/HgzoV4OMaY+wswfags/vswnxt52kRmj4+OWuhjQw8RIiuuizmpShcHVebpIoBiHE=]]} ownerrules=[{[create] [authorization.k8s.io] [selfsubjectaccessreviews selfsubjectrulesreviews] [] []} {[get] [] [] [] [/api /api/* /apis /apis/* /healthz /openapi /openapi/* /swagger-2.0.0.pb-v1 /swagger.json /swaggerapi /swaggerapi/* /version /version/]}] ruleResolutionErrors=[]
Error from server (Invalid): error when creating "STDIN": ClusterRoleBinding.rbac.authorization.k8s.io "scheduler-sa" is invalid: subjects[0].namespace: Required value
I try to get some infomation about pgo and get this response.
gke kube serviceaccounts
$ kubectl get serviceaccounts
NAME SECRETS AGE
default 1 11h
pgo-backrest 1 2m
postgres-operator 1 2m
scheduler-sa 1 2m
gke kube clusterrolebinding pgo
kubectl get clusterrolebinding | grep pgo
pgopclusterbinding 3m
pgopclusterbindingcrd 3m
gke kube crd
$ kubectl get crd
NAME AGE
backendconfigs.cloud.google.com 11h
pgbackups.cr.client-go.k8s.io 8h
pgclusters.cr.client-go.k8s.io 8h
pgingests.cr.client-go.k8s.io 8h
pgpolicies.cr.client-go.k8s.io 8h
pgreplicas.cr.client-go.k8s.io 8h
pgtasks.cr.client-go.k8s.io 8h
pgupgrades.cr.client-go.k8s.io 8h
scalingpolicies.scalingpolicy.kope.io 11h
@jmccormick2001 I resolve this problem by add GCP RBAC auth on Kubernetes cluster.
To declare self gmail address is cluster-admin role.
https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control
USER_ACCOUNT is your gmail address
$ kubectl create clusterrolebinding cluster-admin-binding \
--clusterrole cluster-admin --user [USER_ACCOUNT]
I recommend add this precautions into Quickstart Installation (GKE) install steps.
documentation and quickstart are being updated for Release 3.5.