Istio operator install error: unmarshalerDecoder: unknown field "policy"

Istio operator install error: unmarshalerDecoder: unknown field "policy"

在 kubernetes 集群上,我尝试卸载 istio 控制平面及其操作员并确保它们不存在,

1.) 我部署了 istio CNI

cat <<EOF > istio-cni.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  components:
    cni:
      enabled: true
  values:
    cni:
      excludeNamespaces:
       - istio-system
       - kube-system
      logLevel: info
EOF
istioctl install -f istio-cni.yaml

2.)并安装operator istioctl operator init

检查操作员 pod 日志后,我可以看到:

021-02-03T10:36:39.848828Z  info    ControlZ available at 127.0.0.1:9876
2021-02-03T10:36:39.849554Z info    leader election cm: istio-operator-lock
2021-02-03T10:36:40.365443Z info    Creating operator metrics exporter
2021-02-03T10:36:40.365553Z info    Registering Components.
2021-02-03T10:36:40.365661Z info    installer   Adding controller for IstioOperator.
2021-02-03T10:36:40.365789Z info    installer   Controller added
2021-02-03T10:36:40.365808Z info    Starting the Cmd.
2021-02-03T10:36:40.366236Z info    klog    attempting to acquire leader lease  istio-operator/istio-operator-lock...[]
2021-02-03T10:36:40.376654Z info    klog    successfully acquired lease istio-operator/istio-operator-lock[]
2021-02-03T10:36:40.451791Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "policy" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]
2021-02-03T10:36:41.790408Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "telemetry" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]
2021-02-03T10:36:44.098100Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "policy" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]
2021-02-03T10:36:48.665472Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "policy" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]
2021-02-03T10:36:59.467476Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "policy" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]
2021-02-03T10:37:13.119152Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "policy" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]
2021-02-03T10:37:42.735808Z error   klog    k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1alpha1.IstioOperator: failed to list *v1alpha1.IstioOperator: v1alpha1.IstioOperatorList.Items: []v1alpha1.IstioOperator: v1alpha1.IstioOperator.Status: Spec: unmarshalerDecoder: unknown field "policy" in v1alpha1.IstioComponentSetSpec, error found in #10 byte of ...|sion":""}},"status":|..., bigger context ...|"memory":"900Mi"}},"tag":"2.20.0"}},"version":""}},"status":{"componentStatus":{"Base":{"status":"HE|...[]

istioctl 版本 --remote 客户端版本:1.8.2 控制平面版本:1.8.2 数据平面版本:1.8.2(1 个代理)

kubectl 版本 --short 客户端版本:v1.18.10 服务器版本:v1.18.1

我的一个 iop(来自 kubectl get iop -A)的“策略”或“遥测”字段是 no longer supported 。所以我需要删除它们。

  1. kubectl delete iop [iopname] -n istio-system

这会卡住,因为我的控制器已经不见了。所以我必须做

  1. kubectl edit iop [iopname] -n istio-system
  2. finalizer
  3. 中删除 istiooperators.install.istio.io
  4. 应用

在此之后,当我再次尝试安装 istio-CNI 时,我看不到任何错误日志,然后是 istioctl operator init