How can I tell whether or not I am running inside a kubernetes cluster? With docker I can check if /.dockerinit exist. Is there an equivalent?
/.dockerinit
You can check for KUBERNETES_SERVICE_HOST environment variable.
KUBERNETES_SERVICE_HOST
This variable is always exported in an environment where the container is executed.
Refer to https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#environment-variables