I have an http app, which listen on port 3000 (I get a route to check health).
I expose dockerfile 3000 port.
I create a helm chart with helm create
The only thing I modify is the service and tests.
Into service, I set port to 443 (needed by my ingress) and targetPort to 3000.
Into tests pod, I modify the port too:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['mysvc:443']
restartPolicy: Never
But get Connecting to mysvc:443 (10.96.235.205:443) wget: can't connect to remote host (10.96.235.205): Connection refused
with https://github.com/helm/chart-testing during CI (GHA)
I can see my app logs, and probes works too (on 3000) I don't inderstand what is wrong.
Thanks
Update: Add mysvc definition
apiVersion: v1
kind: Service
metadata:
name: mysvc
labels:
{{- include "mysvc_chart.labels" . | nindent 4 }}
spec:
type: clusterIP
ports:
- port: 443
targetPort: http
protocol: TCP
name: http
- port: 50051
targetPort: grpc
protocol: TCP
name: grpc
- port: 21
targetPort: ftp
protocol: TCP
name: ftp
- port: 3001
targetPort: metrics
protocol: TCP
name: metrics
selector:
{{- include "mysvc_chart.selectorLabels" . | nindent 4 }}
Update2: Using nmap, I can see
443/tcp closed https```
The port from my deployment was wrong -----