Even I have created with correct labels in nginx-replicaset throwing error. why?
Thank you I resolved it
It’s actually unclear which lab you’re doing. Could you please give me the full name of the lab, so we can check?
@KrishnaHarish ,
if it is kubernates - Deploy ReplicaSet in Kubernetes Cluster, try below commands.
- At first kubectl utility configure and working from jump server, run below commands:
→ kubectl get deploy
→ kubectl get services
check the result - Create httpd.yaml file with all the parameters given in task
→ vi /tmp/httpd.yaml(write in the yamal mentioned below or check the yamal )
→ cat /tmp/httpd.yaml
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: httpd-replicaset
labels:
app: httpd_app
type: front-end
spec:
replicas: 4
selector:
matchLabels:
app: httpd_app
template:
metadata:
labels:
app: httpd_app
type: front-end
spec:
containers:
- name: httpd-container
image: httpd:latest
3. Run below command to create pod
→ kubectl create -f /tmp/httpd.yaml
4. Wait for pods to get running status
→ kubectl get pods
check and finish the task.