我创建了一个k3s集群并禁用了服务负载均衡器& traefik。我通过清单文件安装了metallb。另外,我在下面创建了一个名为"config"的带有地址池的配置Map,所以我不知道为什么metallb控制器说"no available ips"。
ubuntu@mark:~$ k describe svc nginx
Name: nginx
Namespace: default
Labels: app=nginx
Annotations: <none>
Selector: app=nginx
Type: LoadBalancer
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.43.29.17
IPs: 10.43.29.17
Port: <unset> 80/TCP
TargetPort: 80/TCP
NodePort: <unset> 30584/TCP
Endpoints: 10.42.4.4:80
Session Affinity: None
External Traffic Policy: Cluster
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning AllocationFailed 34s metallb-controller Failed to allocate IP for "default/nginx": no available IPs
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.136.206-192.168.136.209
1条答案
按热度按时间jljoyd4f1#
安装最新的稳定版本:
定义IP地址池