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! |
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.
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-version |
||
spring.cloud.kubernetes.client.apiVersion |
|
Kubernetes API Version |
spring.cloud.kubernetes.client.ca-cert-data |
||
spring.cloud.kubernetes.client.ca-cert-file |
||
spring.cloud.kubernetes.client.caCertData |
Kubernetes API CACertData |
|
spring.cloud.kubernetes.client.caCertFile |
Kubernetes API CACertFile |
|
spring.cloud.kubernetes.client.client-cert-data |
||
spring.cloud.kubernetes.client.client-cert-file |
||
spring.cloud.kubernetes.client.client-key-algo |
||
spring.cloud.kubernetes.client.client-key-data |
||
spring.cloud.kubernetes.client.client-key-file |
||
spring.cloud.kubernetes.client.client-key-passphrase |
||
spring.cloud.kubernetes.client.clientCertData |
Kubernetes API ClientCertData |
|
spring.cloud.kubernetes.client.clientCertFile |
Kubernetes API ClientCertFile |
|
spring.cloud.kubernetes.client.clientKeyAlgo |
|
Kubernetes API ClientKeyAlgo |
spring.cloud.kubernetes.client.clientKeyData |
Kubernetes API ClientKeyData |
|
spring.cloud.kubernetes.client.clientKeyFile |
Kubernetes API ClientKeyFile |
|
spring.cloud.kubernetes.client.clientKeyPassphrase |
|
Kubernetes API ClientKeyPassphrase |
spring.cloud.kubernetes.client.connection-timeout |
||
spring.cloud.kubernetes.client.connectionTimeout |
|
Connection timeout |
spring.cloud.kubernetes.client.http-proxy |
||
spring.cloud.kubernetes.client.https-proxy |
||
spring.cloud.kubernetes.client.logging-interval |
||
spring.cloud.kubernetes.client.loggingInterval |
|
Logging interval |
spring.cloud.kubernetes.client.master-url |
||
spring.cloud.kubernetes.client.masterUrl |
|
Kubernetes API Master Node URL |
spring.cloud.kubernetes.client.namespace |
|
Kubernetes Namespace |
spring.cloud.kubernetes.client.no-proxy |
||
spring.cloud.kubernetes.client.oauth-token |
||
spring.cloud.kubernetes.client.oauthToken |
Kubernetes API Oauth Token |
|
spring.cloud.kubernetes.client.password |
Kubernetes API Password |
|
spring.cloud.kubernetes.client.proxy-password |
||
spring.cloud.kubernetes.client.proxy-username |
||
spring.cloud.kubernetes.client.request-timeout |
||
spring.cloud.kubernetes.client.requestTimeout |
|
Request timeout |
spring.cloud.kubernetes.client.rolling-timeout |
||
spring.cloud.kubernetes.client.rollingTimeout |
|
Rolling timeout |
spring.cloud.kubernetes.client.service-account-namespace-path |
|
|
spring.cloud.kubernetes.client.trust-certs |
||
spring.cloud.kubernetes.client.trustCerts |
|
Kubernetes API Trust Certificates |
spring.cloud.kubernetes.client.user-agent |
|
|
spring.cloud.kubernetes.client.username |
Kubernetes API Username |
|
spring.cloud.kubernetes.client.watch-reconnect-interval |
||
spring.cloud.kubernetes.client.watch-reconnect-limit |
||
spring.cloud.kubernetes.client.watchReconnectInterval |
|
Reconnect Interval |
spring.cloud.kubernetes.client.watchReconnectLimit |
|
Reconnect Interval limit retries |
spring.cloud.kubernetes.config.enable-api |
|
|
spring.cloud.kubernetes.config.enabled |
|
Enable the ConfigMap property source locator. |
spring.cloud.kubernetes.config.fail-fast |
|
|
spring.cloud.kubernetes.config.include-profile-specific-sources |
|
|
spring.cloud.kubernetes.config.labels |
||
spring.cloud.kubernetes.config.name |
||
spring.cloud.kubernetes.config.namespace |
||
spring.cloud.kubernetes.config.paths |
||
spring.cloud.kubernetes.config.retry |
||
spring.cloud.kubernetes.config.sources |
||
spring.cloud.kubernetes.config.use-name-as-prefix |
|
|
spring.cloud.kubernetes.discovery.all-namespaces |
|
if discover is enabled for all namespaces |
spring.cloud.kubernetes.discovery.cache-loading-timeout-seconds |
|
timeout for initializing discovery cache, will abort the application if exceeded. |
spring.cloud.kubernetes.discovery.discovery-server-url |
||
spring.cloud.kubernetes.discovery.enabled |
|
if kubernetes discovery is enabled |
spring.cloud.kubernetes.discovery.filter |
SpEL expression to filter services after they have been retrieved from the Kubernetes API server. |
|
spring.cloud.kubernetes.discovery.include-external-name-services |
|
should the discovery also search for services that have "type: ExternalName" in their spec. |
spring.cloud.kubernetes.discovery.include-not-ready-addresses |
|
include as discovered if endpoint addresses is not marked with 'ready' by kubernetes |
spring.cloud.kubernetes.discovery.known-secure-ports |
|
set of known secure ports |
spring.cloud.kubernetes.discovery.metadata.add-annotations |
|
include annotations as metadata |
spring.cloud.kubernetes.discovery.metadata.add-labels |
|
include labels as metadata |
spring.cloud.kubernetes.discovery.metadata.add-pod-annotations |
|
add pod annotations as part of the response. |
spring.cloud.kubernetes.discovery.metadata.add-pod-labels |
|
add pod labels as part of the response. |
spring.cloud.kubernetes.discovery.metadata.add-ports |
|
include ports as metadata |
spring.cloud.kubernetes.discovery.metadata.annotations-prefix |
prefix for the annotations |
|
spring.cloud.kubernetes.discovery.metadata.labels-prefix |
prefix for the labels |
|
spring.cloud.kubernetes.discovery.metadata.ports-prefix |
|
prefix for the ports, by default it is "port." |
spring.cloud.kubernetes.discovery.namespaces |
If set and allNamespaces is false, then only the services and endpoints matching these namespaces will be fetched from the Kubernetes API server. |
|
spring.cloud.kubernetes.discovery.order |
|
|
spring.cloud.kubernetes.discovery.primary-port-name |
If set then the port with a given name is used as primary when multiple ports are defined for a service. |
|
spring.cloud.kubernetes.discovery.service-labels |
if set, then only the services matching these labels will be fetched from the Kubernetes API server. |
|
spring.cloud.kubernetes.discovery.use-endpoint-slices |
|
use EndpointSlice instead of Endpoints |
spring.cloud.kubernetes.discovery.wait-cache-ready |
|
wait for the discovery cache (service and endpoints) to be fully loaded, otherwise aborts the application on starting |
spring.cloud.kubernetes.leader.auto-startup |
|
Should leader election be started automatically on startup. Default: true |
spring.cloud.kubernetes.leader.config-map-name |
|
Kubernetes ConfigMap where leaders information will be stored. Default: leaders |
spring.cloud.kubernetes.leader.create-config-map |
|
Enable/disable creating ConfigMap if it does not exist. Default: true |
spring.cloud.kubernetes.leader.enabled |
|
Should leader election be enabled. Default: true |
spring.cloud.kubernetes.leader.leader-id-prefix |
|
Leader id property prefix for the ConfigMap. Default: leader.id. |
spring.cloud.kubernetes.leader.namespace |
Kubernetes namespace where the leaders ConfigMap and candidates are located. |
|
spring.cloud.kubernetes.leader.publish-failed-events |
|
Enable/disable publishing events in case leadership acquisition fails. Default: false |
spring.cloud.kubernetes.leader.role |
Role for which leadership this candidate will compete. |
|
spring.cloud.kubernetes.leader.update-period |
|
Leadership status check period. Default: 60s |
spring.cloud.kubernetes.loadbalancer.cluster-domain |
|
cluster domain. |
spring.cloud.kubernetes.loadbalancer.enabled |
|
Load balancer enabled,default true. |
spring.cloud.kubernetes.loadbalancer.mode |
|
{@link KubernetesLoadBalancerMode} setting load balancer server list with ip of pod or service name. default value is POD. |
spring.cloud.kubernetes.loadbalancer.port-name |
|
service port name. |
spring.cloud.kubernetes.reload.enable-reload-filtering |
|
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.cloud.kubernetes.reload.enabled |
|
Enables the Kubernetes configuration reload on change. |
spring.cloud.kubernetes.reload.max-wait-for-restart |
|
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 triggered |
spring.cloud.kubernetes.reload.mode |
|
Sets the detection mode for Kubernetes configuration reload. |
spring.cloud.kubernetes.reload.monitoring-config-maps |
|
Enables monitoring on secrets to detect changes. |
spring.cloud.kubernetes.reload.monitoring-secrets |
|
Monitor secrets or not. |
spring.cloud.kubernetes.reload.namespaces |
namespaces where an informer will be set-up. this property is only relevant for event based reloading. |
|
spring.cloud.kubernetes.reload.period |
|
Sets the polling period to use when the detection mode is POLLING. |
spring.cloud.kubernetes.reload.strategy |
|
Sets reload strategy for Kubernetes configuration reload on change. |
spring.cloud.kubernetes.secrets.enable-api |
|
|
spring.cloud.kubernetes.secrets.enabled |
|
Enable the Secrets property source locator. |
spring.cloud.kubernetes.secrets.fail-fast |
|
|
spring.cloud.kubernetes.secrets.include-profile-specific-sources |
|
|
spring.cloud.kubernetes.secrets.labels |
||
spring.cloud.kubernetes.secrets.name |
||
spring.cloud.kubernetes.secrets.namespace |
||
spring.cloud.kubernetes.secrets.paths |
||
spring.cloud.kubernetes.secrets.retry |
||
spring.cloud.kubernetes.secrets.sources |
||
spring.cloud.kubernetes.secrets.use-name-as-prefix |
|