To create a deployment using YAML file create a deployment.yaml file that contains information of the number of replicas and the images tto be used. write the following yaml code to the deployment.yaml
Answers
Answered by
0
[root@kubernetes-master ~]# cat httpd-basic-deployment.yaml
kind: Deployment
apiVersion: apps/v1beta1
metadata:
name: my-httpd
spec:
replicas: 1
template:
metadata:
labels:
app: webservers
spec:
containers:
- name: my-httpd-container1
image: httpd
ports:
- containerPort: 80
Similar questions