понедельник, 18 августа 2025 г.

Ошибки при установке Istio в GKE

 Если вы ставите Istio в ambient режиме в GKE (Google Kubernetes Engine) кластер и не прочли Platform-Specific Prerequisites, то при установке CNI node agent вы столкнётесь с двумя ошибками.

Первая не даст установить Helm релиз (в событиях будет ошибка):

LAST SEEN   TYPE      REASON                    OBJECT                           MESSAGE
3s          Warning   FailedCreate              daemonset/istio-cni-node         Error creating: insufficient quota to match these scopes: [{PriorityClass In [system-node-critical system-cluster-critical]}]

Это связано с тем что по-умолчанию разрешает использовать priorityClassName: system-node-critical только в пространстве имён "kube-system". Чтобы разрешить использовать его в "istio-system" нужно создать ResourceQuota в соответствующем пространстве имён

apiVersion: v1
kind: ResourceQuota
metadata:
  name: gcp-critical-pods
  namespace: istio-system
spec:
  hard:
    pods: 1000
  scopeSelector:
    matchExpressions:
    - operator: In
      scopeName: PriorityClass
      values:
      - system-node-critical

Вторая проблема проявляется как постоянный перезапуск пода istio-cni и в логах будет подсказка как это чинить:

2025-08-15T14:03:48.272826Z     info    controllers     starting        controller=repair pods
2025-08-15T14:03:48.357825Z     info    cni-agent       initialization complete, watching node CNI dir
2025-08-15T14:03:48.358220Z     error   cni-agent       failed file copy of /opt/cni/bin/istio-cni to /host/opt/cni/bin: open /host/opt/cni/bin/istio-cni.tmp.2135482355: read-only file system
2025-08-15T14:03:48.358243Z     warn    hint: some Kubernetes environments require customization of the CNI directory. Ensure you properly set global.platform=<name> during installation
2025-08-15T14:03:48.358311Z     error   cni-agent       installer failed: copy binaries: open /host/opt/cni/bin/istio-cni.tmp.2135482355: read-only file system
2025-08-15T14:03:48.369141Z     info    cni-agent       terminating, but parent DS istio-cni-node is still present, this is an upgrade, leaving plugin in place
2025-08-15T14:03:48.369180Z     info    cni-agent       Ambient node agent shutting down - is upgrade shutdown? true

Для исправления достаточно задать --set global.platform=gke при установке Helm релиза.

Комментариев нет:

Отправить комментарий