How can I identify if the akka cluster is running on the kubernetes?

2/6/2020

My akka cluster system can deployed both by VMs and kubernetes, how can I identify if the akka cluster is running on the kubernetes so that I do not need to config the cluster seeds node?

-- Tomia Wong
akka
akka-cluster
kubernetes

1 Answer

2/6/2020

An easy way is just to identify if there has the namespace file in the system.

/var/run/secrets/kubernetes.io/serviceaccount/namespace
-- YouXiang-Wang
Source: StackOverflow