I am having 1 Master node and 1 worker node in K8s on premises cluster. Node Ip are 10.128.0.4
& 10.128.0.5
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
learning-1 Ready control-plane,master 43h v1.23.12 10.128.0.4 <none> CentOS Linux 7 (Core) 3.10.0-1160.59.1.el7.x86_64 docker://20.10.21
learning-2 Ready <none> 43h v1.23.12 10.138.0.5 <none> CentOS Linux 7 (Core) 3.10.0-1160.49.1.el7.x86_64 docker://20.10.21
I am using MetallB to get external IP's. The config file is below: I provide Node Ip range in below file. I want to confirm whether it's correct or not?
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 10.128.0.4 - 10.128.0.5 #Update this with your Nodes IP range
The svc
is assigned with External IP
as 10.128.0.4
.
Logs:
[root@learning-1 ss_kubernetese]# kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 43h
svc-sdb-cluster ClusterIP None <none> 3306/TCP 93m
svc-sdb-cluster-ddl LoadBalancer 10.96.30.94 10.128.0.4 3306:30720/TCP 93m
Ref link: metallb load balancer ip address range