Photo by Kent Pilcher on Unsplash
Containerization
Orchestration
CI / CD
Service Mesh
Package Application
Run Application
Manage Application
Connect & Secure Application
Docker
Kubernetes
Bitbucket + ConcourseCI + Artifactory + Spinnaker
Istio
Collection of machines:
aggregate computing power.
A Kubernetes cluster is controlled by a single API and can be used by that API.
Photo by Atharva Tulsi on Unsplash
Book: Managing Kubernetes
Photo by Jenhao Hsiao on Unsplash
Pods
ReplicaSets
Services
Persistent Volumes
ConfigMaps
Secrets
Namespaces
Labels
Annotations
app=greatapp
checksum.kubernetes.io/
configmap=9c6537e
Deployments
Ingress
StatefulSets
Jobs
ScheduledJobs
on every nodes ...
Node / VM
Photo by Ravin Vimesh on Unsplash
Declarative Configuration
Reconciliation Loop
Dynamic Grouping
Desired State
Current State
selector:
matchLabels:
app: Webapp
version: v2
Unix Philosophy of Many Components
API-Driven Interactions
Master VM 1
etcd
API Server
Scheduler
Controller Manager
kubelet
kube-proxy
Worker VM 1
Docker
UI
CLI
Control Plane
kubeDNS
metrics-server
add-on
Add-on:
Kubernetes Dashboard,
automatic certificate agents,
functions as a service (FaaS) etc.
Photo by Adi Goldstein on Unsplash
1. API Management
2. Request processing
3. Internal control loops
Photo by Alvaro Reyes on Unsplash
Photo by Maarten van den Heuvel on Unsplash
API Paths
API Discovery
OpenAPI Spec Serving
API Translation
GET LIST POST / PUT DELETE
Type Of Request
Authenticate
RBAC/Authorization
Life of Request
Admission Control
Specialised Requests
/proxy
/exec
/attach
/logs
Watch Operations
Optimistically Concurrent Updates
Alternate Encodings
application/json
application/yaml
application/vnd.kubernetes.protobuf
Common Response Codes
202: Accepted
400: Bad Request
401: Unauthorised
403: Forbidden
409: Conflict
422: Unprocessable Entity
API Server Internals
Custom Resource Definition
Basic Logs
Audit Logs
Activating Additional Logs
Debugging kubectl Requests
Photo by Curtis MacNewton on Unsplash
Scheduler
nodeName is missing
Pod
Node
kubelet
Docker
Get list of all healthy nodes
Filter Nodes based on Predicates
Prioritise/score Nodes
Get Best scored nodes
Choose a node (Round Robin)
Node Selectors
Node Affinity
Taints and Tolerations
Go
XL
SUV
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
# foo == A
- key: foo
operator: In
values:
- A
# bar != C
- key: bar
operator: NotIn
values:
- C
kind: Pod
spec:
nodeSelector:
nvme-ssd: true
Photo by Chad Kirchoff on Unsplash