-
Notifications
You must be signed in to change notification settings - Fork 12
Kubernetes Glossary
kimschles edited this page Mar 27, 2019
·
20 revisions
Check out these resources:
Node
- A worker machine in K8s
- A computer in a datacenter
Annotations
- A way of adding metadata to a K8s object
- Labels are another way of doing this
"metadata": {
"annotations": {
"key1" : "value1",
"key2" : "value2"
}
}
Layer
Cluster
- A set of computers that run containers managed by K8s
- A cluster refers to hardware
CRD
- Custom Resource Definition
- You can create your own API class in K8s
Pod
- Generally, one container
- One process in one container
- An example of multiple containers in one pod: file puller, volume, web server
- A group of containers that K8 deploys and schedules. A pod is one node, and all containers in a pod share an IP address, kernel namespaces and filesystems via localhost
- A pod is the simplest thing in K8s. A set of running containers on your cluster.
- All things in one pod share an IP address and port space. They can communicate with each other via
localhost
Deployment
- Manages pods
- Like a recipe written in
yaml
- Creates and updates pods
- Can scale up and down
- Can roll back or roll forward to different versions
Service
- Networking
- Defines access to pods
- Labels and selectors define route
- ClusterIP, NodePort, LoadBalancer
- Can define intra-cluster load balancing
- Can create cloud load balancers
ClusterIP
- Creates intra-cluster IP
- Routes to pods
- No external port
- No external IP
- kube-dns entry
NodePort
- Creates intra-cluster IP
- Routes to pods
- Maps port on VM into cluster
- No external IP
- kube-dns entry
LoadBalancer
- Most permissive
- creates intra-cluster IP
- Maps port on VM into cluster
- external IP (cloud providers)
- kube-dns entry
Ingress
- A door that allows access from outside the cluster
- Routes to pods in a service
- All your routing table rules can be kept in one resource
- URL aware
- External IP (cloud providers)
- Reverse proxy
Label
Master Node
- Control everything in the cluster
- Contains the Controller Manager, Scheduler and API Server
- A computer in the cluster
Worker Node
- Houses all the containers and resources
Controller Manager Scheduler Kubelet
HPA
- Horizontal Pod Autoscaler
- An API that scales the number of pod replicas based on CPU utilization or custom metric targets
Job
- A task that runs until it is completed
Service
- An API object that descibes how to access objects
- Exposes things
- Like a load balancer: allows us to access pods in a consistent way
Taint
- On a node
- When a node is supposed to avoid scheduling pods with certain properties
- Part of 'node affinity'
Tolerations
- On a pod (?)
Namespace
- A way to segment out your workflow and workload
- Applications within the same namespace can talk to each other
Configmap
- A way to store non-confidential configuration data
- Example:
data:
game.properties: |
enemies=aliens
lives=3
enemies.cheat=true
enemies.cheat.level=noGoodRotten
secret.code.passphrase=UUDDLRLRBABAS
secret.code.allowed=true
secret.code.lives=30
ui.properties: |
color.good=purple
color.bad=yellow
allow.textmode=true
how.nice.to.look=fairlyNice
kind: ConfigMap
metadata:
creationTimestamp: 2016-02-18T18:52:05Z
name: game-config
namespace: default
resourceVersion: "516"
selfLink: /api/v1/namespaces/default/configmaps/game-config
uid: b4952dc3-d670-11e5-8cd0-68f728db1985```
Replication Controller
* Ensures that a certain number of pod replicas run at the same time
* Makes sure a set of pods is always up, running and available
Secrets
* K8 has a secrets object
* Secrets are stored in etcd
* RO: store secrets in a cloud storage bucket, not in the container
* How to store confidential data like API keys
* Secrets are obfuscated with base64 encoding
Liveness Probe
* Determines when K8s restarts a container
* Types of liveness probes:
* a command returns a 0 exit value
* an http request returns a response with a code 200-500
* A TCP socket is established
Readiness Probe
* Determines when a container is ready to accept traffic
* Checks is a container is ready to accept traffic, and does not do any more checks
Health Check
* Establishes a connection on a TCP socket
* HTTP `GET` returns 200-399
* A command returns exit 0
Job
* Runs once to completion
* Good for Rails or Django tasks
Network Policy
*
Daemonset
* A daemonset makes sure a copy of a pod runs on all (or a specified 'some') the nodes in a cluster
PDB
* Pod Distribution Budget
* Goal: high availability
* You can set the minimum avialable pods
* You can set the maximum unavailable pods
kube-apiserver
* Contains information about the state of all K8s objects
*
Controller
* a watch loop
CronJob
StatefulSet
Namespace
PersistentVolume
gke: in the intial setup, when you select a number of nodes, that is nodes per zone