<p>Small question on how to disable Spring Cloud Kubernetes in local mode please.</p>
<p>The project is a simple SpringBoot + SpringCloud project deployed in Kubernetes.
Hence, there is this dependency in the class path:</p>
<pre><code>        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
            &lt;artifactId&gt;spring-cloud-starter-kubernetes-fabric8&lt;/artifactId&gt;
        &lt;/dependency&gt;
</code></pre>
<p>And when we deployed the app in a Kubernetes environment, everything is fine.
However, the same app run in local mode will yield this warning, but most of all, a 20 seconds increased start time.</p>
<pre><code>o.s.c.k.f.Fabric8AutoConfiguration       : No namespace has been detected. Please specify KUBERNETES_NAMESPACE env var, or use a later kubernetes version (1.3 or later)
</code></pre>
<p>In local, while removing the dependency entirely, things are &quot;back to normal&quot;. The message disappears, and the start up time comes back down.</p>
<p>However, commenting and uncommenting the dependency based on the local environment might not be the best solution.</p>
<p>Is there a property to <strong>disable Spring Cloud Kubernetes entirely</strong> that I can configure in local please?</p>
<p>Thank you</p>

PatPanda
<p>As the <a href="https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/index.html#kubernetes-ecosystem-awareness" rel="noreferrer">documentation says</a>, you can do that by adding:</p>
<pre><code>spring.cloud.kubernetes.enabled=false
</code></pre>
<p>that, in turn, could be an environment property that you can enable/disable per environment.</p>
