Find useful examples about how to develop a Camel K integration leveraging Http
/Https
protocol.
You can find more information about Apache Camel and Apache Camel K on the official Camel website.
Read the general instructions in the root README.md file for setting up your environment and the Kubernetes cluster before looking at this example.
Make sure you've read the installation instructions for your specific cluster before starting the example.
Using HTTP with SSL/TLS layer
Using HTTP
NettySecureServer.java
:This integration requires a Keystore and a Truststore. Open NettySecureServer.java to find instructions on how to generate a required keystore.jks
and truststore.jks
file. For this example, keystore and trustore password is changeit
Run the integration:
kamel run NettySecureServer.java -t mount.resources=secret:http-keystore/keystore.jks@/etc/ssl/keystore.jks \ -t mount.resources=secret:http-truststore/truststore.jks@/etc/ssl/truststore.jks \ -t container.port=8443 -t service.type=NodePort --dev
Get the service location. If you're running on minikube, run minikube service netty-secure-server --url=true --https=true
Visit https://<service-location>/hello
. You should see “Hello Secure World” displayed on the web page.
Alternatively, you could run: curl -k https://<service-location>/hello
.