Git Product home page Git Product logo

Comments (6)

alexeyklyukin avatar alexeyklyukin commented on August 21, 2024

Hi Josh,

Kubectl edit pg cluster-name is how I often do this. I think there is also a replace or apply command that works on CRDs, but I don’t have access to a cluster to experiment with this right now.

from postgres-operator.

alexeyklyukin avatar alexeyklyukin commented on August 21, 2024

actually both kubectl apply and kubectl replace work on a CRD with a reasonably modern client (mine reports 1.7.6 as a version.)

from postgres-operator.

jberkus avatar jberkus commented on August 21, 2024

I tried apply on 1.8 and got the error that the manifest already existed. Will try replace.

from postgres-operator.

mobilesfinks avatar mobilesfinks commented on August 21, 2024

Same problem. When try to apply manifest - get error

» ~/bin/google-cloud-sdk/bin/kubectl --context minikube apply -f ./manifests/minimal-postgres-manifest.yaml
The postgresql "pg-cluster" is invalid: apiVersion: Invalid value: "postgresql": must be acid.zalan.do/v1

» cat ./manifests/minimal-postgres-manifest.yaml | grep apiVersion:
apiVersion: acid.zalan.do/v1

» kubectl --context minikube get postgresql pg-cluster -o yaml | grep apiVersion:
apiVersion: acid.zalan.do/v1

Minikube version 1.8.0
Try with kubectl versions 1.7.5 and 1.9.2 - nothing change.

kubectl --context minikube replace -f ./manifests/minimal-postgres-manifest.yaml

Work correct

from postgres-operator.

alexeyklyukin avatar alexeyklyukin commented on August 21, 2024

@mobilesfinks it works for me (kubectl 1.8.2):
kubectl apply -f minimal-postgres-manifest.yaml postgresql "acid-minimal-cluster" configured

Did you try to make any changes to the manifest before doing kubectl apply? If I try it with the manifest that has not been changed since the last create/apply, I'm getting a different, however, quite obscure error (version 1.8.2 for both the client and the server):

kubectl apply -f minimal-postgres-manifest.yaml The postgresql "acid-minimal-cluster" is invalid: apiVersion: Invalid value: "acid.zalan.do/__internal": must be acid.zalan.do/v1

from postgres-operator.

FxKu avatar FxKu commented on August 21, 2024

Most kubectl options for this issue are mentioned here, I guess. I also use edit. Closing now. Anybody, feel free to reopen if still facing this problem.

from postgres-operator.

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.