singularity-cri
singularity-cri copied to clipboard
some question about containerPort
What are the steps to reproduce this issue?
1.create two pod with the same yaml to run mpi workload in that two pod
2.lunch a container in one pod using "kubectl exec -it xx-pod /bin/bash"
3.by ssh to lunch another pod but error ssh: connect to host 172.30.48.34 port 22: Connection refused, meanwhile i can't ssh to the host (ip is 10.18.127.3) due to 'ssh: connect to host 10.18.127.3 port 22: Network is unreachable'
yaml is :
apiVersion: v1
kind: Pod
metadata:
name: mpi-test-4
spec:
containers:
- command:
- /bin/sh
- -c
- |
mkdir -p /var/run/sshd; /usr/sbin/sshd -D; sleep 600;
image: volcanosh/example-mpi:0.0.1
name: mpi-test-4
ports:
- containerPort: 22
name: mpijob-port
workingDir: /home
nodeSelector:
kubernetes.io/hostname: k8s03
restartPolicy: OnFailure