0

enter image description hereunknown flag: --export while copying secret from one namespace to another kubectl

I solved my problem with the above solution but i dont know why i got this error.

Above answers says on kubernetes 1.14 export option deprecated and on 1.18 it has been remove but i use 1.16.

Secondly on GCP my cluster started to give warning at the same time.

Why i get this error while i should not? Am i looking wrong direction?

enter image description here

rmznbyk 1
  • 1,104
  • 2
  • 13
  • 27
  • Please have a look at the [release notes](https://cloud.google.com/kubernetes-engine/docs/release-notes-regular#October_02_2020), [current versions](https://cloud.google.com/kubernetes-engine/docs/release-notes#current_versions). Looks like you're using outdated GKE version. – Serhii Rohoza Sep 10 '21 at 12:53

1 Answers1

1

As of Kubernetes 1.14, --export is deprecated and this feature is removed in 1.18. You can use get -o yaml without --export. For example, the following command export secrets config:

kubectl get secret <your secrets> --namespace <your namespace> -o yaml > output.yaml
Caner
  • 57,267
  • 35
  • 174
  • 180