How to: Task - Service
Create a Pod named `webapp` in the `pig` Namespace (create new if required), running `nginx:1.20-alpine` image. The Pod should have a Annotation `motd="Welcome to Piouson's CKAD Bootcamp"`. Expose the Pod on port 8080.
hints
hint 1
Did you create the Pod in the `pig` Namespace? You should create the Namespace if it doesn't exist.
hint 2
You can set Annotation when creating a Pod, see `kubectl run --help`
hint 3
Actually, besides creating the Namespace, you can complete the rest of the task in a single command. Completing this task any other way is not but time wasting. Have a deeper look at `kubectl run --help`.
hint 4
Did you test you are able to access the app via the Service? This task is not complete until you confirm the application is accessible via the Service.
hint 5
You can test the Service by connecting a shell to a temporary Pod `kubectl run -it --rm --image=nginx:alpine -n $NAMESPACE -- sh` and run `curl $SERVICE_NAME:$PORT`. If you did not create the temporary Pod in the same Namespace, you will need to add the Namespace to the hostname `curl $SERVICE_NAME.$NAMESPACE:$PORT`. \
  Testing this way, with Service hostname, is also a way to confirm DNS is working in the cluster.