Hi All,
we are having around 10 microservices, deployed to kubernetes.
We are using post man to test all microservices.
http://:80/product//
Is it possible to provide only
http://:80//
If replace - path: /product/ to - path: /*
all post man requests going to single container.
Deployment yaml file.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: product
namespace: product
labels:
app:product
spec:
replicas: 1
selector:
matchLabels:
app: product
template:
metadata:
labels:
app: product
spec:
containers:
- name: product
image:
service:TAG
resources:
limits:
cpu: 1000m
memory: 500Mi
requests:
cpu: 100m
env:
- name:
value: {ENVI}
- name:
value: “”
ports:
- name: service
containerPort: 80
protocol: TCP
- name: product
containerPort: 5307
protocol: TCP
imagePullPolicy: Always
imagePullSecrets:
- name:
# replace line above for jenkins
#- name: $KUBERNETES_SECRET_NAME
apiVersion: v1
kind: Service
metadata:
name: product
namespace: product
labels:
app: product
spec:
ports:
- port: 80’’
targetPort: 5307
protocol: TCP
type: ClusterIP
selector:
app: product
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: product
namespace: product
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: ${HOST}
http:
paths:- path: /product/
backend:
serviceName: product
servicePort: 80
- path: /product/
Kindly suggest me.