Professional Documents
Culture Documents
Kubernetes 2 - Containers
Public containers exist (nginx, mysql, etc)
Helm charts: prebuilt K8s configs that combine containers into pre-assembled,
opinionated setups (e.g. logging plus log search capabilities)
Pods should be as simple as possible
sometimes, that means single-purpose, one app per container per pod
Jlink (Java 9+)... learn more
Storage can be run as a container
can be paired with a container to sync with enterprise shared db,
making container more of a view or cache
files can be mounted per container, per pod, or on a network location
might not work for us, since we need a single source of truth (except
maybe testing with instanced datasets)
Testing
isolate testing into a container (including data!)
test suite can...
deploy testable unit(s) -- in K8s, using a helm script to stand
up multiple containers
run suite against testable unit with REST API
tear down container afterwards
Pods are always machine specific (not split)
Each pod has a unique IP address
multiple containers within a single pod can talk quickly
localhost (no wire time for network calls)
shared storage (same storage mounted into multiple containers)
IPC (inter-process communication)
multi-container pod patterns:
side-car pattern
example: event listener
ambassador pattern
"find me all products" which are distributed among different
places
adapter pattern
"get me the data" which could live on different kinds of
databases
initialization containers:
useful for separation of permissions (e.g. modify schema on DB on
startup, but don't allow schema changes when running)
YAML fragments can help modularize configuration (e.g. a generic "I need
fileshare access" component that could be applied to a webapp definition)
Serverless containers (or functional containers) simply execute functions
QUESTIONS:
How did you stand up oracle in a container? Name of software?
Licensing?
Oracle XE (lightweight) container can be used for local testing
without any licensing concerns
Kubernetes 4 - Serverless
Monolith -> Microservice ~~ Microservice -> Function
Meant to *augment* existing monoliths and microservices, not *replace*
Examples:
business rule engine: Given input X, produce result Y
IoT helpers: store/process this image
Helpful for prototyping and mocking
Good for scaling up and down quickly for bursts of action
Basically, you give it a runtime and code, and it provides access to that
running code through...
HTTP calls
CRON (scheduled)
Other custom triggers
...
...Jon gets *really* lost in the weeds showing commands to download the
images, get them running and exposed, get the function deployed out, run the
function, install the logging database and dashboard, log into the dashboard, etc
etc...
...this goes on for 45 minutes.