Changes between Version 7 and Version 8 of k8snetworking2023


Ignore:
Timestamp:
Dec 8, 2023, 3:16:32 PM (5 months ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • k8snetworking2023

    v7 v8  
    3434kind: IPAddressPool
    3535metadata:
    36 name: ippool
     36  name: ippool
    3737  namespace: metallb-system
    3838spec:
     
    4242}}}
    4343
    44 Replace 192.168.1.240-192.168.1.250 with your desired IP range.
     44Replace IP ranges with your desired IP range.
    4545
    4646Apply the Pool:
     
    4848`kubectl apply -f metallb-pool.yaml`
    4949
    50 ''2. Create a L2 Advertisement: When additional IP ranges are defined in the config- map, they need to be advertised on to the network. Create a file named L2add.yaml with the following content:''
     50''2. Create a L2 Advertisement: When additional IP ranges are defined in the config- map, they need to be advertised on to the network. Create a file named `L2add.yaml` with the following content:''
    5151
    5252{{{
     
    5555kind: L2Advertisement
    5656metadata:
    57   name: example
     57  name: l2ads
    5858  namespace: metallb-system
    5959spec:
     
    9292Check the Service:
    9393
    94 kubectl get svc wordpress-service
     94`kubectl get svc wordpress`
    9595
    9696''3. MetalLB will assign an external IP from the defined range to your service.''
     
    165165metadata:
    166166  name: webapp-ingress
     167  annotations:
     168    nginx.ingress.kubernetes.io/rewrite-target: /
    167169spec:
    168170  ingressClassName: nginx
    169171  rules:
    170   - host:
    171      http:
    172         paths:
    173         - path: /
     172  - http:
     173      paths:
     174      - path: /webapp
    174175        pathType: Prefix
    175176        backend:
    176             service:
    177                name: webapp-nodeport-service
    178                port:
    179                    number: 80
     177          service:
     178            name: webapp-nodeport-service
     179            port:
     180              number: 80
    180181}}}
    181182
     
    2052062. Exposing the Ingress Controller''
    206207
    207 
    208 • Service Type: The Ingress Controller itself is exposed via a Kubernetes Service. This Service needs to be accessible from outside the cluster. There are two common ways to do this:
    209 - !NodePort: The Service is exposed on a high port (e.g., 30000-32767) on each node's IP address. External traffic can reach the Ingress Controller by hitting any node's IP at this port.
    210 - !LoadBalancer: If your cluster is running in a cloud environment that supports !LoadBalancer Services, this is a more straightforward way to expose your Ingress Controller. For our setup lets allow the metalLB setup to lease an external IP address that routes traffic to the Ingress Controller.
     208Check IP issued from the load balancer
     209
     210`kubectl get svc --all-namespaces`
     211
    211212
    212213=== Step 4: DNS Configuration ===