Role of ambassador design pattern in Kubernetes
Deepak Kumar
Propelling AI To Reinvent The Future ||Author|| 150+ Mentorship|| Leader || Innovator || Machine learning Specialist || Distributed architecture | IoT | Cloud Computing
Why to read this?
In Kubernetes, there is a container that proxy the network connection to the main container. If you like to know about its working and usage, then this document helps.
Technical explanation
An Ambassador container is a sidecar container that is in charge of proxying connections from the application container to other services.
An ambassador service can be thought of as an out-of-process proxy that is co-located with the client. This pattern can be useful for offloading common client connectivity tasks such as monitoring, logging, routing, security (such as TLS).
Working principal
Example use
- Almost all applications need a database connection at some phase. In a multi-environment place, there would be a test database, a staging database, and a production database. When writing the Pod definition for their application’s container, developers must pay attention to which database they’ll be connecting to.
- Legacy application can use this pattern for its migration effort to cloud-native (micro-service)
Reference
Thanks to these helping hands
https://images.app.goo.gl/BFgwXXWPwquXbQAT6 https://images.app.goo.gl/7itAcR6y1DxAVMSs5 https://www.magalix.com/blog/kubernetes-patterns-the-ambassador-pattern https://docs.microsoft.com/en-us/azure/architecture/patterns/ambassador https://stackoverflow.com/questions/59451056/differences-between-sidecar-and-ambassador-and-adapter-pattern