<p>I'm running a Spring Boot Admin server (2.2.2) and using Spring Cloud Kubernetes discovery (with specific service labels to filter) to detect my client apps. None of my client apps are using the explicit Spring Boot Admin <a href="https://codecentric.github.io/spring-boot-admin/current/#register-clients-via-spring-boot-admin" rel="nofollow noreferrer">Client dependency</a> mechanism.</p>

<p>One of my client apps has a non-standard actuator URL and uses different security credentials to access those endpoints. I understand that I could use <a href="https://codecentric.github.io/spring-boot-admin/current/#spring-cloud-discovery-static-config" rel="nofollow noreferrer">static spring cloud discovery</a> with instance metadata to achieve this, but I'd rather use the kubernetes discovery process for all my client apps. </p>

<p>I think by using a custom <a href="https://codecentric.github.io/spring-boot-admin/current/#_converting_serviceinstances" rel="nofollow noreferrer">ServiceInstanceConverter</a> I might be able to override the management context path, but I couldn't see a way to inject custom security credentials via that route.</p>

<p>Is there a better way to customise this kubernetes-driven discovery process? (e.g. can I declare instance metadata somewhere in the client app so that it's picked up even though I'm using Kubernetes discovery - I got the sense from the Spring Boot Admin docs that setting admin properties in clients applied only to the "push registration from client to server" case rather than the "server discovers" case.) </p>

<p>As a related general question, Spring Boot Admin is presumably using some <em>default</em> credential values for accessing actuator endpoints - where are they set up?</p>

<p>Thanks in advance</p>

<p>Alan</p>

wabrit
<p>I think I figured this out for myself, but in case it's useful to anyone else here is what I did:</p>

<ul>
<li>Declared custom values for the instance metadata management.context-path, user.name and user.password under the <code>annotations</code> section of the Kubernetes service for my client application.</li>
</ul>

<p>e.g.</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: foo-service
  annotations:
    # The following are used to support monitoring and administration
    user.name: mySpecialUsername
    user.password: mySpecialPassword
    management.context-path: /foo/manage
</code></pre>

<p>From observation it seems that the default credentials assumed by a Spring Boot Administration server are <code>admin/admin</code>.</p>
