Reputation: 359
I am trying to create an architecture where every deployment deploys with a cluster IP and the rule get automatically added to the ingress rule as a new path.
My initial thinking was to give the Deployment
a ServiceAccount
that has access to manage ingress rule and before the main pod would run, an init container would fetch the YAML and add the ruleset, while deleting maybe delete that as well?
But the more I think about it, more loopholes start coming to mind. For eg: What happens when 2 Deployment
's start at the same time?
and things like that.
Any idea on how to tackle this would be appreciated.
My background: I am a cloud engineer trying to shift to DevOps, have beginner-intermediate level knowledge of Kubernetes.
Upvotes: 0
Views: 384
Reputation: 142084
I am trying to create an architecture where every deployment deploys with a cluster IP and the rule gets automatically added to the ingress rule as a new path.
Upvotes: 2