Cannot get traffic inside
Hey,
I've built a deployment, service and ingress however I fail to reach it on my local web (using minikube).
I've just uploaded a random HTML to my github user, and this "app" is just cloning my git repo containing the HTML file to the container and I try to reach it locally..
My Deployment file: (My container is working well 100%).
apiVersion: apps/v1 kind: Deployment metadata: name: test-deployment labels: app: nginx spec: replicas: 1 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: ourapp image: nginx:latest ports: - containerPort: 80 volumeMounts: - name: cdn mountPath: /usr/share/nginx/html initContainers: - name: init image: alpine/git:latest volumeMounts: - name: cdn mountPath: /home/cdn command: ["/bin/sh", "-c"] args: ['git clone $GIT_CLONE /home/cdn'] env: - name: GIT_CLONE valueFrom: configMapKeyRef: name: config-map key: kvsource volumes: - name: cdn emptyDir: {}
My service file:
apiVersion: v1 kind: Service metadata: name: my-cip-service spec: selector: app: nginx type: ClusterIP ports: - protocol: TCP port: 80 targetPort: 8080
I've applied the ingress addon on Minikube and generated the following ingress file:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress spec: rules: - host: localhost http: paths: - path: / pathType: Prefix backend: service: name: my-cip-service port: number: 80
However I still unable to reach my app at localhost/ address..
I'm stuck on it for a long time.. Do you see anything wrong here?
---