kimschles / sidecar-pattern-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Sidecar Pattern

This repo contains the code and Kubernetes manifest, and slides markdown for Kim Schlesinger's August 2022 Temporal Interview

Goals

  1. Define "sidecar pattern"
  2. Explain how to identify the sidecar pattern in a code repo

Kubernetes Demo

If you'd like to experiment with the sidecar pattern example, here's how:

  1. Spin up a Kubernetes cluster

  2. Create the sidecar-demo pod by running

     kubectl apply -f deployment.yaml
    
  3. Port forward the node.js server with the command

     kubectl port-forward pod/<sidecar-demo-pod-name> 3000:3000
    
  4. Use your browser or cURL to make a GET request to http://localhost:3000

  5. Halt the port-forward process with ctrl + c

  6. Look at the helper-app logs with the command

     kubectl logs <sidecar-demo-pod-name> -c helper-app
    
  7. Pat yourself on the back for seeing how the sidecar pattern is implemented in Kubernetes!

About


Languages

Language:JavaScript 58.6%Language:Dockerfile 41.4%