mnt – isolates filesystem mount pointsuts – isolates hostname;
ipc – isolates message queues, semaphores,
shared memory
pid – isolates PID number space;
containers have their own init process with PID 1net – private network stack (interfaces,
routing tables, sockets)user – isolates UID/GID number spaces;
cgroup – isolates cgroup root directory
default, kube-system, kube-public,
kube-node-lease
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 3 # tells deployment to run 3 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
kube-proxy manage routing to backend Pods.NodeIP:NodePort.
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: ClusterIP
app=nginx receive traffic through ClusterIP.nginx-svc.default.svc.cluster.localhttp://nginx-svc:80.