letthefireflieslive
letthefireflieslive

Reputation: 12664

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

On a kubernetes cluster where I tried to uninstall istio control plane and it's operator and make sure they are not existing,

1.) I deployed 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.) and install the operator istioctl operator init

Upon checking the operator pod logs I can see:

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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 version --remote client version: 1.8.2 control plane version: 1.8.2 data plane version: 1.8.2 (1 proxies)

kubectl version --short Client Version: v1.18.10 Server Version: v1.18.1

Upvotes: 1

Views: 1380

Answers (1)

letthefireflieslive
letthefireflieslive

Reputation: 12664

One of my iop (from kubectl get iop -A) have "policy" or "telemetry" fields which are no longer supported . So I need to delete them.

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

This get stucked though because my controller is already gone. So I have to do

  1. kubectl edit iop [iopname] -n istio-system
  2. Remove istiooperators.install.istio.io from the finalizer
  3. Apply

After this I can see no error logs when I tried to install istio-CNI again followed by istioctl operator init.

Upvotes: 2

Related Questions