I try to configure metall in minicube and get
there is no route to the node
In minicube I add metall
minikube ip
192.168.49.2
Here is the file metallb-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.49.101-192.168.49.111
I apply it and check it with the command
kubectl describe configmaps -n metallb-system
Here is the file nginx-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
Here is the file service nginx-service.yaml
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
type: LoadBalancer
selector:
app: nginx
ports:
- port: 80
name: http
Running all this, checking
kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 14m
nginx LoadBalancer 10.101.36.165 192.168.49.101 80:31744/TCP 10m
and I go to the address:
curl http://192.168.49.101
as a result , I get
curl: (7) Failed to connect to 192.168.49.101 port 80: Нет маршрута до узла