This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # HTTP URLs that Could Not Be Fixed These URLs were unable to be fixed. Please review them to see if they can be manually resolved. * [ ] http://arquillian.org/arquillian-cube/ (200) with 1 occurrences could not be migrated: ([https](https://arquillian.org/arquillian-cube/) result SSLHandshakeException). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * [ ] http://%s:%d (UnknownHostException) with 7 occurrences migrated to: https://%s:%d ([https](https://%s:%d) result UnknownHostException). * [ ] http://IP_OR_HOSTNAME/ (UnknownHostException) with 1 occurrences migrated to: https://IP_OR_HOSTNAME/ ([https](https://IP_OR_HOSTNAME/) result UnknownHostException). * [ ] http://IP_OR_HOSTNAME/greeting (UnknownHostException) with 6 occurrences migrated to: https://IP_OR_HOSTNAME/greeting ([https](https://IP_OR_HOSTNAME/greeting) result UnknownHostException). * [ ] http://IP_OR_HOSTNAME/services (UnknownHostException) with 1 occurrences migrated to: https://IP_OR_HOSTNAME/services ([https](https://IP_OR_HOSTNAME/services) result UnknownHostException). * [ ] http://compose.docker.io/ (UnknownHostException) with 1 occurrences migrated to: https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException). * [ ] http://fake:8888/ (UnknownHostException) with 1 occurrences migrated to: https://fake:8888/ ([https](https://fake:8888/) result UnknownHostException). * [ ] http://name-service/name?delay=%d (UnknownHostException) with 1 occurrences migrated to: https://name-service/name?delay=%d ([https](https://name-service/name?delay=%d) result UnknownHostException). * [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to: https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://EditorConfig.org with 1 occurrences migrated to: https://EditorConfig.org ([https](https://EditorConfig.org) result 200). * [ ] http://microservices.io/patterns/client-side-discovery.html with 1 occurrences migrated to: https://microservices.io/patterns/client-side-discovery.html ([https](https://microservices.io/patterns/client-side-discovery.html) result 200). * [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200). * [ ] http://www.java.com/en/download/help/error_hotspot.xml with 1 occurrences migrated to: https://www.java.com/en/download/help/error_hotspot.xml ([https](https://www.java.com/en/download/help/error_hotspot.xml) result 200). * [ ] http://plugins.jetbrains.com/plugin/6546 with 1 occurrences migrated to: https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301). * [ ] http://eclipse.org with 1 occurrences migrated to: https://eclipse.org ([https](https://eclipse.org) result 302). * [ ] http://eclipse.org/m2e/ with 2 occurrences migrated to: https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302). * [ ] http://www.springsource.com/developer/sts with 1 occurrences migrated to: https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302). # Ignored These URLs were intentionally ignored. * http://localhost with 7 occurrences * http://testapp/greeting with 5 occurrences
2.4 KiB
Setting up the Environment
To play with these examples, you can install locally Kubernetes & Docker using [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/) within a Virtual Machine
managed by a hypervisor (Xhyve, Virtualbox or KVM) if your machine is not a native Unix operating system.
When the minikube is installed on your machine, you can start kubernetes using this command:
minikube start
You also probably want to configure your docker client to point the minikube docker deamon with:
eval $(minikube docker-env)
This will make sure that the docker images that you build are available to the minikube environment.
Hello World Example
This Spring Boot application exposes an endpoint that we can call to receive a Hello World message as response. The application is configured using the
@RestController and the method returning the message is annotated with @RequestMapping("/")
The uberjar of the Spring Boot application is packaged within a Docker image using the Fabric8 Maven plugin and next deployed top of the Kubernetes management platform as a pod using the replication controller created by the plugin.
Once you have the environment set up (minikube or kubectl configured against a kubernetes cluster)
You can play with this Spring Boot application in the cloud using the following maven command to deploy it:
mvn clean package fabric8:deploy -Pkubernetes
Note: Unfortuntaly, when you deploy using the fabric8 plugin, the readyness and liveness probes fail to point to the right actuator URL due a lack of support for spring boot. This push you to edit the generated deployment inside kubernetes and change these probes which points to "path": "/health" to "path": "/actuator/health". This will make your deployment go green. This issue is already reported into the fabric8 community: https://github.com/fabric8io/fabric8-maven-plugin/issues/1178
When the application has been deployed, you can access its service or endpoint url using this command:
minikube service kubernetes-hello-world --url
And next you can curl the endpoint using the url returned by the previous command
curl https://IP_OR_HOSTNAME/
then
curl https://IP_OR_HOSTNAME/services
Should return you the list of available services discovered by the DiscoveryClient
mvn clean install -Pintegration