This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Cloud Kubernetes 3.1.4!spring-doc.cn

Common application properties

Various properties can be specified inside your application.properties file, inside your application.yml file, or as command line switches. This appendix provides a list of common Spring Cloud Kubernetes properties and references to the underlying classes that consume them.spring-doc.cn

Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list. Also, you can define your own properties.
Name Default Description

spring.cloud.kubernetes.client.api-versionspring-doc.cn

spring.cloud.kubernetes.client.apiVersionspring-doc.cn

v1spring-doc.cn

Kubernetes API Versionspring-doc.cn

spring.cloud.kubernetes.client.ca-cert-dataspring-doc.cn

spring.cloud.kubernetes.client.ca-cert-filespring-doc.cn

spring.cloud.kubernetes.client.caCertDataspring-doc.cn

Kubernetes API CACertDataspring-doc.cn

spring.cloud.kubernetes.client.caCertFilespring-doc.cn

Kubernetes API CACertFilespring-doc.cn

spring.cloud.kubernetes.client.client-cert-dataspring-doc.cn

spring.cloud.kubernetes.client.client-cert-filespring-doc.cn

spring.cloud.kubernetes.client.client-key-algospring-doc.cn

spring.cloud.kubernetes.client.client-key-dataspring-doc.cn

spring.cloud.kubernetes.client.client-key-filespring-doc.cn

spring.cloud.kubernetes.client.client-key-passphrasespring-doc.cn

spring.cloud.kubernetes.client.clientCertDataspring-doc.cn

Kubernetes API ClientCertDataspring-doc.cn

spring.cloud.kubernetes.client.clientCertFilespring-doc.cn

Kubernetes API ClientCertFilespring-doc.cn

spring.cloud.kubernetes.client.clientKeyAlgospring-doc.cn

RSAspring-doc.cn

Kubernetes API ClientKeyAlgospring-doc.cn

spring.cloud.kubernetes.client.clientKeyDataspring-doc.cn

Kubernetes API ClientKeyDataspring-doc.cn

spring.cloud.kubernetes.client.clientKeyFilespring-doc.cn

Kubernetes API ClientKeyFilespring-doc.cn

spring.cloud.kubernetes.client.clientKeyPassphrasespring-doc.cn

changeitspring-doc.cn

Kubernetes API ClientKeyPassphrasespring-doc.cn

spring.cloud.kubernetes.client.connection-timeoutspring-doc.cn

spring.cloud.kubernetes.client.connectionTimeoutspring-doc.cn

10sspring-doc.cn

Connection timeoutspring-doc.cn

spring.cloud.kubernetes.client.http-proxyspring-doc.cn

spring.cloud.kubernetes.client.https-proxyspring-doc.cn

spring.cloud.kubernetes.client.logging-intervalspring-doc.cn

spring.cloud.kubernetes.client.loggingIntervalspring-doc.cn

20sspring-doc.cn

Logging intervalspring-doc.cn

spring.cloud.kubernetes.client.master-urlspring-doc.cn

spring.cloud.kubernetes.client.masterUrlspring-doc.cn

https://kubernetes.default.svcspring-doc.cn

Kubernetes API Master Node URLspring-doc.cn

spring.cloud.kubernetes.client.namespacespring-doc.cn

truespring-doc.cn

Kubernetes Namespacespring-doc.cn

spring.cloud.kubernetes.client.no-proxyspring-doc.cn

spring.cloud.kubernetes.client.oauth-tokenspring-doc.cn

spring.cloud.kubernetes.client.oauthTokenspring-doc.cn

Kubernetes API Oauth Tokenspring-doc.cn

spring.cloud.kubernetes.client.passwordspring-doc.cn

Kubernetes API Passwordspring-doc.cn

spring.cloud.kubernetes.client.proxy-passwordspring-doc.cn

spring.cloud.kubernetes.client.proxy-usernamespring-doc.cn

spring.cloud.kubernetes.client.request-timeoutspring-doc.cn

spring.cloud.kubernetes.client.requestTimeoutspring-doc.cn

10sspring-doc.cn

Request timeoutspring-doc.cn

spring.cloud.kubernetes.client.rolling-timeoutspring-doc.cn

spring.cloud.kubernetes.client.rollingTimeoutspring-doc.cn

900sspring-doc.cn

Rolling timeoutspring-doc.cn

spring.cloud.kubernetes.client.service-account-namespace-pathspring-doc.cn

/var/run/secrets/kubernetes.io/serviceaccount/namespacespring-doc.cn

spring.cloud.kubernetes.client.trust-certsspring-doc.cn

spring.cloud.kubernetes.client.trustCertsspring-doc.cn

falsespring-doc.cn

Kubernetes API Trust Certificatesspring-doc.cn

spring.cloud.kubernetes.client.user-agentspring-doc.cn

Spring-Cloud-Kubernetes-Applicationspring-doc.cn

spring.cloud.kubernetes.client.usernamespring-doc.cn

Kubernetes API Usernamespring-doc.cn

spring.cloud.kubernetes.client.watch-reconnect-intervalspring-doc.cn

spring.cloud.kubernetes.client.watch-reconnect-limitspring-doc.cn

spring.cloud.kubernetes.client.watchReconnectIntervalspring-doc.cn

1sspring-doc.cn

Reconnect Intervalspring-doc.cn

spring.cloud.kubernetes.client.watchReconnectLimitspring-doc.cn

-1spring-doc.cn

Reconnect Interval limit retriesspring-doc.cn

spring.cloud.kubernetes.config.enable-apispring-doc.cn

truespring-doc.cn

spring.cloud.kubernetes.config.enabledspring-doc.cn

truespring-doc.cn

Enable the ConfigMap property source locator.spring-doc.cn

spring.cloud.kubernetes.config.fail-fastspring-doc.cn

falsespring-doc.cn

spring.cloud.kubernetes.config.include-profile-specific-sourcesspring-doc.cn

truespring-doc.cn

spring.cloud.kubernetes.config.labelsspring-doc.cn

spring.cloud.kubernetes.config.namespring-doc.cn

spring.cloud.kubernetes.config.namespacespring-doc.cn

spring.cloud.kubernetes.config.pathsspring-doc.cn

spring.cloud.kubernetes.config.retryspring-doc.cn

spring.cloud.kubernetes.config.sourcesspring-doc.cn

spring.cloud.kubernetes.config.use-name-as-prefixspring-doc.cn

falsespring-doc.cn

spring.cloud.kubernetes.discovery.all-namespacesspring-doc.cn

falsespring-doc.cn

if discover is enabled for all namespacesspring-doc.cn

spring.cloud.kubernetes.discovery.cache-loading-timeout-secondsspring-doc.cn

60spring-doc.cn

timeout for initializing discovery cache, will abort the application if exceeded.spring-doc.cn

spring.cloud.kubernetes.discovery.discovery-server-urlspring-doc.cn

spring.cloud.kubernetes.discovery.enabledspring-doc.cn

truespring-doc.cn

if kubernetes discovery is enabledspring-doc.cn

spring.cloud.kubernetes.discovery.filterspring-doc.cn

SpEL expression to filter services after they have been retrieved from the Kubernetes API server.spring-doc.cn

spring.cloud.kubernetes.discovery.include-external-name-servicesspring-doc.cn

falsespring-doc.cn

should the discovery also search for services that have "type: ExternalName" in their spec.spring-doc.cn

spring.cloud.kubernetes.discovery.include-not-ready-addressesspring-doc.cn

falsespring-doc.cn

include as discovered if endpoint addresses is not marked with 'ready' by kubernetesspring-doc.cn

spring.cloud.kubernetes.discovery.known-secure-portsspring-doc.cn

[443, 8443]spring-doc.cn

set of known secure portsspring-doc.cn

spring.cloud.kubernetes.discovery.metadata.add-annotationsspring-doc.cn

truespring-doc.cn

include annotations as metadataspring-doc.cn

spring.cloud.kubernetes.discovery.metadata.add-labelsspring-doc.cn

truespring-doc.cn

include labels as metadataspring-doc.cn

spring.cloud.kubernetes.discovery.metadata.add-pod-annotationsspring-doc.cn

falsespring-doc.cn

add pod annotations as part of the response.spring-doc.cn

spring.cloud.kubernetes.discovery.metadata.add-pod-labelsspring-doc.cn

falsespring-doc.cn

add pod labels as part of the response.spring-doc.cn

spring.cloud.kubernetes.discovery.metadata.add-portsspring-doc.cn

truespring-doc.cn

include ports as metadataspring-doc.cn

spring.cloud.kubernetes.discovery.metadata.annotations-prefixspring-doc.cn

prefix for the annotationsspring-doc.cn

spring.cloud.kubernetes.discovery.metadata.labels-prefixspring-doc.cn

prefix for the labelsspring-doc.cn

spring.cloud.kubernetes.discovery.metadata.ports-prefixspring-doc.cn

port.spring-doc.cn

prefix for the ports, by default it is "port."spring-doc.cn

spring.cloud.kubernetes.discovery.namespacesspring-doc.cn

If set and allNamespaces is false, then only the services and endpoints matching these namespaces will be fetched from the Kubernetes API server.spring-doc.cn

spring.cloud.kubernetes.discovery.orderspring-doc.cn

0spring-doc.cn

spring.cloud.kubernetes.discovery.primary-port-namespring-doc.cn

If set then the port with a given name is used as primary when multiple ports are defined for a service.spring-doc.cn

spring.cloud.kubernetes.discovery.service-labelsspring-doc.cn

if set, then only the services matching these labels will be fetched from the Kubernetes API server.spring-doc.cn

spring.cloud.kubernetes.discovery.use-endpoint-slicesspring-doc.cn

falsespring-doc.cn

use EndpointSlice instead of Endpointsspring-doc.cn

spring.cloud.kubernetes.discovery.wait-cache-readyspring-doc.cn

truespring-doc.cn

wait for the discovery cache (service and endpoints) to be fully loaded, otherwise aborts the application on startingspring-doc.cn

spring.cloud.kubernetes.leader.auto-startupspring-doc.cn

truespring-doc.cn

Should leader election be started automatically on startup. Default: truespring-doc.cn

spring.cloud.kubernetes.leader.config-map-namespring-doc.cn

leadersspring-doc.cn

Kubernetes ConfigMap where leaders information will be stored. Default: leadersspring-doc.cn

spring.cloud.kubernetes.leader.create-config-mapspring-doc.cn

truespring-doc.cn

Enable/disable creating ConfigMap if it does not exist. Default: truespring-doc.cn

spring.cloud.kubernetes.leader.enabledspring-doc.cn

truespring-doc.cn

Should leader election be enabled. Default: truespring-doc.cn

spring.cloud.kubernetes.leader.leader-id-prefixspring-doc.cn

leader.id.spring-doc.cn

Leader id property prefix for the ConfigMap. Default: leader.id.spring-doc.cn

spring.cloud.kubernetes.leader.namespacespring-doc.cn

Kubernetes namespace where the leaders ConfigMap and candidates are located.spring-doc.cn

spring.cloud.kubernetes.leader.publish-failed-eventsspring-doc.cn

falsespring-doc.cn

Enable/disable publishing events in case leadership acquisition fails. Default: falsespring-doc.cn

spring.cloud.kubernetes.leader.rolespring-doc.cn

Role for which leadership this candidate will compete.spring-doc.cn

spring.cloud.kubernetes.leader.update-periodspring-doc.cn

60000msspring-doc.cn

Leadership status check period. Default: 60sspring-doc.cn

spring.cloud.kubernetes.loadbalancer.cluster-domainspring-doc.cn

cluster.localspring-doc.cn

cluster domain.spring-doc.cn

spring.cloud.kubernetes.loadbalancer.enabledspring-doc.cn

truespring-doc.cn

Load balancer enabled,default true.spring-doc.cn

spring.cloud.kubernetes.loadbalancer.modespring-doc.cn

podspring-doc.cn

{@link KubernetesLoadBalancerMode} setting load balancer server list with ip of pod or service name. default value is POD.spring-doc.cn

spring.cloud.kubernetes.loadbalancer.port-namespring-doc.cn

httpspring-doc.cn

service port name.spring-doc.cn

spring.cloud.kubernetes.reload.enable-reload-filteringspring-doc.cn

falsespring-doc.cn

create an informer only for sources that have 'spring.cloud.kubernetes.config.informer.enabled=true' label. This property is only relevant for event based reloading.spring-doc.cn

spring.cloud.kubernetes.reload.enabledspring-doc.cn

falsespring-doc.cn

Enables the Kubernetes configuration reload on change.spring-doc.cn

spring.cloud.kubernetes.reload.max-wait-for-restartspring-doc.cn

2sspring-doc.cn

Restart or Shutdown strategies are used, Spring Cloud Kubernetes waits a random amount of time before restarting. This is done in order to avoid having all instances of the same application restart at the same time. This property configures the maximum of amount of wait time from the moment the signal is received that a restart is needed until the moment the restart is actually triggeredspring-doc.cn

spring.cloud.kubernetes.reload.modespring-doc.cn

EVENTspring-doc.cn

Sets the detection mode for Kubernetes configuration reload.spring-doc.cn

spring.cloud.kubernetes.reload.monitoring-config-mapsspring-doc.cn

truespring-doc.cn

Enables monitoring on secrets to detect changes.spring-doc.cn

spring.cloud.kubernetes.reload.monitoring-secretsspring-doc.cn

falsespring-doc.cn

Monitor secrets or not.spring-doc.cn

spring.cloud.kubernetes.reload.namespacesspring-doc.cn

namespaces where an informer will be set-up. this property is only relevant for event based reloading.spring-doc.cn

spring.cloud.kubernetes.reload.periodspring-doc.cn

15000msspring-doc.cn

Sets the polling period to use when the detection mode is POLLING.spring-doc.cn

spring.cloud.kubernetes.reload.strategyspring-doc.cn

REFRESHspring-doc.cn

Sets reload strategy for Kubernetes configuration reload on change.spring-doc.cn

spring.cloud.kubernetes.secrets.enable-apispring-doc.cn

falsespring-doc.cn

spring.cloud.kubernetes.secrets.enabledspring-doc.cn

truespring-doc.cn

Enable the Secrets property source locator.spring-doc.cn

spring.cloud.kubernetes.secrets.fail-fastspring-doc.cn

falsespring-doc.cn

spring.cloud.kubernetes.secrets.include-profile-specific-sourcesspring-doc.cn

truespring-doc.cn

spring.cloud.kubernetes.secrets.labelsspring-doc.cn

spring.cloud.kubernetes.secrets.namespring-doc.cn

spring.cloud.kubernetes.secrets.namespacespring-doc.cn

spring.cloud.kubernetes.secrets.pathsspring-doc.cn

spring.cloud.kubernetes.secrets.retryspring-doc.cn

spring.cloud.kubernetes.secrets.sourcesspring-doc.cn

spring.cloud.kubernetes.secrets.use-name-as-prefixspring-doc.cn

falsespring-doc.cn