I have the following deployment
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: redis
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: redis
spec:
containers:
- image: redis:alpine
name: redis
resources: {}
status: {}
Question 1 : How do you expose this deployment via a ClusterIP service on port 8080.
Question 2 : How would I create a new Ingress Type NetworkPolicy to allows only the pods with label access=redis to access the deployment.