如何在没有 LoadBalancer 的情况下在 Kubernetes 中公开 dgraph-ratel-public
How to expose dgraph-ratel-public without LoadBalancer in Kubernetes
每当我将 Kubernetes 服务公开为负载均衡器时,外部 IP 永远处于 pending
状态。
因此,我无法通过浏览器访问 dgraph ratle
。
我需要通过 NodePort 公开我的服务,以便我可以使用 IP:node-port
访问它。
这里我为我的 dgraph ratle
public 创建了一个 NodePort 服务。我可以 curl
IP:node-port
并且能够得到结果,但我无法在我的网络浏览器中访问它。
我在 Digital Ocean 上使用 Kubernetes
Kubernetes 版本 v1.12
。
帮我:
获取待处理的外部 IP 或
在public或
中公开容器
我错过了什么?
您无法通过 Internet 访问 private IP addresses,因此您需要在 Kubernetes 集群前面创建一个负载均衡器,或者通过某种 VPN 进入您的集群。
Kubernetes 默认 cloud controller manager doesn't support DigitalOcean. You can create a Load Balancer for Kubernetes cluster nodes manually, or you need to install an additional cloud-controller-manager for DigitalOcean cloud as it is mentioned in the manual:
- Clone the git repo:
$ git clone https://github.com/digitalocean/digitalocean-cloud-controller-manager.git
- To run digitalocean-cloud-controller-manager, you need a DigitalOcean personal access token. If you are already logged in, you can create one here. Ensure the token you create has both read and write access.
- Once you have a personal access token, create a Kubernetes Secret as a way for the cloud controller manager to access your token. (using script, or manually)
- Deploy appropriate version of cloud-controller-manager:
$ kubectl apply -f releases/v0.1.10.yml
deployment "digitalocean-cloud-controller-manager" created
NOTE: the deployments in releases/ are meant to serve as an example. They will work in a majority of cases but may not work out of the box for your cluster.
Cloud Controller Manager current version is: v0.1.10. This means that the project is still under active development and may not be production ready. The plugin will be bumped to v1.0.0 once the DigitalOcean Kubernetes product is released.
在这里你可以找到例子:
每当我将 Kubernetes 服务公开为负载均衡器时,外部 IP 永远处于 pending
状态。
因此,我无法通过浏览器访问 dgraph ratle
。
我需要通过 NodePort 公开我的服务,以便我可以使用 IP:node-port
访问它。
这里我为我的 dgraph ratle
public 创建了一个 NodePort 服务。我可以 curl
IP:node-port
并且能够得到结果,但我无法在我的网络浏览器中访问它。
我在 Digital Ocean 上使用 Kubernetes
Kubernetes 版本 v1.12
。
帮我:
获取待处理的外部 IP 或
在public或
中公开容器
我错过了什么?
您无法通过 Internet 访问 private IP addresses,因此您需要在 Kubernetes 集群前面创建一个负载均衡器,或者通过某种 VPN 进入您的集群。
Kubernetes 默认 cloud controller manager doesn't support DigitalOcean. You can create a Load Balancer for Kubernetes cluster nodes manually, or you need to install an additional cloud-controller-manager for DigitalOcean cloud as it is mentioned in the manual:
- Clone the git repo:
$ git clone https://github.com/digitalocean/digitalocean-cloud-controller-manager.git
- To run digitalocean-cloud-controller-manager, you need a DigitalOcean personal access token. If you are already logged in, you can create one here. Ensure the token you create has both read and write access.
- Once you have a personal access token, create a Kubernetes Secret as a way for the cloud controller manager to access your token. (using script, or manually)
- Deploy appropriate version of cloud-controller-manager:
$ kubectl apply -f releases/v0.1.10.yml
deployment "digitalocean-cloud-controller-manager" created
NOTE: the deployments in releases/ are meant to serve as an example. They will work in a majority of cases but may not work out of the box for your cluster.
Cloud Controller Manager current version is: v0.1.10. This means that the project is still under active development and may not be production ready. The plugin will be bumped to v1.0.0 once the DigitalOcean Kubernetes product is released.
在这里你可以找到例子: