【问题标题】:Istio operator install error: unmarshalerDecoder: unknown field "policy"Istio 操作员安装错误:unmarshalerDecoder:未知字段“策略”
【发布时间】:2021-05-07 19:00:47
【问题描述】:

在一个 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.) 并安装操作符 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

【问题讨论】:

    标签: istio


    【解决方案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 中删除istiooperators.install.istio.io
    3. 申请

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

    【讨论】:

      猜你喜欢
      • 2021-05-30
      • 2018-04-29
      • 2012-08-16
      • 2018-05-22
      • 1970-01-01
      • 2021-05-21
      • 1970-01-01
      • 2023-04-04
      • 2021-08-06
      相关资源
      最近更新 更多