Changes between Version 7 and Version 8 of k8snetworking2023
- Timestamp:
- Dec 8, 2023, 3:16:32 PM (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
k8snetworking2023
v7 v8 34 34 kind: IPAddressPool 35 35 metadata: 36 name: ippool36 name: ippool 37 37 namespace: metallb-system 38 38 spec: … … 42 42 }}} 43 43 44 Replace 192.168.1.240-192.168.1.250with your desired IP range.44 Replace IP ranges with your desired IP range. 45 45 46 46 Apply the Pool: … … 48 48 `kubectl apply -f metallb-pool.yaml` 49 49 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.yamlwith 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:'' 51 51 52 52 {{{ … … 55 55 kind: L2Advertisement 56 56 metadata: 57 name: example57 name: l2ads 58 58 namespace: metallb-system 59 59 spec: … … 92 92 Check the Service: 93 93 94 kubectl get svc wordpress-service 94 `kubectl get svc wordpress` 95 95 96 96 ''3. MetalLB will assign an external IP from the defined range to your service.'' … … 165 165 metadata: 166 166 name: webapp-ingress 167 annotations: 168 nginx.ingress.kubernetes.io/rewrite-target: / 167 169 spec: 168 170 ingressClassName: nginx 169 171 rules: 170 - host: 171 http: 172 paths: 173 - path: / 172 - http: 173 paths: 174 - path: /webapp 174 175 pathType: Prefix 175 176 backend: 176 177 178 179 177 service: 178 name: webapp-nodeport-service 179 port: 180 number: 80 180 181 }}} 181 182 … … 205 206 2. Exposing the Ingress Controller'' 206 207 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. 208 Check IP issued from the load balancer 209 210 `kubectl get svc --all-namespaces` 211 211 212 212 213 === Step 4: DNS Configuration ===