what is a deployment?

How to create a deployment?

using a command:

kubectl create deployment my-webdep --image=nginx --replicas=1 --port=80

using yml file:

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
kubectl apply -d deployment.yml
kubectl get deployments

Engineer