Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete webshow pod and recreate new one would not expose service in Kind cluster #3

Open
Colstuwjx opened this issue Sep 17, 2020 · 2 comments

Comments

@Colstuwjx
Copy link

I've been setup a k8s cluster using kind, and create webshow deployment via:

curl -sSL https://mirrors.chaos-mesh.org/v0.9.1/web-show/deploy.sh | sh

Things works well at the first time:

$  curl -sSL https://mirrors.chaos-mesh.org/v0.9.1/web-show/deploy.sh | sh

service/web-show unchanged
deployment.apps/web-show created
Waiting for pod running

$ curl -I http://localhost:8081
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 2157
Content-Type: text/html; charset=utf-8
Last-Modified: Wed, 15 Apr 2020 08:40:20 GMT
Date: Thu, 17 Sep 2020 12:44:48 GMT

$ kubectl get pods
NAME                       READY   STATUS    RESTARTS   AGE
web-show-7b477b5c6-47wg7   1/1     Running   0          117s

After delete the pod by manually, it is broken:

$ kubectl delete pod web-show-7b477b5c6-47wg7
pod "web-show-7b477b5c6-47wg7" deleted

$ kubectl get pods
NAME                       READY   STATUS              RESTARTS   AGE
web-show-7b477b5c6-hfc5p   0/1     ContainerCreating   0          3s

$ kubectl get pods
NAME                       READY   STATUS    RESTARTS   AGE
web-show-7b477b5c6-hfc5p   1/1     Running   0          91s

$ curl -I http://localhost:8081
curl: (56) Recv failure: Connection reset by peer
@Colstuwjx
Copy link
Author

After dive into the deploy.sh, I found it should be port-forward issue, I've been typed the forward cmd by manually and do delete pod after one minute, and I got the following error:

kubectl port-forward --address 0.0.0.0 svc/web-show 8081:8081

Forwarding from 0.0.0.0:8081 -> 8081
Handling connection for 8081

Handling connection for 8081
E0918 12:01:56.332646    4718 portforward.go:400] an error occurred forwarding 8081 -> 8081: error forwarding port 8081 to pod 06eab838c95aa75396c720b02ff94ef6f2f203e549a4f0b48e58cce8a3c7ec76, uid : network namespace for sandbox "06eab838c95aa75396c720b02ff94ef6f2f203e549a4f0b48e58cce8a3c7ec76" is closed

It seems not a big issue though...

@fzalila
Copy link

fzalila commented Dec 7, 2020

I encountered the same issue when I tried to do a PodKill with the ChoasMesh dashboard.
You need, at first, manually execute this line:
https://github.com/chaos-mesh/chaos-mesh/blob/master/examples/web-show/deploy.sh#L120 ,
and, then, you can execute the port-forward command as here
https://github.com/chaos-mesh/chaos-mesh/blob/master/examples/web-show/deploy.sh#L122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants