2. Walking through Kubernetes Concepts
An overview of Kubernetes
kubectl version --short
Client Version: v1.10.4
Server Version: v1.10.2
kubectl run my-first-nginx --image=nginx "my-first-nginx"
deployment.apps "my-first-nginx" created
cat << EOF > nginx.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-first-nginx
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
EOF
kubectl create -f nginx.yaml
deployment.apps "my-first-nginx" created
kubectl get deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
my-first-nginx 1 1 1 1 2m
kubectl get deploy
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
my-first-nginx 1 1 1 1 2m