您好,登錄后才能下訂單哦!
這篇文章給大家介紹Istio的本地運行是怎樣的,內容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。
提供http/grpc兩種接口,其中grpc是雙向通道
可用命令:
./pilot-discovery discovery --kubeconfig /root/.kube/config --caCertFile ./docker_build/docker.pilot/cacert.pem
其中, /root/.kube/config 是本地 K8S 的配置文件 ./docker_build/docker.pilot/cacert.pem 是Istio編譯后自帶有的證書文件
同時,它還隱式的要求配置文件:./etc/istio/config/mesh,可用的一份如下(未必最簡化):
{ "disablePolicyChecks": true, "disableMixerHttpReports": true, "proxyListenPort": 15001, "connectTimeout": "10s", "protocolDetectionTimeout": "5s", "defaultConfig": { "configPath": "./etc/istio/proxy", "binaryPath": "/usr/local/bin/envoy", "serviceCluster": "istio-proxy", "drainDuration": "45s", "parentShutdownDuration": "60s", "discoveryAddress": "localhost:15012", "proxyAdminPort": 15000, "controlPlaneAuthPolicy": "NONE", "statNameLength": 189, "concurrency": 2, "envoyAccessLogService": { }, "envoyMetricsService": { }, "statusPort": 15020, "terminationDrainDuration": "5s" }, "outboundTrafficPolicy": { "mode": "ALLOW_ANY" }, "defaultServiceExportTo": [ "*" ], "defaultVirtualServiceExportTo": [ "*" ], "defaultDestinationRuleExportTo": [ "*" ], "localityLbSetting": { "enabled": true }, "dnsRefreshRate": "5s", "reportBatchMaxEntries": 100, "reportBatchMaxTime": "1s", "certificates": [ ], "thriftConfig": { }, "serviceSettings": [ ] }
可通過http/grpc兩種方式訪問pilot-discovery,具體細分為 GPRC/DELTAGRPC/REST 等 其中DELTA前綴,表示:增量獲取,且獲取后斷開本次鏈接
可用命令
./envoy -c envoy.yaml
其中,envoy.yaml 內容為(未必最簡化):
{ "node": { "id": "router~172.26.33.33~istio123456~local", "cluster": "localhost-cluster", "locality": { } }, "admin": { "access_log_path": "/dev/null", "address": { "socket_address": { "address": "0.0.0.0", "port_value": 15000 } } }, "dynamic_resources": { "lds_config": { "ads": {} }, "cds_config": { "ads": {} }, "ads_config": { "api_type": "GRPC", "grpc_services": [ { "envoy_grpc": { "cluster_name": "xds-grpc" } } ] } }, "static_resources": { "clusters": [ { "name": "xds-grpc", "type": "STRICT_DNS", "respect_dns_ttl": true, "dns_lookup_family": "V4_ONLY", "connect_timeout": "1s", "lb_policy": "ROUND_ROBIN", "load_assignment": { "cluster_name": "xds-grpc", "endpoints": [{ "lb_endpoints": [{ "endpoint": { "address":{ "socket_address": {"address": "127.0.0.1", "port_value": 15010} } } }] }] }, "circuit_breakers": { "thresholds": [ { "priority": "DEFAULT", "max_connections": 100000, "max_pending_requests": 100000, "max_requests": 100000 }, { "priority": "HIGH", "max_connections": 100000, "max_pending_requests": 100000, "max_requests": 100000 } ] }, "upstream_connection_options": { "tcp_keepalive": { "keepalive_time": 300 } }, "max_requests_per_connection": 1, "http2_protocol_options": { } } ] } }
當envoy啟動后,可在瀏覽器通過 http://所在可訪問IP:15000/ 訪問 envoy 的簡單管理界面(說是管理,其實大多僅可看,不可編輯)
關于Istio的本地運行是怎樣的就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。