0

I applied my react kubernetes manifest file on minikube with the service

I am trying to access it on the browser but I am getting error

This site can’t be reached

deployment.yml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  labels:
    app: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
        - name: frontend
          image: arch-frontend:1.0
          ports:
            - containerPort: 3000
          env:
            - name: REACT_APP_DEV_BASE_URL
              value: backend
          imagePullPolicy: IfNotPresent

serivce.yml

apiVersion: v1
kind: Service
metadata:
  name: frontend
spec:
  selector:
    app: frontend
  type: LoadBalancer
  ports:
    - protocol: TCP
      port: 3000
      targetPort: 3000
      nodePort: 30012
  externalIPs:
    - 192.168.64.2

I tried to access it on the browser using 192.168.64.2:30012 and 192.168.64.2:3000 but none worked

I did minikube servvice service-name still did not work

Samson
  • 113
  • 5

0 Answers0