0% found this document useful (0 votes)
6 views2 pages

1

The document defines Kubernetes resources including Pods, a multi-container Pod, a Service, and a Deployment for an Nginx application. It specifies configurations such as container images, ports, and replica counts. Additionally, it includes commands for managing deployment rollouts and scaling the application.

Uploaded by

717822e238
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

1

The document defines Kubernetes resources including Pods, a multi-container Pod, a Service, and a Deployment for an Nginx application. It specifies configurations such as container images, ports, and replica counts. Additionally, it includes commands for managing deployment rollouts and scaling the application.

Uploaded by

717822e238
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

apiVersion: v1

kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
apiVersion: v1
kind: Pod
metadata:
name: multi-container-pod
spec:
containers:
- name: nginx
image: nginx:latest
- name: busybox
image: busybox
command: ["/bin/sh", "-c", "while true;do echo Hello from Busybox; sleep 5;
done"]
apiVersion: v1
kind: Service
metadata:
name: nginx-svc
spec:
selector:
app: nginx-app
ports:
- port: 80
targetPort: 80
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels: nginx-app
spec:
containers:
- name: nginx
image: nginx:latest
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deploy
spec:
replicas: 2
selector:
matchLables:
app: nginx
template:
metadata:
lables:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
---------------------------------------------------------
kubectl rollout history deployment
kubectl rollout history nginx-deployment --revision=1
kubectl rollout undo deployment
kubectl rollout undo deployment/nginx-deployment --to-revision=1
kubectl rollout sttus deployment
kubectl scale deployment nginx-deployment --replicas=5

You might also like