Ashu27
#1
Hi, I’ve executed this command on my terminal
“kubectl expose pod redis --port=6379 --name=redis-service --dry-run=client -o yaml”
and it created the pod redis.
But how it created the selector
named
“tier:db”?
I haven’t specified anywhere in this command.
Please check the below scr
eenshot
Hello, @Ashu27
By default, in the expose command. It takes from the pod specs.
Ashu27
#3
Thanks for the help @Tej-Singh-Rana. And what if I need custom labels?
I think it’s a custom labels which you defined in the pod creation time?
Ashu27
#5
Oh damn! @Tej-Singh-Rana I am turning towards the road of confusion
It will not. In the only beginning level, you will face difficulties after that you will deploy Pod and use custom labels like a Pro.