Spring Cloud Dataflow deployment name change every time when stream un-deploy and deploy again in Kubernetes

101 views Asked by At

We have deployed the pod of Spring Cloud dataflow and Skipper in AWS EKS. We have registered the application and created the stream. Whenever we are undeploy and deploy the stream that time deployment name and repicasset are changed. Can we have option to fix it (deployment name) as we are facing issue with Kubernetes Horizontal Pod Auto Scaler policy as HPA based on the Deployment name.

For example: Application Name: sms Stream name: sms Deployment name: sms-v1

After undeploy and deploy: Deployment name: sms-v2

in this case we have applied the HPA on deployment name sms-v1 not woking after sms-v2. So we need to update deployment name in HPA which is not possible everytime.

Please share the some suggestion.

Thanks

Currently, We have manually changing the deployment name in HPA.

1

There are 1 answers

5
Corneil du Plessis On

There will be labels assigned to the related Kubernetes Services, Deployments and Pods:

spring-group-id: sms
spring-app-id: sms-v1                                                                                                                                              
spring-application-name: sms
spring-deployment-id: sms-v1                                                                                                                                       

If you have a stream the spring-group-id is the streamName and spring-application-name will be streamName-appName-version The spring-deployment-id will typically match the spring-app-id

You can use kubectl get pod --selector='spring-group-id=sms' to view all pods for the specific stream / task

You should be able to use label selectors in HPA instead of Deployment names.