У меня есть кластер K8S (под управлением Linux) в симфонии Stratoscale.Он имеет кластерный IP-адрес IP1, назначенный Symphony.Я установил Консул в кластере.Я могу «вставить» ключ Consul KV в один модуль (через интерфейс командной строки, доступный на веб-странице модуля) и «получить» его из другого модуля.Служба Консульства K8S, называемая «консул-консул-сервер», имеет такую спецификацию в отношении портов:
{
"kind": "Service",
"metadata": {
"name": "consul-consul-server",
"namespace": "consul",
...
},
"spec": {
"ports": [
{
"name": "http",
"protocol": "TCP",
"port": 8500,
"targetPort": 8500,
"nodePort": 30323
},
{
"name": "serflan-tcp",
"protocol": "TCP",
"port": 8301,
"targetPort": 8301,
"nodePort": 31056
},
{
"name": "serflan-udp",
"protocol": "UDP",
"port": 8301,
"targetPort": 8301,
"nodePort": 31056
},
{
"name": "serfwan-tcp",
"protocol": "TCP",
"port": 8302,
"targetPort": 8302,
"nodePort": 30717
},
{
"name": "serfwan-udp",
"protocol": "UDP",
"port": 8302,
"targetPort": 8302,
"nodePort": 30717
},
{
"name": "server",
"protocol": "TCP",
"port": 8300,
"targetPort": 8300,
"nodePort": 32091
},
{
"name": "dns-tcp",
"protocol": "TCP",
"port": 8600,
"targetPort": "dns-tcp",
"nodePort": 31688
},
{
"name": "dns-udp",
"protocol": "UDP",
"port": 8600,
"targetPort": "dns-udp",
"nodePort": 31688
}
],
"selector": {
"app": "consul",
"component": "server",
"release": "consul"
},
"clusterIP": "10.104.86.253",
"type": "NodePort",
"externalTrafficPolicy": "Cluster",
},
"status": {
"loadBalancer": {}
}
}
Как запустить клиентский агент Консула из командной строки извне кластера?Основываясь на том, что я прочитал в https://www.consul.io/docs/agent/cloud-auto-join.html#kubernetes-k8s-,, я попробовал следующее:
консул-агент -retry-join "поставщик = пространство имен k8s = консул label_selector = \" приложение = консул, компонент = сервер \ "host_network= true "-client =-bind = -join =-config-file = C: \ Config \ consul.hcl -server-port = 32091
и несколько других комбинаций, но все они приводят к этой ошибке:
==> Starting Consul agent...
==> Error starting agent: 2 errors occurred:
* listen udp 161.92.250.34:8600: bind: The requested address is not valid in its context.
* listen tcp 161.92.250.34:8600: bind: The requested address is not valid in its context.
Любая идея, чтоЯ делаю не так?Заранее спасибо.