Coder Social home page Coder Social logo

Comments (8)

DevOpsRoot avatar DevOpsRoot commented on July 22, 2024 1

Thank you, i will try with an EBS and give you the result in one hour @aledbf

from kubernetes-ingress-controller.

aledbf avatar aledbf commented on July 22, 2024

@DevOpsRoot please check the reason of the error running kubectl describe pod -n kong postgres-0

from kubernetes-ingress-controller.

DevOpsRoot avatar DevOpsRoot commented on July 22, 2024
Namespace:      default
Node:           <none>
Labels:         app=postgres
                controller-revision-hash=postgres-9b84458c9
Annotations:    kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"postgres","uid":"a5bd0268-47c1-11e8-a212-06793c4cb7fe","apiVers...
Status:         Pending
IP:             
Controlled By:  StatefulSet/postgres
Containers:
  postgres:
    Image:  postgres:9.5
    Port:   5432/TCP
    Environment:
      POSTGRES_USER:      kong
      POSTGRES_PASSWORD:  kong
      POSTGRES_DB:        kong
      PGDATA:             /var/lib/postgresql/data/pgdata
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-6wc75 (ro)
Conditions:
  Type           Status
  PodScheduled   False 
Volumes:
  datadir:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  datadir-postgres-0
    ReadOnly:   false
  default-token-6wc75:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-6wc75
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.alpha.kubernetes.io/notReady:NoExecute for 300s
                 node.alpha.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age               From               Message
  ----     ------            ----              ----               -------
  Warning  FailedScheduling  1s (x7 over 33s)  default-scheduler  PersistentVolumeClaim is not bound: "datadir-postgres-0"

Thank you @aledbf i'm a nood 😵

from kubernetes-ingress-controller.

aledbf avatar aledbf commented on July 22, 2024

@DevOpsRoot are you running in baremetal? It seems you cannot create Persistent Volumes

from kubernetes-ingress-controller.

DevOpsRoot avatar DevOpsRoot commented on July 22, 2024

@aledbf i'm running that in an ec2 instance

from kubernetes-ingress-controller.

aledbf avatar aledbf commented on July 22, 2024

@DevOpsRoot ok, that should work OOTB.
Please replace this lines with

          volumeMounts:
            - mountPath: /var/lib/postgresql/data
              name: pg-data
      volumes:
        - name: pg-data
          emptyDir: {}

to get this working. Please keep in mind you will lose the data if the postgresql pod dies.

Please get help in the rancher community about why the PVC is not being created.

from kubernetes-ingress-controller.

aledbf avatar aledbf commented on July 22, 2024

Maybe you should follow https://rancher.com/docs/rancher/v1.5/en/kubernetes/storage/#persistent-volumes---ebs

from kubernetes-ingress-controller.

aledbf avatar aledbf commented on July 22, 2024

Closing. Please reopen if you still have issues after fixing the PVC issue

from kubernetes-ingress-controller.

Related Issues (20)

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.