Changes between Version 5 and Version 6 of k8snetworking2023


Ignore:
Timestamp:
Dec 7, 2023, 7:51:19 AM (12 months ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • k8snetworking2023

    v5 v6  
    77MetalLB can be installed via a manifest or using Helm. We'll use the manifest method here.
    88
    9 '''1. Apply the MetalLB manifest:'''
     9''1. Apply the MetalLB manifest:''
    1010
    1111{{{
     
    1717Note: Ensure you're using the latest version of MetalLB.
    1818
    19 '''2. Verify the Installation.'''
     19''2. Verify the Installation.''
    2020
    2121`kubectl get pods -n metallb-system`
     
    2727MetalLB can operate in either Layer 2 mode or BGP mode. We'll use Layer 2 mode for simplicity.
    2828
    29 1. Create a ConfigMap for MetalLB: Define a range of IP addresses that MetalLB will manage. Create a file named `metallb-pool.yaml` with the following content:
     29''1. Create a ConfigMap for MetalLB: Define a range of IP addresses that MetalLB will manage. Create a file named `metallb-pool.yaml` with the following content:''
    3030
    3131{{{
     
    4747`kubectl apply -f metallb-pool.yaml`
    4848
    49 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:
     49''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:''
    5050
    5151{{{
     
    9292kubectl get svc wordpress-service
    9393
    94 3. MetalLB will assign an external IP from the defined range to your service.
     94''3. MetalLB will assign an external IP from the defined range to your service.''
    9595
    9696'''Step 4: Access the Service'''
     
    128128'''Step 1: Expose Your Service Using NodePort'''
    129129
    130 1. Create a Service of Type NodePort for Your Web Application: Suppose you have a deployment named webapp. You'll need to create a service for it. Here's an example YAML for the service:
     130''1. Create a Service of Type NodePort for Your Web Application: Suppose you have a deployment named webapp. You'll need to create a service for it. Here's an example YAML for the service:''
    131131
    132132{{{
     
    153153'''Step 2: Set Up Ingress to Route to the NodePort Service'''
    154154
    155 1. Define an Ingress Resource: Create an Ingress resource that routes traffic to your NodePort service. Here's an example YAML for the Ingress:
     155''1. Define an Ingress Resource: Create an Ingress resource that routes traffic to your NodePort service. Here's an example YAML for the Ingress:''
    156156
    157157{{{
     
    187187Ensuring that your Ingress Controller is properly set up and accessible from outside the Kubernetes cluster involves several key steps. This setup is crucial for allowing external traffic to reach your services through the Ingress rules you've defined. Here's a breakdown of what this entails:
    188188
    189 1. Deploying the Ingress Controller
     189''1. Deploying the Ingress Controller''
    190190
    191191• Choose an Ingress Controller: There are several Ingress Controllers available, such as NGINX, Traefik, HAProxy, etc. NGINIX is a popular choice due to its stability and feature set.
     
    199199v1.8.2/deploy/static/provider/cloud/deploy.yaml
    200200}}}
    201 
    202 2. Exposing the Ingress Controller
     201''
     2022. Exposing the Ingress Controller''
    203203
    204204
     
    209209'''Step 4: DNS Configuration'''
    210210
    211 1. Configure DNS: Map the DNS record to the external IP address of one of your cluster nodes (if using NodePort for the Ingress Controller) or to the external IP provided by the LoadBalancer (if using LoadBalancer for the Ingress Controller).
     211''1. Configure DNS: Map the DNS record to the external IP address of one of your cluster nodes (if using NodePort for the Ingress Controller) or to the external IP provided by the LoadBalancer (if using LoadBalancer for the Ingress Controller).''
    212212
    213213Read More: