Kubernetes SidecarContainers feature is merged
1–10 of 65 posts
Re: Kubernetes SidecarContainers feature is merged
#2TLDR: Introduce a restartPolicy field to init containers and use it to indicate that an init container is a sidecar container. Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion.
Re: Kubernetes SidecarContainers feature is merged
#3KEP: https://github.com/kubernetes/enhancements/tree/master/keps/... TLDR: Introduce a restartPolicy field to init containers and use it to indicate that an init container is a sidecar container. Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion.
Re: Kubernetes SidecarContainers feature is merged
#4If you've got self-managed clusters, it'd be possible to enable with a feature gate on the API server, but it's unlikely to be available on managed Kubernetes until it gets to GA.
Re: Kubernetes SidecarContainers feature is merged
#5KEP: https://github.com/kubernetes/enhancements/tree/master/keps/... TLDR: Introduce a restartPolicy field to init containers and use it to indicate that an init container is a sidecar container. Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion.
Hopefully these changes should make Envoy sidecars (and sidecar co-existence in general) more reliable.
Re: Kubernetes SidecarContainers feature is merged
#6But I'm not sure about initContainers being used. init keyword implies it'd run and die in order for others to continue. Using restartPolicy with init instead of a dedicated sideCars field feels weird.
Re: Kubernetes SidecarContainers feature is merged
#7Re: Kubernetes SidecarContainers feature is merged
#8Earlier quoted context omitted.
Hopefully these changes should make Envoy sidecars (and sidecar co-existence in general) more reliable.
What's the use-case for Envoy as a sidecar? (As someone using Envoy Gateway.)
This is also how linkerd works, though they're using their own purpose-built sidecar rather than envoy.
Re: Kubernetes SidecarContainers feature is merged
#9Re: Kubernetes SidecarContainers feature is merged
#10It's a shame it took so long. If the main container shutdown (i.e connection drain, processing inflight queue items) takes a while, and your service mesh dies (nice go binary) and main container cannot communicate with internet anymore. But I'm not sure about initContainers being used. init keyword implies it'd run and die in order for others to continue. Using restartPolicy with init instead of a dedicated sideCars…