Unable to load in-cluster configuration

I build a image for a golang app which should all the constraint violations in the cluster. When I tried to run this Iam getting this error

2021/07/30 03:17:27 unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
2021/07/30 03:17:27 err: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
2021/07/30 03:17:27 listing constraints...
2021/07/30 03:17:27 data: null
2021/07/30 03:17:28 200 OK```

Source: Docker Questions

LEAVE A COMMENT