Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

楼主有没有用二进制部署过高可用集群? #48

Closed
dotbalo opened this issue Jan 10, 2019 · 7 comments
Closed

楼主有没有用二进制部署过高可用集群? #48

dotbalo opened this issue Jan 10, 2019 · 7 comments

Comments

@dotbalo
Copy link

dotbalo commented Jan 10, 2019

今天突然发现一个问题,二进制部署高可用集群,转发采用的ipvs,部署traefik如果采用hostPort模式,就会导致集群无法创建pod,楼主有没有遇到过?

@Devying
Copy link

Devying commented Jan 15, 2019

二进制的用过,但是你说的这个问题我用的也是ipvs ,traefik用的没问题,除非你端口冲突了

@Devying
Copy link

Devying commented Jan 15, 2019

@dotbalo 你是不是用的DaemonSet的方式?那你用hostPort就是占用了节点的443端口了.

@Devying
Copy link

Devying commented Jan 15, 2019

DaemonSet 中的 Pod 可以使用 hostPort,从而可以通过 Node IP 访问到 Pod。客户端能通过某种方法知道 Node IP 列表,并且基于此也可以知道端口。

@cookeem
Copy link
Owner

cookeem commented Jan 15, 2019

hostPort和hostNetwork的最大区别是pod的IP地址不一样,hostPort使用clusterIP,但是hostNetwork使用的是Node ip。
你可以对比一下是否必须使用nodeip

@Devying
Copy link

Devying commented Jan 16, 2019

@cookeem 能贴一个yaml出来对比下吗?很少用这个daemonSet

@cookeem
Copy link
Owner

cookeem commented Jan 17, 2019

@cookeem
Copy link
Owner

cookeem commented Jan 17, 2019

@dotbalo ipvs这种网络模式还没有了解过。不过官方文档是有这种模式的说明

https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies

In this mode, kube-proxy watches Kubernetes Services and Endpoints, calls netlink interface to create ipvs rules accordingly and syncs ipvs rules with Kubernetes Services and Endpoints periodically, to make sure ipvs status is consistent with the expectation. When Service is accessed, traffic will be redirected to one of the backend Pods.
Similar to iptables, Ipvs is based on netfilter hook function, but uses hash table as the underlying data structure and works in the kernel space. That means ipvs redirects traffic much faster, and has much better performance when syncing proxy rules.

@dotbalo dotbalo closed this as completed Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants