fluxcd ничего не применяет с err="запущен kubectl: error: не удается распознать \"STDIN\": ..."

Я недавно установил FluxCD 1.19.0 на Azure AKS K8S кластера с использованием fluxctl установки. Мы используем частный git (собственный битбакет), к которому Flux может подключиться и проверить.

Теперь Flux ничего не применяет с сообщением об ошибке:

ts=2020-06-10T09:07:42.7589883Z caller=loop.go:133 component=sync-loop event=refreshed url=ssh://git@bitbucket.some-private-server.com:7999/infra/k8s-gitops.git branch=master HEAD=7bb83d1753a814c510b1583da6867408a5f7e21b
ts=2020-06-10T09:09:00.631764Z caller=sync.go:73 component=daemon info="trying to sync git changes to the cluster" old=7bb83d1753a814c510b1583da6867408a5f7e21b new=7bb83d1753a814c510b1583da6867408a5f7e21b
ts=2020-06-10T09:09:01.6130559Z caller=sync.go:539 method=Sync cmd=apply args= count=3
ts=2020-06-10T09:09:20.2097034Z caller=sync.go:605 method=Sync cmd="kubectl apply -f -" took=18.5965923s err="running kubectl: error: unable to recognize \"STDIN\": an error on the server (\"\") has prevented the request from succeeding" output=
ts=2020-06-10T09:09:38.7432182Z caller=sync.go:605 method=Sync cmd="kubectl apply -f -" took=18.5334244s err="running kubectl: error: unable to recognize \"STDIN\": an error on the server (\"\") has prevented the request from succeeding" output=
ts=2020-06-10T09:09:57.277918Z caller=sync.go:605 method=Sync cmd="kubectl apply -f -" took=18.5346491s err="running kubectl: error: unable to recognize \"STDIN\": an error on the server (\"\") has prevented the request from succeeding" output=
ts=2020-06-10T09:09:57.2779965Z caller=sync.go:167 component=daemon err="<cluster>:namespace/dev: running kubectl: error: unable to recognize \"STDIN\": an error on the server (\"\") has prevented the request from succeeding; <cluster>:namespace/prod: running kubectl: error: unable to recognize \"STDIN\": an error on the server (\"\") has prevented the request from succeeding; dev:service/hello-world: running kubectl: error: unable to recognize \"STDIN\": an error on the server (\"\") has prevented the request from succeeding"
ts=2020-06-10T09:09:57.2879489Z caller=images.go:17 component=sync-loop msg="polling for new images for automated workloads"
ts=2020-06-10T09:09:57.3002208Z caller=images.go:27 component=sync-loop msg="no automated workloads"

Насколько я понимаю, Flux передает определения ресурсов в kubectl, который затем применяет их?

То, как я интерпретирую ошибку, означает, что kubectl ничего не передается. Однако я открыл оболочку в контейнере и убедился, что Flux действительно что-то проверяет, что и произошло.

Я попытался повысить уровень детализации до 9, но он не вернул ничего, что я считал подходящим (подробные результаты HTTP-запросов и ответов для Kubernetes API).

Так что же здесь происходит?

1 ответ

Решение

Проблема была в версии kubectl, использованной в выпуске 1.19 flux, поэтому я исправил ее с помощью предварительной версии: https://hub.docker.com/r/fluxcd/flux-prerelease/tags

Другие вопросы по тегам