0

我正在远程裸机实例上关注这个裂变教程。当我运行 curl $FISSION_URL ( http://192.168.42.152:31313 ) 时,它不会返回。我运行了以下命令:

  1. 须藤 lsof -i | grep 192.168.42.152。

ntpd 2860 ntp 32u IPv4 55241 0t0 UDP 192.168.42.1:ntp

dnsmasq 3392 libvirt-dnsmasq 5u IPv4 33870 0t0 UDP 192.168.42.1:域

dnsmasq 3392 libvirt-dnsmasq 6u IPv4 33871 0t0 TCP 192.168.42.1:domain (LISTEN)

  1. 卷曲-vvv $FISSION_URL。

重建网址: http: //192.168.42.152 :31313/

正在尝试 192.168.42.152...

连接到 192.168.42.152 (192.168.42.152) 端口 31313 (#0)

获取/HTTP/1.1

主机:192.168.42.152:31313

用户代理:curl/7.47.0

接受:/

  1. sudo iptables -L

    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    DOCKER-ISOLATION  all  --  anywhere             anywhere            
    DOCKER     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             192.168.122.0/24     ctstate RELATED,ESTABLISHED
    ACCEPT     all  --  192.168.122.0/24     anywhere            
    ACCEPT     all  --  anywhere             anywhere            
    REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
    REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
    ACCEPT     all  --  anywhere             anywhere            
    REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
    REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
    Chain DOCKER (1 references)
    target     prot opt source               destination         
    Chain DOCKER-ISOLATION (1 references)
    target     prot opt source               destination                 
    
    RETURN     all  --  anywhere             anywhere     
    

我不确定我应该如何进行调试。我相信主机能够与来宾(minikube IP)连接但无法检索数据。谁能指导我如何解决这个问题?

4

1 回答 1

1

启动 minikube 实例并运行文档中给出的命令后

kubectl create -f http://fission.io/fission.yaml
kubectl create -f http://fission.io/fission-nodeport.yaml

然后运行以下设置 kubernetes 上下文

kubectl config set-context minikube --namespace fission

现在要获取刚刚运行的当前部署的状态,请发布以下命令的输出:

kubectl get pods -o wide
kubectl get svc -o wide
kubectl get events 

对我来说它正在工作:

$ export FISSION_URL=http://$(minikube ip):31313
$ curl $FISSION_URL
{"message": "Fission API", "version": "0.1.0"}

我的状态如下所示:

$ kubectl get pods -o wide
NAME                           READY     STATUS    RESTARTS   AGE       IP           NODE
controller-1637203237-g5lw1    1/1       Running   0          16m       172.17.0.6   minikube
etcd-2122244727-6vl4v          1/1       Running   0          16m       172.17.0.8   minikube
kubewatcher-2300228496-7kbw3   1/1       Running   1          16m       172.17.0.7   minikube
poolmgr-3531518326-nsxmr       1/1       Running   3          16m       172.17.0.5   minikube
router-2621354073-q1hw7        1/1       Running   3          16m       172.17.0.4   minikube

$ kubectl get svc -o wide
NAME         CLUSTER-IP   EXTERNAL-IP   PORT(S)        AGE       SELECTOR
controller   10.0.0.191   <nodes>       80:31313/TCP   15m       svc=controller
etcd         10.0.0.41    <none>        2379/TCP       16m       svc=etcd
poolmgr      10.0.0.252   <none>        80/TCP         16m       svc=poolmgr
router       10.0.0.108   <nodes>       80:31314/TCP   15m       svc=router

和事件在这里

于 2017-04-11T04:59:21.070 回答