Errors while deploying kiali

While deploying kiali from the samples\addons yamls files of latest istio on aks. I am getting below errors


nable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"
unable to recognize "kiali.yaml": no matches for kind "MonitoringDashboard" in version "monitoring.kiali.io/v1alpha1"

How to fix this?

See the docs that talk about this: Istio / Kiali
Notice where it says in the green box, “If there are errors trying to install the addons, try running the command again. There may be some timing issues which will be resolved when the command is run again.”

In short, just run the command again. The problem is these addon scripts are very basic - they blindly attempt to create resources as fast as possible, but the problem is your cluster is too slow in establishing the CRD for the monitoring dashboards so when the monitoring dashboard resources themselves start getting created the CRD is not ready yet. Re-running the command will fix it.

Side note: this monitoring dashboard CRD has gone away in Kiali v1.37 so when we upgrade the addons to v1.37 or higher, this problem won’t occur and we’ll update the docs (I have that on my todo list here: clean up upstream istio kiali addon install doc · Issue #4111 · kiali/kiali · GitHub)