Giter Club home page Giter Club logo

k8s-cluster-export's People

Contributors

mzervakis avatar tmattausch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

k8s-cluster-export's Issues

Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-100-generic x86_64) run -g error

student@master01:~$ ./k8s-cluster-export -g
NAME STATUS AGE
app-team1 Active 71d
cpu-top Active 70d
default Active 72d
echo Active 70d
ing-internal Active 71d
ingress-nginx Active 71d
internal Active 70d
kube-node-lease Active 72d
kube-public Active 72d
kube-system Active 72d
my-app Active 70d

⎈ ⎈ ☃ ⎈ ⎈

---- start export resources for ns ----

-------------- export sc --------------

-------------- export pv --------------

---- export pv01 config ----

Error: parsing expression: Lexer error: could not match text starting at 1:1 failing at 1:1.
unmatched text: "d"

Versions

Hi, I only want to save time to new users like me :-)

The script requires yq version <4 from mikefarah project. There are other projects with the same name like this https://github.com/kislyuk/yq (it seems like no one controls duplicate names)

I could run on centos 7 with yq version 3 (deprecated) -> https://github.com/mikefarah/yq/releases/tag/3.4.1.
Also yq requires jq (yum install jq). And.. to avoid diff warnings need diff >= 3.4 because 3.3 doesn't recognize --colour args. I get v3.7 bin from an ubuntu 20.04.

Hope it helps!

Thanks Thomas for the project.
Regards

Export misbehaves when PVCs are in PV pending state during export

When PVC is pv pending during export, "pv_null" yaml file is included in export and yq errors are printed in stderr and stdout. I understand from reading the script that it's intended to grab some PV data along with every PVC, so that resources can be safely detached and reattached. For my pending PVs, this may not be possible.

I'm not sure what I should expect to happen, because my cluster is basically in an error state before I started the export. Several PVs are currently Pending on my cluster for some time, and due to some provider mismatch likely won't be fulfilled. The resulting script behavior is probably as good as can be expected in the circumstances.

I planned to export and try again on another cluster, or fill out the PV with data from my cloud provider and try to reattach the orphaned PVs by hand. The k8s-cluster-export output was just a little bit less than tolerant of this error state, lots of this:

09:19:16 main [ERRO] asked to process document index 0 but there are only 0 document(s)
Error: asked to process document index 0 but there are only 0 document(s)
Usage:
  yq delete [yaml_file] [path] [flags]

Aliases:
  delete, d

but, the script execution was not terminated, proceeded through the remaining resources including several deployments that I had, and finally completed successfully. There was not any harm I could see, other than a couple hundred lines of spurious yq error output, that grabbed my attention and alerted me to the error. Maybe that's exactly what should happen.

As you perhaps expected, or maybe not, when the PVC is exported without a PV bound to it, an empty file is written into namespace/2_pv/pv_null.yaml. That is not really going to harm anything, but is spurious and probably shouldn't have been written as part of the export.

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.