microsoft / OMS-docker

Docker image for OMS (Operations Management Suite) Linux agent.
Other
79 stars 135 forks source link

error: unable to recognize "omsagent.yaml": no matches for kind "DaemonSet" in version "extensions/v1beta1" #425

Closed oxr463 closed 3 years ago

oxr463 commented 4 years ago
kubectl create -f omsagent.yaml 
error: unable to recognize "omsagent.yaml": no matches for kind "DaemonSet" in version "extensions/v1beta1"

See: https://docs.microsoft.com/en-us/azure/azure-monitor/insights/containers#configure-a-log-analytics-linux-agent-for-kubernetes

oxr463 commented 4 years ago

I edited the file with the following change:

apiVersion: apps/v1

But I received the following errors:

kubectl create -f omsagent.yaml 
error: error validating "omsagent.yaml": error validating data: ValidationError(DaemonSet.spec): missing required field "selector" in io.k8s.api.apps.v1.DaemonSetSpec; if you choose to ignore these errors, turn validation off with --validate=false

kubectl create -f omsagent.yaml --validate=false
The DaemonSet "omsagent" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"agentVersion":"1.10.0-1", "app":"omsagent", "dockerProviderVersion":"1.0.0-37"}: `selector` does not match template `labels`
saaror commented 3 years ago

@oxr463 are you still seeing this issue? Let us know we can close the issue otherwise....

oxr463 commented 3 years ago

@oxr463 are you still seeing this issue? Let us know we can close the issue otherwise....

We can close this.