Hello Im new to minikube and I cant connect to an exposed service. I created an Api .Net Core, I builded the image, go it into my private registry and then i created an deployment with an yml file that works. But i cant expose that deployment as service. Everytime after I expose it its all fine but I cant connect to it via the port and the minikube ip adress. If I try to connect to the ipadress:port I get connection refused.
Deployment yml file:
kind: Deployment
apiVersion: apps/v1
metadata:
name: testapp1-deployment
labels:
app: testapp1
spec:
replicas: 2
selector:
matchLabels:
app: testapp1
template:
metadata:
labels:
app: testapp1
version: v0.1
spec:
containers:
- name: testapp1-deployment
image: localhost:5000/testapp1
imagePullPolicy: Never
resources:
requests:
cpu: 120m
ports:
- containerPort: 80
Service yml file:
apiVersion: v1
kind: Service
metadata:
name: testapp1-service
spec:
type: NodePort
selector:
app: testapp1
ports:
- protocol: TCP
port: 80
targetPort: 80