Kubernetes operator support
The OpenCensus Kubernetes Operator sets the environment variables OC_RESOURCE_TYPE and OC_RESOURCE_LABELS. The function monitoredresource.Autodetect() should use those values if present.
Stackdriver exporter will be migrated to use the Resource APIs (https://github.com/census-instrumentation/opencensus-go/tree/master/resource) once they're released. Resource APIs support reading the resource types and labels: https://github.com/census-instrumentation/opencensus-go/blob/master/resource/resource.go#L29-L33
Does this mean that monitoredresource.Autodetect() will be deprecated then?
Yes, monitoredresource will be deprecated and generic resource will be used instead, similar to what happened in Java: https://github.com/census-instrumentation/opencensus-java/pull/1744 and https://github.com/census-instrumentation/opencensus-java/pull/1745.