使用
启用自动边车注入,并使用所有正确的插件启动minikube
minikube start --vm-driver=xhyve --extra-config=apiserver.Admission.PluginNames="Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,GenericAdmissionWebhook,ResourceQuota" --kubernetes-version=v1.7.5
我看到侧面车与微服务一起。
NAME READY STATUS RESTARTS AGE
microse-598544478f-hs8pv 2/2 Running 2 1d
但是现在启用istio我无法进入患者微服务。
export GATEWAY_URL=$(kubectl get po -n istio-system -l istio=ingress -o 'jsonpath={.items[0].status.hostIP}'):$(kubectl get svc istio-ingress -n istio-system -o 'jsonpath={.spec.ports[0].nodePort}')
curl -iv -H "Content-Type: application/json" -X PUT $GATEWAY_URL -d '{"firstField":"firstData"}'
我得到以下内容:
* Rebuilt URL to: 192.168.64.4:31496/
* Trying 192.168.64.4...
* TCP_NODELAY set
* Connected to 192.168.64.4 (192.168.64.4) port 31496 (#0)
> PUT / HTTP/1.1
> Host: 192.168.64.4:31496
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 84
>
* upload completely sent off: 84 out of 84 bytes
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< date: Fri, 03 Nov 2017 13:53:31 GMT
date: Fri, 03 Nov 2017 13:53:31 GMT
< server: envoy
server: envoy
< connection: close
connection: close
< content-length: 0
content-length: 0
<
* Closing connection 0
没有istio我做这个PUT没问题。谢谢你的帮助。
答案 0 :(得分:0)
您是否为自己的服务创建了Ingress资源?你需要这样的东西:
{{1}}