.Hi
I have Minikube on mac machine. I am new to the kubernates. I am doing POC of statefullset feature.
I have deployed a headless service and asp.net core web application (.Net 3.1) .It is simple web site application implemented using MVC.
I wanted to access website deployed on pod. Since there is no cluster ip/external IP, i find it difficult to access my website. I have following kuberantes YAML file.
apiVersion: v1
kind: Service
metadata:
name: webcacheservice2
labels:
app: webcacheservice2
spec:
ports:
- port: 80
name: webcacheservice2
clusterIP: None
selector:
app: webcachepod2
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: web2
spec:
serviceName: webcacheservice2
replicas: 3
selector:
matchLabels:
app: webcachepod2
template:
metadata:
labels:
app: webcachepod2
spec:
containers:
- name: webcachesample
image: docker.io/tbadhe2/test:webcachesample
ports:
- containerPort: 80
name: web2
volumeMounts:
- name: www
mountPath: /usr/share/nginx/html
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
kindly assist how i can access web site deployed on pods.