Prasanth V:
root@master:~# kubectl apply -f rs-definition.yml
replicaset.apps/myapp-rs created
root@master:~# kubectl get rs
NAME DESIRED CURRENT READY AGE
kubeserve-deployment-57cbd5c578 2 2 2 301d
kubeserve-deployment-b8db968b7 0 0 0 301d
my-rs 2 2 2 307d
myapp-rs 2 2 2 9s
root@master:~# kubectl describe rs myapp-rs
Name: myapp-rs
Namespace: default
Selector: type=testpods
Labels: app=myapp
type=testpods
Annotations: Replicas: 2 current / 2 desired
Pods Status: 2 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels: app=myapp
type=testpods
Containers:
myapp-rs-pod-cont:
Image: nginx
Port: 80/TCP
Host Port: 0/TCP
Environment: <none>
Mounts: <none>
Volumes: <none>
Events:
Type Reason Age From Message
Normal SuccessfulCreate 23s replicaset-controller Created pod: myapp-rs-7vrsw
root@master:~#
root@master:~# kubectl get pods myapp-rs
Error from server (NotFound): pods “myapp-rs” not found
root@master:~# kubectl get pods | grep -i “myapp-rs”
myapp-rs-7vrsw 1/1 Running 0 73m