我正在尝试按照https://istio.io/docs/guides/bookinfo/和https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports上的说明将istio放在微型库上。
然后我导出端口和主机
export INGRESS_PORT = $(kubectl -n istio-system获取服务istio-ingressgateway -o jsonpath ='{。spec.ports [?(@。name ==“ http”)]。nodePort}')
export SECURE_INGRESS_PORT = $(kubectl -n istio-system获取服务 istio-ingressgateway -o jsonpath ='{。spec.ports [?(@。name ==“ https”)]。nodePort}')
export INGRESS_HOST = $(kubectl get po -l istio = ingressgateway -n istio-system -o'jsonpath = {。items [0] .status.hostIP}')
据我了解,下一步是使用istio网关配置入口。在下面的Yaml中,我应该输入什么主机值?
cat <<EOF | istioctl create -f -
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: book-gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
-
EOF
答案 0 :(得分:0)
您应指定{
"entity1": {
"entity2a": {
"foo": "bar"
},
"entity2b": {
"foo": "bar"
},
"some": "value"
}
}
。请注意https://istio.io/docs/guides/bookinfo/#running-on-kubernetes
定义应用程序的入口网关
您已经为此准备了一个Yaml文件:samples/bookinfo/routing/bookinfo-gateway.yaml
对入口网关进行故障排除:
export const entity2Schema = new schema.Entity('entity2s')
export const entity2ValueSchema = new schema.Values(entity2Schema)
export const entity1Schema = new schema.Entity('entity1s', {
entity2ValueSchema
})
export const myschema = new schema.Object({ entity1: entity1Schema })
答案 1 :(得分:0)
即使Sidecar正在运行,我也必须使用
如果您正在使用手动边车注入,请使用以下命令
$ kubectl apply -f <(istioctl kube-inject -f 样本/bookinfo/kube/bookinfo.yaml)
https://istio.io/docs/guides/bookinfo/
下面的自动注入无效。
如果您使用启用了自动边车注入的集群, 只需使用kubectl部署服务
$ kubectl apply -f samples / bookinfo / kube / bookinfo.yaml复制
这是因为需要为自动注射提供标签。
Istio-Sidecar注入器将自动注入Envoy容器 假设您在标有的名称空间中运行 istio-injection =已启用
$ kubectl标签名称空间istio-injection = enabled $ kubectl create -n -f .yaml复制