Architecture Intermediate
Sidecar Pattern — rozšíření without changes code¶
SidecarService MeshKubernetes 3 min read
Sidecar kontejner pro cross-cutting concerns. Logging, monitoring, service mesh.
What is Sidecar?¶
Pomocný kontejner runscí vedle hlavní application ve stejném podu. Přidává funkcionalitu without changes code.
- Proxy pro síťovou komunikaci (Envoy, Istio)
- Log collection (Fluentd)
- Monitoring agent
- TLS terminace
Kubernetes example¶
apiVersion: v1
kind: Pod
metadata:
name: myapp
spec:
containers:
- name: app
image: myapp:latest
ports: [{containerPort: 8080}]
- name: log-collector
image: fluentd:latest
volumeMounts: [{name: logs, mountPath: /var/log/app}]
- name: envoy
image: envoyproxy/envoy:latest
volumes:
- name: logs
emptyDir: {}
Service Mesh¶
Istio/Linkerd = sidecar pattern v měřítku. Every service dostane sidecar proxy pro mTLS, traffic management, observability.
Summary¶
Sidecar is the de facto standard v Kubernetes. Elegantní způsob addsní infrastrukturních funkcí.
Need Help with Implementation?¶
Our team has experience designing and implementing modern architectures. We’re happy to help.