aylei / kubectl-debug

This repository is no longer maintained, please checkout https://github.com/JamesTGrant/kubectl-debug.
Apache License 2.0
2.31k stars 303 forks source link

使用--agentless --port-forward 参数无法运行 #118

Open evaxiang opened 4 years ago

evaxiang commented 4 years ago

kubectl debug -n ns podname --agentless --port-forward 运行失败

Agent Pod info: [Name:debug-agent-pod-a0df1c92-d63c-11ea-a38e-fa163e0860d3, Namespace:default, Image:aylei/debug-agent:latest, HostPort:10027, ContainerPort:10027] Waiting for pod debug-agent-pod-a0df1c92-d63c-11ea-a38e-fa163e0860d3 to run... Error occurred while waiting for pod to run: pod ran to completion error: pod ran to completion

查询pod状态: Status: Failed Reason: PodFitsHostPorts Message: Pod Predicate PodFitsHostPorts failed

已关闭istio-injection,还是一样报错

evaxiang commented 4 years ago

尝试删除debug-agent-pod-XXX,重新执行--agentless --port-forward ,还是一样

yaoyaoio commented 4 years ago

请问一下 你这个在mac下运行的么 还是linux?

aylei commented 3 years ago

@evaxiang 可以检查一下对应 node 上 port 是否被占用

另外 --port-forward 模式可以做一个优化,不需要开 hostPort,完全绕开这个问题

136