yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870
login apisix pod with kubectl exec command,I use the telnet command to
check the stream proxy route, it shows able route to mysql host
```
@MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future
version. Use kubectl exec [POD] -- [COMMAND] instead.
sh-4.2# telnet localhost 9100
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
J
5.7.36@1->t-::kmLEXU'7Lmysql_native_password
```
but when I logout the pod and tried to request with the nodeport , the
connection was closed
```
@MacBook-Pro ~ % telnet localhost 30100
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
```
and here is the service information:
```
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP
PORT(S) AGE
default apisix NodePort 10.111.193.248 <none>
9080:30080/TCP,9100:30100/TCP 39m
```
```
@MacBook-Pro ~ % kubectl describe service apisix
Name: apisix
Namespace: default
Labels: io.kompose.service=apisix
Annotations: kompose.cmd: kompose convert
kompose.version: 1.24.0 (HEAD)
Selector: io.kompose.service=apisix
Type: NodePort
IP Families: <none>
IP: 10.111.193.248
IPs: <none>
LoadBalancer Ingress: localhost
Port: http-proxy 9080/TCP
TargetPort: 9080/TCP
NodePort: http-proxy 30080/TCP
Endpoints: 10.1.2.186:9080
Port: tcp-proxy 9100/TCP
TargetPort: 9100/TCP
NodePort: tcp-proxy 30100/TCP
Endpoints: 10.1.2.186:9100
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
```
and the apisix pod information:
```
@MacBook-Pro ~ % kubectl describe pod apisix-557f5f646f-r69z9
Name: apisix-557f5f646f-r69z9
Namespace: default
Priority: 0
Node: docker-desktop/192.168.65.4
Start Time: Sun, 12 Dec 2021 22:39:14 +0800
Labels: io.kompose.network/apisix=true
io.kompose.service=apisix
pod-template-hash=557f5f646f
Annotations: kompose.cmd: kompose convert
kompose.version: 1.24.0 (HEAD)
Status: Running
IP: 10.1.2.186
IPs:
IP: 10.1.2.186
Controlled By: ReplicaSet/apisix-557f5f646f
Containers:
apisix:
Container ID:
docker://e9d11d0e8681b4bd18162fa7cb4cdf5288a172a3e4b78ccd0687ddfdbd1d685e
Image: apache/apisix:2.11-centos
Image ID:
docker://sha256:f833f46f66c33d4b24e94944129024e6002724b147b701840c807aac9a0b38e7
Ports: 9080/TCP, 9091/TCP, 9443/TCP, 9100/TCP
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP
State: Running
Started: Sun, 12 Dec 2021 22:39:15 +0800
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/usr/local/apisix/conf/config.yaml from apisix-claim1
(ro,path="config.yaml")
/usr/local/apisix/logs from apisix-claim0 (rw)
/usr/local/apisix/third from third-plugins (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-km5r5
(ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
apisix-claim0:
Type: PersistentVolumeClaim (a reference to a
PersistentVolumeClaim in the same namespace)
ClaimName: apisix-claim0
ReadOnly: false
apisix-claim1:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: apisix-config
Optional: false
third-plugins:
Type: HostPath (bare host directory volume)
Path:
/Users/hyunfei/IdeaProjects/APISIX/apisix-docker/example/apisix-lua
HostPathType:
default-token-km5r5:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-km5r5
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 32m default-scheduler Successfully assigned
default/apisix-557f5f646f-r69z9 to docker-desktop
Normal Pulled 32m kubelet Container image
"apache/apisix:2.11-centos" already present on machine
Normal Created 32m kubelet Created container apisix
Normal Started 32m kubelet Started container apisix
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]