Multiple deployment profiles with fabric8

3/29/2018

Does the maven-fabric8-plugin have the ability to support multiple profiles for different Kubernetes clusters?

I have no problem building the resources and deploying to a local minikube instance and my yaml files are under src/main/fabric8.

However I would like to be able to specify different profiles such as

  • src/main/fabric8/local for local deployment on minikube
  • src/main/fabric8/dev to deploy on the development cluster

What are the recommended approaches to achieve that?

-- fmatar
fabric8
kubernetes
maven

1 Answer

3/29/2018

The problem had an easy answer. I ended up populating the profiles with the src/main/fabric8 directory and then in my maven build I specify the profile using the -Dfabric.resourceDir flag

-- fmatar
Source: StackOverflow