Code Monkey home page Code Monkey logo

Comments (5)

wardviaene avatar wardviaene commented on August 14, 2024 1

There seems to be an open issue for that (CrunchyData/postgres-operator#1563). You can try to use a newer version of the postgres-operator:

kubectl create namespace pgo
kubectl create -f https://raw.githubusercontent.com/CrunchyData/postgres-operator/v4.4.1/installers/kubectl/postgres-operator.yml
kubectl wait --for=condition=complete --timeout=180s -n pgo job/pgo-deploy
./client-setup.sh

from kubernetes-course.

wardviaene avatar wardviaene commented on August 14, 2024

Hi Rashkur,

It's a timing issue. It might take a few seconds to deploy the secret. I just did a new commit to solve this issue, by adding a kubectl wait before doing ./client-setup in quickstart.sh.

from kubernetes-course.

rashkur avatar rashkur commented on August 14, 2024

there is another problem in the step pgo create cluster mycluster:

kubectl describe pod mycluster-backrest-shared-repo-6b5857c66d-2k557 -n pgo                                                                                                                                                                           [0]
Name:           mycluster-backrest-shared-repo-6b5857c66d-2k557
Namespace:      pgo
Priority:       0
Node:           <none>
Labels:         name=mycluster-backrest-shared-repo
                pg-cluster=mycluster
                pg-pod-anti-affinity=preferred
                pgo-backrest-repo=true
                pod-template-hash=6b5857c66d
                service-name=mycluster-backrest-shared-repo
                vendor=crunchydata
Annotations:    <none>
Status:         Pending
IP:             
IPs:            <none>
Controlled By:  ReplicaSet/mycluster-backrest-shared-repo-6b5857c66d
Containers:
  database:
    Image:      registry.developers.crunchydata.com/crunchydata/pgo-backrest-repo:centos7-4.3.2
    Port:       2022/TCP
    Host Port:  0/TCP
    Requests:
      memory:  48Mi
    Environment:
      PGBACKREST_STANZA:           db
      SSHD_PORT:                   2022
      PGBACKREST_DB_PATH:          /pgdata/mycluster
      PGBACKREST_REPO_PATH:        /backrestrepo/mycluster-backrest-shared-repo
      PGBACKREST_PG1_PORT:         5432
      PGBACKREST_LOG_PATH:         /tmp
      PGBACKREST_PG1_SOCKET_PATH:  /tmp
      PGBACKREST_DB_HOST:          mycluster
    Mounts:
      /backrestrepo from backrestrepo (rw)
      /sshd from sshd (ro)
Conditions:
  Type           Status
  PodScheduled   False 
Volumes:
  sshd:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  mycluster-backrest-repo-config
    Optional:    false
  backrestrepo:
    Type:        PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:   mycluster-pgbr-repo
    ReadOnly:    false
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age        From               Message
  ----     ------            ----       ----               -------
  Warning  FailedScheduling  <unknown>  default-scheduler  Failed to bind volumes: provisioning failed for PVC "mycluster-pgbr-repo"
  Warning  FailedScheduling  <unknown>  default-scheduler  Failed to bind volumes: provisioning failed for PVC "mycluster-pgbr-repo"
% kubectl get pvc -n pgo                                                                                                                                                                                                                                [0]
NAME                  STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS    AGE
mycluster             Pending                                      kops-ssd-1-17   14m
mycluster-pgbr-repo   Pending                                      kops-ssd-1-17   14m
% kubectl describe pvc mycluster-pgbr-repo -n pgo                                                                                                                                                                                                       [0]
Name:          mycluster-pgbr-repo
Namespace:     pgo
StorageClass:  kops-ssd-1-17
Status:        Pending
Volume:        
Labels:        pg-cluster=mycluster
               pgremove=true
               vendor=crunchydata
Annotations:   volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/aws-ebs
               volume.kubernetes.io/selected-node: ip-172-20-43-44.eu-west-1.compute.internal
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
Mounted By:    mycluster-backrest-shared-repo-6b5857c66d-2k557
Events:
  Type     Reason                Age                   From                         Message
  ----     ------                ----                  ----                         -------
  Normal   WaitForFirstConsumer  7m4s (x15 over 14m)   persistentvolume-controller  waiting for first consumer to be created before binding
  Warning  ProvisioningFailed    2m34s (x13 over 14m)  persistentvolume-controller  Failed to provision volume with StorageClass "kops-ssd-1-17": invalid AccessModes [ReadWriteMany]: only AccessModes [ReadWriteOnce] are supported

from kubernetes-course.

TauqeerAhmad104 avatar TauqeerAhmad104 commented on August 14, 2024

Can you please write how did you create secrets? I faces first secrets issue and I created with this command
kubectl create secret docker-registry pgo.tls -n pgo --docker-server='https://index.docker.io/v1/' --docker-username='tauqeerdocker' --docker-email='[email protected]' --docker-password='Letstest'
Now I see this error

error: error executing template "{{ .data.username | base64decode }}:{{ .data.password | base64decode }}": template: output:1:20: executing "output" at <base64decode>: invalid value; expected string
error: error executing template "{{ index .data \"tls.crt\" | base64decode }}": template: output:1:27: executing "output" at <base64decode>: invalid value; expected string
error: error executing template "{{ index .data \"tls.key\" | base64decode }}": template: output:1:27: executing "output" at <base64decode>: invalid value; expected string

from kubernetes-course.

wardviaene avatar wardviaene commented on August 14, 2024

You don't have to create the secrets yourself. The operator is going to create the secrets and you can use kubectl get to extract the secrets. Since this issue, pgo has been upgraded so the original issue has been resolved.

from kubernetes-course.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.