diff --git a/docs/modules/ROOT/pages/appendix.adoc b/docs/modules/ROOT/pages/appendix.adoc index 39eb1593..941e773b 100644 --- a/docs/modules/ROOT/pages/appendix.adoc +++ b/docs/modules/ROOT/pages/appendix.adoc @@ -1,7 +1,7 @@ :numbered!: [appendix] [[common-application-properties]] -== Common application properties += Common application properties include::_attributes.adoc[] diff --git a/docs/modules/ROOT/pages/discovery-client.adoc b/docs/modules/ROOT/pages/discovery-client.adoc index c0117ecf..7adbc5a9 100644 --- a/docs/modules/ROOT/pages/discovery-client.adoc +++ b/docs/modules/ROOT/pages/discovery-client.adoc @@ -1,5 +1,5 @@ [[discoveryclient-for-kubernetes]] -== DiscoveryClient for Kubernetes += DiscoveryClient for Kubernetes This project provides an implementation of https://github.com/spring-cloud/spring-cloud-commons/blob/master/spring-cloud-commons/src/main/java/org/springframework/cloud/client/discovery/DiscoveryClient.java[Discovery Client] for https://kubernetes.io[Kubernetes]. diff --git a/docs/modules/ROOT/pages/discovery-kubernetes-native.adoc b/docs/modules/ROOT/pages/discovery-kubernetes-native.adoc index 53ecab87..747caece 100644 --- a/docs/modules/ROOT/pages/discovery-kubernetes-native.adoc +++ b/docs/modules/ROOT/pages/discovery-kubernetes-native.adoc @@ -1,5 +1,5 @@ [[kubernetes-native-service-discovery]] -== Kubernetes native service discovery += Kubernetes native service discovery Kubernetes itself is capable of (server side) service discovery (see: https://kubernetes.io/docs/concepts/services-networking/service/#discovering-services). Using native kubernetes service discovery ensures compatibility with additional tooling, such as Istio (https://istio.io), a service mesh that is capable of load balancing, circuit breaker, failover, and much more. diff --git a/docs/modules/ROOT/pages/examples.adoc b/docs/modules/ROOT/pages/examples.adoc index ee375fb6..89eef7c5 100644 --- a/docs/modules/ROOT/pages/examples.adoc +++ b/docs/modules/ROOT/pages/examples.adoc @@ -1,5 +1,5 @@ [[examples]] -== Examples += Examples Spring Cloud Kubernetes tries to make it transparent for your applications to consume Kubernetes Native Services by following the Spring Cloud interfaces. diff --git a/docs/modules/ROOT/pages/getting-started.adoc b/docs/modules/ROOT/pages/getting-started.adoc index 571a9388..2fe46f46 100644 --- a/docs/modules/ROOT/pages/getting-started.adoc +++ b/docs/modules/ROOT/pages/getting-started.adoc @@ -1,5 +1,5 @@ [[starters]] -== Starters += Starters Starters are convenient dependency descriptors you can include in your application. Include a starter to get the dependencies and Spring Boot diff --git a/docs/modules/ROOT/pages/info-contributor.adoc b/docs/modules/ROOT/pages/info-contributor.adoc index 040156a1..6afed635 100644 --- a/docs/modules/ROOT/pages/info-contributor.adoc +++ b/docs/modules/ROOT/pages/info-contributor.adoc @@ -1,5 +1,5 @@ [[info-contributor]] -== Info Contributor += Info Contributor Spring Cloud Kubernetes includes an `InfoContributor` which adds Pod information to Spring Boot's `/info` Acturator endpoint. diff --git a/docs/modules/ROOT/pages/kubernetes-awareness.adoc b/docs/modules/ROOT/pages/kubernetes-awareness.adoc index 973d9599..6e939d82 100644 --- a/docs/modules/ROOT/pages/kubernetes-awareness.adoc +++ b/docs/modules/ROOT/pages/kubernetes-awareness.adoc @@ -1,5 +1,5 @@ [[kubernetes-ecosystem-awareness]] -== Kubernetes Ecosystem Awareness += Kubernetes Ecosystem Awareness All features described earlier in this guide work equally well, regardless of whether your application is running inside Kubernetes. This is really helpful for development and troubleshooting. @@ -22,21 +22,21 @@ you will have to set `spring.main.cloud-platform` should be set in `bootstrap.{p will only take effect when set in `bootstrap.{properties|yml}` when you have `spring-cloud-starter-bootstrap` on your classpath or are setting `spring.cloud.bootstrap.enabled=true`. [[breaking-changes-in-3-0-x]] -=== Breaking Changes In 3.0.x +== Breaking Changes In 3.0.x In versions of Spring Cloud Kubernetes prior to `3.0.x`, Kubernetes awareness was implemented using `spring.cloud.kubernetes.enabled` property. This property was removed and is un-supported. Instead, we use Spring Boot API: https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/condition/ConditionalOnCloudPlatform.html[ConditionalOnCloudPlatform]. If it is needed to explicitly enable or disable this awareness, use `spring.main.cloud-platform=NONE/KUBERNETES`. [[kubernetes-profile-autoconfiguration]] -=== Kubernetes Profile Autoconfiguration +== Kubernetes Profile Autoconfiguration When the application runs as a pod inside Kubernetes, a Spring profile named `kubernetes` automatically gets activated. This lets you customize the configuration, to define beans that are applied when the Spring Boot application is deployed within the Kubernetes platform (for example, different development and production configuration). [[istio-awareness]] -=== Istio Awareness +== Istio Awareness When you include the `spring-cloud-kubernetes-fabric8-istio` module in the application classpath, a new profile is added to the application, provided the application is running inside a Kubernetes Cluster with https://istio.io[Istio] installed. You can then use diff --git a/docs/modules/ROOT/pages/leader-election.adoc b/docs/modules/ROOT/pages/leader-election.adoc index 00dd9a54..bfe84836 100644 --- a/docs/modules/ROOT/pages/leader-election.adoc +++ b/docs/modules/ROOT/pages/leader-election.adoc @@ -1,5 +1,6 @@ [[leader-election]] -== Leader Election += Leader Election + The Spring Cloud Kubernetes leader election mechanism implements the leader election API of Spring Integration using a Kubernetes ConfigMap. Multiple application instances compete for leadership, but leadership will only be granted to one. diff --git a/docs/modules/ROOT/pages/load-balancer.adoc b/docs/modules/ROOT/pages/load-balancer.adoc index 0a25af70..432b019f 100644 --- a/docs/modules/ROOT/pages/load-balancer.adoc +++ b/docs/modules/ROOT/pages/load-balancer.adoc @@ -1,5 +1,6 @@ [[loadbalancer-for-kubernetes]] -== LoadBalancer for Kubernetes += LoadBalancer for Kubernetes + This project includes Spring Cloud Load Balancer for load balancing based on Kubernetes Endpoints and provides implementation of load balancer based on Kubernetes Service. To include it to your project add the following dependency. ==== diff --git a/docs/modules/ROOT/pages/other-resources.adoc b/docs/modules/ROOT/pages/other-resources.adoc index 430b1a03..2e507c2a 100644 --- a/docs/modules/ROOT/pages/other-resources.adoc +++ b/docs/modules/ROOT/pages/other-resources.adoc @@ -1,5 +1,5 @@ [[other-resources]] -== Other Resources += Other Resources This section lists other resources, such as presentations (slides) and videos about Spring Cloud Kubernetes. diff --git a/docs/modules/ROOT/pages/pod-health-indicator.adoc b/docs/modules/ROOT/pages/pod-health-indicator.adoc index 9ef4fd8b..fcd5c298 100644 --- a/docs/modules/ROOT/pages/pod-health-indicator.adoc +++ b/docs/modules/ROOT/pages/pod-health-indicator.adoc @@ -1,5 +1,5 @@ [[pod-health-indicator]] -== Pod Health Indicator += Pod Health Indicator Spring Boot uses https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthEndpoint.java[`HealthIndicator`] to expose info about the health of an application. That makes it really useful for exposing health-related information to the user and makes it a good fit for use as https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/[readiness probes]. diff --git a/docs/modules/ROOT/pages/property-source-config.adoc b/docs/modules/ROOT/pages/property-source-config.adoc index 24ec58f4..bb032bf4 100644 --- a/docs/modules/ROOT/pages/property-source-config.adoc +++ b/docs/modules/ROOT/pages/property-source-config.adoc @@ -1,5 +1,5 @@ [[kubernetes-propertysource-implementations]] -== Kubernetes PropertySource implementations += Kubernetes PropertySource implementations The most common approach to configuring your Spring Boot application is to create an `application.properties` or `application.yaml` or an `application-profile.properties` or `application-profile.yaml` file that contains key-value pairs that provide customization values to your @@ -16,7 +16,7 @@ you can either add `spring-cloud-starter-bootstrap` to your application's classp as an environment variable. [[configmap-propertysource]] -=== Using a `ConfigMap` `PropertySource` +== Using a `ConfigMap` `PropertySource` Kubernetes provides a resource named https://kubernetes.io/docs/user-guide/configmap/[`ConfigMap`] to externalize the parameters to pass to your application in the form of key-value pairs or embedded `application.properties` or `application.yaml` files. @@ -636,7 +636,7 @@ by setting `spring.cloud.kubernetes.config.retry.enabled=false`. |=== [[secrets-propertysource]] -=== Secrets PropertySource +== Secrets PropertySource Kubernetes has the notion of https://kubernetes.io/docs/concepts/configuration/secret/[Secrets] for storing sensitive data such as passwords, OAuth tokens, and so on. This project provides integration with `Secrets` to make secrets @@ -831,7 +831,7 @@ You can find an example of an application that uses secrets (though it has not b https://github.com/fabric8-quickstarts/spring-boot-camel-config[spring-boot-camel-config] [[namespace-resolution]] -=== Namespace resolution +== Namespace resolution Finding an application namespace happens on a best-effort basis. There are some steps that we iterate in order to find it. The easiest and most common one, is to specify it in the proper configuration, for example: @@ -870,12 +870,12 @@ such a method. This, in turn, could be configured via environment properties. Fo Failure to find a namespace from the above steps will result in an Exception being raised. [[order_of_configMaps_and_secrets]] -=== Order of ConfigMaps and Secrets +== Order of ConfigMaps and Secrets If, for whatever reason, you enabled both configmaps and secrets, and there is a common property between them, the value from the ConfigMap will have a higher precedence. That is: it will override whatever values are found in secrets. [[propertysource-reload]] -=== `PropertySource` Reload +== `PropertySource` Reload WARNING: This functionality has been deprecated in the 2020.0 release. Please see the <> controller for an alternative way @@ -982,7 +982,7 @@ It requires the same role as the monitored property source. This means, for example, that using polling on file-mounted secret sources does not require particular privileges. [[namespace-label-filtering]] -=== Reload namespace and label filtering +== Reload namespace and label filtering By default, a namespace chosen using the steps outlined in <> will be used to listen to changes in configmaps and secrets. i.e.: if you do not tell reload what namespaces and configmaps/secrets to watch for, it will watch all configmaps/secrets from the namespace that will be computed using the above algorithm. diff --git a/docs/modules/ROOT/pages/security-service-accounts.adoc b/docs/modules/ROOT/pages/security-service-accounts.adoc index c959c5bb..89b58cee 100644 --- a/docs/modules/ROOT/pages/security-service-accounts.adoc +++ b/docs/modules/ROOT/pages/security-service-accounts.adoc @@ -1,9 +1,9 @@ [[security-configurations-inside-kubernetes]] -== Security Configurations Inside Kubernetes += Security Configurations Inside Kubernetes [[namespace]] -=== Namespace +== Namespace Most of the components provided in this project need to know the namespace. For Kubernetes (1.3+), the namespace is made available to the pod as part of the service account secret and is automatically detected by the client. For earlier versions, it needs to be specified as an environment variable to the pod. A quick way to do this is as follows: @@ -20,7 +20,7 @@ For earlier versions, it needs to be specified as an environment variable to the ==== [[service-account]] -=== Service Account +== Service Account For distributions of Kubernetes that support more fine-grained role-based access within the cluster, you need to make sure a pod that runs with `spring-cloud-kubernetes` has access to the Kubernetes API. For any service accounts you assign to a deployment or pod, you need to make sure they have the correct roles. diff --git a/docs/modules/ROOT/pages/service-registry.adoc b/docs/modules/ROOT/pages/service-registry.adoc index 8614544e..6357e5ad 100644 --- a/docs/modules/ROOT/pages/service-registry.adoc +++ b/docs/modules/ROOT/pages/service-registry.adoc @@ -1,5 +1,5 @@ [[service-registry-implementation]] -== Service Registry Implementation += Service Registry Implementation In Kubernetes service registration is controlled by the platform, the application itself does not control registration as it may do in other platforms. For this reason using `spring.cloud.service-registry.auto-registration.enabled`