-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubectl --export is deprecated #669
kubectl --export is deprecated #669
Conversation
…oved in v1.18. The new command is emulating the behavior of the deprecated `--export` flag using `yq`. Signed-off-by: Zoltan Burgermeiszter <zoltan@backenddoctor.com>
Hi @zburgermeiszter. Thanks for your PR. I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
✔️ Deploy Preview for cert-manager-website ready! 🔨 Explore the source changes: 417625c 🔍 Inspect the deploy log: https://app.netlify.com/sites/cert-manager-website/deploys/610c17732de88200070732b4 😎 Browse the preview: https://deploy-preview-669--cert-manager-website.netlify.app/docs/tutorials/acme/migrating-from-kube-lego |
/assign @jakexks |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zburgermeiszter The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…been removed in v1.18." This reverts commit 6e7e5b4. Signed-off-by: Zoltan Burgermeiszter <zoltan@backenddoctor.com>
Signed-off-by: Zoltan Burgermeiszter <zoltan@backenddoctor.com>
a777218
to
417625c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zburgermeiszter
I haven't tested this, but I trust that you have.
I left a few comments and suggestions which you can address or ignore as you please.
@@ -88,16 +88,21 @@ the value of the `LEGO_SECRET_NAME` environment variable. | |||
You should download a copy of this secret resource and save it in your local | |||
directory: | |||
|
|||
Install [yq](https://kislyuk.github.io/yq/#installation) then run the command below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found two versions of yq
when I googled for it. This seems to be the original version and according to my colleague @maelvls, it is the better of the two : cert-manager/cert-manager#3996 (comment)
The other tool that might be even better is kubectl neat
which is mentioned in this SO article: https://stackoverflow.com/questions/61392206/kubectl-export-is-deprecated-any-alternative
and in kubernetes/kubernetes#90066
In that issue they also complain about the managedFields
content which is apparently ommitted by kubectl get
since v1.21 kubernetes/kubernetes#96878
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately with my current setup I'm unable to verify the behavior of the tools with the managedField. The cluster is still on
1.18.20and my
kubectlversion is
1.19.13`.
kubectl neat
is a krew plugin and krew needs to be installed separately.
It feels an overkill for me compared to a simple yq installation.
What would be your preference?
/ok-to-test |
/retest |
@zburgermeiszter: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@zburgermeiszter: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
kubectl --export is deprecated since
kubectl
v1.14 and has been removed in v1.18.The new command is emulating the behavior of the deprecated
--export
flag usingyq
.There is another
kubectl
command line with--export
flag, but in our cluster the email address was provided as an environmental variable rather than a ConfigMap, therefore no tested command for it, but similar commands should work for both.Signed-off-by: Zoltan Burgermeiszter zoltan@backenddoctor.com