我有以下配置来启动rke。当我上rke
时。我得到了错误。
rancher-cluster.yml
nodes:
- address: 192.168.88.246
internal_address: 172.17.0.1
user: dockeruser
role: [controlplane,worker,etcd]
- address: 192.168.88.243
internal_address: 172.17.0.1
user: dockeruser
role: [controlplane,worker,etcd]
- address: 192.168.88.245
internal_address: 172.17.0.1
user: dockeruser
role: [controlplane,worker,etcd]
services:
etcd:
snapshot: true
creation: 6h
retention: 24h
当我上rke
时,出现以下错误
FATA[0059] [network] Can't access KubeAPI port [6443] on Control Plane host: 192.168.88.245
详细记录
[root@localhost ~]# rke up --config ./rancher-cluster.yml
INFO[0000] Building Kubernetes cluster
INFO[0000] [dialer] Setup tunnel for host [192.168.88.243]
INFO[0000] [dialer] Setup tunnel for host [192.168.88.245]
INFO[0000] [dialer] Setup tunnel for host [192.168.88.246]
INFO[0001] [state] Found local kube config file, trying to get state from cluster
INFO[0001] [reconcile] Local config is not valid, rebuilding admin config
INFO[0001] [reconcile] Rebuilding and updating local kube config
INFO[0001] Successfully Deployed local admin kubeconfig at [./kube_config_rancher-cluster.yml]
INFO[0014] Successfully Deployed local admin kubeconfig at [./kube_config_rancher-cluster.yml]
INFO[0026] Successfully Deployed local admin kubeconfig at [./kube_config_rancher-cluster.yml]
INFO[0026] [state] Fetching cluster state from Kubernetes
INFO[0056] Timed out waiting for kubernetes cluster to get state
INFO[0056] [state] Fetching cluster state from Nodes
INFO[0057] [network] Deploying port listener containers
INFO[0058] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.88.246]
INFO[0058] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.88.243]
INFO[0058] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.88.245]
INFO[0059] [network] Successfully started [rke-worker-port-listener] container on host [192.168.88.243]
INFO[0059] [network] Successfully started [rke-worker-port-listener] container on host [192.168.88.246]
INFO[0059] [network] Successfully started [rke-worker-port-listener] container on host [192.168.88.245]
INFO[0059] [network] Port listener containers deployed successfully
INFO[0059] [network] Running etcd <-> etcd port checks
INFO[0060] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0060] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0060] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0060] [network] Running control plane -> etcd port checks
INFO[0061] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0061] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0061] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0061] [network] Running control plane -> worker port checks
INFO[0061] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0061] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0061] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0061] [network] Running workers -> control plane port checks
INFO[0062] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0062] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0062] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0062] [network] Checking KubeAPI port Control Plane hosts
FATA[0062] [network] Can't access KubeAPI port [6443] on Control Plane host: 192.168.88.245
[root@localhost ~]# rke up --config ./rancher-cluster.yml
INFO[0000] Building Kubernetes cluster
INFO[0000] [dialer] Setup tunnel for host [192.168.88.246]
INFO[0000] [dialer] Setup tunnel for host [192.168.88.243]
INFO[0001] [dialer] Setup tunnel for host [192.168.88.245]
INFO[0001] [state] Found local kube config file, trying to get state from cluster
INFO[0001] [reconcile] Local config is not valid, rebuilding admin config
INFO[0001] [reconcile] Rebuilding and updating local kube config
INFO[0001] Successfully Deployed local admin kubeconfig at [./kube_config_rancher-cluster.yml]
INFO[0011] Successfully Deployed local admin kubeconfig at [./kube_config_rancher-cluster.yml]
INFO[0023] Successfully Deployed local admin kubeconfig at [./kube_config_rancher-cluster.yml]
INFO[0023] [state] Fetching cluster state from Kubernetes
INFO[0053] Timed out waiting for kubernetes cluster to get state
INFO[0053] [state] Fetching cluster state from Nodes
INFO[0054] [network] Deploying port listener containers
INFO[0055] [network] Successfully started [rke-etcd-port-listener] container on host [192.168.88.245]
INFO[0055] [network] Successfully started [rke-cp-port-listener] container on host [192.168.88.243]
INFO[0056] [network] Successfully started [rke-worker-port-listener] container on host [192.168.88.245]
INFO[0056] [network] Port listener containers deployed successfully
INFO[0056] [network] Running etcd <-> etcd port checks
INFO[0056] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0056] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0056] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0057] [network] Running control plane -> etcd port checks
INFO[0057] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0057] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0057] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0057] [network] Running control plane -> worker port checks
INFO[0058] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0058] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0058] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0058] [network] Running workers -> control plane port checks
INFO[0058] [network] Successfully started [rke-port-checker] container on host [192.168.88.246]
INFO[0058] [network] Successfully started [rke-port-checker] container on host [192.168.88.245]
INFO[0059] [network] Successfully started [rke-port-checker] container on host [192.168.88.243]
INFO[0059] [network] Checking KubeAPI port Control Plane hosts
FATA[0059] [network] Can't access KubeAPI port [6443] on Control Plane host: 192.168.88.245
在192.168.88.24(节点)中,kube-apiserver
已经在运行。
我已经打开了端口
firewall-cmd --zone=public --add-port=6443/tcp --permanent
firewall-cmd --reload
答案 0 :(得分:1)
问题是internal_address IP都相同。此设置用于设置节点在节点到节点连接上应使用的IP地址。 当您的服务器位于NAT之后时,我们通常会看到此选项。
请尝试以下cluster.yml
nodes:
- address: 192.168.88.246
internal_address: 192.168.88.246
user: dockeruser
role: [controlplane,worker,etcd]
- address: 192.168.88.243
internal_address: 192.168.88.243
user: dockeruser
role: [controlplane,worker,etcd]
- address: 192.168.88.245
internal_address: 192.168.88.245
user: dockeruser
role: [controlplane,worker,etcd]
services:
etcd:
snapshot: true
creation: 6h
retention: 24h
答案 1 :(得分:0)
您还有问题吗?如果需要,建议您转到Rancher闲暇频道... http://slack.rancher.io/