Open kahayes opened 4 years ago
Same issue with AWS since there is external command in the context for auth.
Any workaround for the import. I need to move my argocd to another cluster. I was just going to try the install the same version then try importing the backup using kubectl -n argocd apply -f backup.yaml
@jasonsattler For the import I installed the same version, then did the following:
kubectl cp -n argocd -c argocd-server backup.yaml $(kubectl get pods -n argocd --selector=app.kubernetes.io/name=argocd-server -o jsonpath='{.items[*].metadata.name}'):/tmp/backup.yaml
kubectl exec -t -n argocd -c argocd-server $(kubectl get pods -n argocd --selector=app.kubernetes.io/name=argocd-server -o jsonpath='{.items[*].metadata.name}') bash -- -c "argocd-util import /tmp/backup.yaml"
kubectl exec -t -n argocd -c argocd-server $(kubectl get pods -n argocd --selector=app.kubernetes.io/name=argocd-server -o jsonpath='{.items[*].metadata.name}') bash -- -c "rm /tmp/backup.yaml"
This worked for me!
@jasonsattler FYI in order to get it working on aws you have to put every piece together:
docker run --rm \
-v ~/.kube:/home/argocd/.kube \
-v ~/.aws:/home/argocd/.aws \
-e KUBECONFIG=/home/argocd/.kube/[redacted] \
-u $(id -u) \
-e HOME=/home/argocd argoproj/argocd:v1.7.9 \
argocd-util export -n argocd
-u
and -e HOME
are because container need to run as my user, and manually set a working HOME env varI think for google cloud there could be something similar, the trick is to put everything together as you would configure another workstation you should access k8s from :+1:
with v2.4.11 backup can be exported using
argocd -n argocd admin export > backup-2-4-11.yaml
Checklist:
argocd version
.Describe the bug
Using the disaster recovery instructions here: https://argoproj.github.io/argo-cd/operator-manual/disaster_recovery/
results in an error when using a GKE cluster
Workaround posted at bottom of page
To Reproduce Create a cluster in GKE and deploy ArgoCD to it. https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster
Then run the disaster recovery instructions against the cluster.
Expected behavior
Screenshots
Version
Logs
Workaround run command from argocd-server pod instead of docker