Task
Create a pod with the following characteristics, and leave it running when complete:
- The pod must run in the
frontendnamespace. Check if the namespace has already been created and create if necessary- The name of the pod should be
cache- Use the
library/redisimage with the3.2tag- Expose port
6379
kubectl create ns frontend
Answer1:
kubectl run cache --image=library/redis:3.2 --port 6379 -n frontend
Answer2:
kubectl -n frontend run cache --image=library/redis:3.2 --port 6379 --expose
