TKG 1.3では対応不要です。
TKG 1.2.1でK8s 1.19.3(Containerd 1.4.1)でコンテナイメージをpullする際にラベルのサイズが大きい(4KB以上)場合に次のエラーが発生し、Failed to pull image
になります。
info.Labels: label key and value greater than maximum size (4096 bytes), key: containerd: invalid argument
TKG 1.2.1でもK8s 1.19.1(Containerd 1.3.4)の場合はこの問題は発生しません。
自分はTanzu Build Serviceをインストールする際にこの問題に遭遇しました。
この問題はContainerd 1.4.2でFixされているので、次のバージョンでは直っていると思います。
Workaroundとしては全てのNode上の/etc/containerd/config.toml
に
[plugins."io.containerd.grpc.v1.cri".containerd]'
disable_snapshot_annotations = true
を追加し、containerdを再起動すればこの問題を回避できます。
既に作成済みのクラスタに関しては以下の作業を全てのNodeに対して行う必要があります。
ssh capv@<node ip> -i <ssh_key>
sudo su -
echo ' [plugins."io.containerd.grpc.v1.cri".containerd]' >> /etc/containerd/config.toml
echo ' disable_snapshot_annotations = true' >> /etc/containerd/config.toml
systemctl restart containerd
新規のクラスタに関してはこのWorkaroundを適用済みの状態で作成されるようにするためには、~/.tkg/providers/infrastructure-vsphere/ytt/vsphere-overlay.yaml
に次のytt overlayを書けば良いです。
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"KubeadmControlPlane"})
---
spec:
kubeadmConfigSpec:
preKubeadmCommands:
#@overlay/append
- echo ' [plugins."io.containerd.grpc.v1.cri".containerd]' >> /etc/containerd/config.toml
#@overlay/append
- echo ' disable_snapshot_annotations = true' >> /etc/containerd/config.toml
#@overlay/append
- systemctl restart containerd
#@overlay/match by=overlay.subset({"kind":"KubeadmConfigTemplate"})
---
spec:
template:
spec:
preKubeadmCommands:
#@overlay/append
- echo ' [plugins."io.containerd.grpc.v1.cri".containerd]' >> /etc/containerd/config.toml
#@overlay/append
- echo ' disable_snapshot_annotations = true' >> /etc/containerd/config.toml
#@overlay/append
- systemctl restart containerd