talos OSにcloudflaredをinstallする
proxmox上のおうちk8sをcloudflare zero trustを使ってservice公開しようと思ったが、shellの提供されていないtalosでやる方法がパッとわからなかった。
cloudflare側の準備
cloudflareで管理しているドメインに対してzero trustを有効化する。
zero trust用のdomain名は後で変更できるそうなので適当に決定する。
ref. https://zenn.dev/kyami/articles/28deef1967b1eb
proxmox側の準備 (不要だった)
下記はtalos自体にcloudflaredのbinaryをsistem extension経由でinstallする方法で、k8s serviceを公開するという観点では不要そう。
https://github.com/siderolabs/extensions
talos OSを開発しているsiderolabsでproxmox用のextensionを提供しているrepositoryが存在していて、ここにcloudflared用のextensionも存在しているっぽい。
https://github.com/siderolabs/extensions/tree/main/network/cloudflared
↑特にcloudflaredについてはこっち
https://www.talos.dev/v1.9/talos-guides/configuration/system-extensions/
https://www.talos.dev/v1.9/talos-guides/install/boot-assets/
↑ installするためのほうほうはこれ。
Note: the way to install system extensions in the .machine.install section of the machine configuration is now deprecated.
という記載があり、controlplane.yamlやworker.yamlには.machine.installというセクションが存在しているがこれは使わないほうが良いらしい。
その代わりに直接.machine.install.imageの部分を、extensionを含んだcustomのイメージにするということらしい。