Jaybanuan's Blog

どうせまた調べるハメになることをメモしていくブログ

SNAPでインストールしたkustomizeは一部機能が使えない

Kubernetesマニフェストファイル関連のツールでkustomizeというのがあるが、利用中に以下のissueで挙げられているものと同じ現象が発生した。

github.com

issueからの抜粋になるが、kustomizeの実行時に以下のエラーが発生した。

$ kustomize build . | kubectl apply -f -
Error: accumulating resources: accumulation err='accumulating resources from 'github.com/ansible/awx-operator/config/default?ref=': evalsymlink failure on '/Users/tjanitsc/github.com/ansible/awx-operator/config/default?ref=' : lstat /Users/tjanitsc/github.com: no such file or directory': git cmd = '/usr/bin/git fetch --depth=1 origin ': exit status 128
error: no objects passed to apply

GitHub上のファイル(正確にはディレクトリ)をkustomizeで直接取り扱おうとしているが、GitHubにうまくアクセスできていない。 回答に以下のように「もしsnap版使ってるなら、バイナリをダウンロードして直接それを使ってみて」とあるので、試したら問題なく動作した。

If you use kustomize with snap, try pure kustomize by downloading binary directly. Refer: https://kubectl.docs.kubernetes.io/installation/kustomize/binaries/

以下でsnap版のVisutal Studio Codeがうまく動作しない件を書いたが、snapは手軽なんだけど時々はまる。

redj.hatenablog.com