1- add xx.xx.xx.x reg.k8s.internal to hosts
2- "insecure-registries": [ "reg.k8s.internal:32000" ] docker engine to jumper PC

# Install Network
## Create External Virtual Switch in Hyper-V

1. Open Hyper-V Manager
2. Click "Virtual Switch Manager" in the Actions pane
3. Select "External" and click "Create Virtual Switch"
4. Configure the switch:
    - Name: e.g., "ExternalSwitch"
    - Connection type: External network
    - Select the physical network adapter
    - Check "Allow management operating system to share this network adapter"
5. Click "Apply" and "OK"

**Troubleshooting:** If you get an error that the NIC is already in use:
1. Remove all existing virtual switches in Hyper-V Manager
2. Open Network Connections (ncpa.cpl)
3. Right-click on the physical NIC → Properties
4. Uncheck "Hyper-V Extensible Virtual Switch"
5. Click OK and retry creating the virtual switch

## Configure VM Network Settings

1. In the VM, set a static IP address:
    ```bash
    sudo nano /etc/netplan/01-netcfg.yaml
    ```

    Example configuration:
    ```yaml
    network:
        version: 2
        ethernets:
            eth0:
                dhcp4: no
                addresses:
                    - xxx.xxx.xxx.xxx/24 #empty ip in same range
                routes:
                    - to: 0.0.0.0/0
                      via: xxx.xxx.xxx.xxx #same host ip
                nameservers:
                    addresses:
                        - xxx.xxx.xxx.xxx #same host ip
    ```

    Apply the configuration:
    ```bash
    sudo netplan apply
    ```
    # Install Network
    ## Create External Virtual Switch in Hyper-V

    1. Open Hyper-V Manager
    2. Click "Virtual Switch Manager" in the Actions pane
    3. Select "External" and click "Create Virtual Switch"
    4. Configure the switch:
        - Name: e.g., "ExternalSwitch"
        - Connection type: External network
        - Select the physical network adapter
        - Check "Allow management operating system to share this network adapter"
    5. Click "Apply" and "OK"

    **Troubleshooting:** If you get an error that the NIC is already in use:
    1. Remove all existing virtual switches in Hyper-V Manager
    2. Open Network Connections (ncpa.cpl)
    3. Right-click on the physical NIC → Properties
    4. Uncheck "Hyper-V Extensible Virtual Switch"
    5. Click OK and retry creating the virtual switch

    ## Configure VM Network Settings

    1. In the VM, set a static IP address:
        ```bash
        sudo nano /etc/netplan/01-netcfg.yaml
        ```

        Example configuration:
        ```yaml
        network:
            version: 2
            ethernets:
                eth0:
                    dhcp4: no
                    addresses:
                        - xxx.xxx.xxx.xxx/24 #empty ip in same range
                    routes:
                        - to: 0.0.0.0/0
                          via: xxx.xxx.xxx.xxx #same host ip
                    nameservers:
                        addresses:
                            - xxx.xxx.xxx.xxx #same host ip
        ```

        Apply the configuration:
        ```bash
        sudo netplan apply
        ```

    ## Check connectivity from jumper PC

    1. Verify network connectivity:
        ```bash
        ping xxx.xxx.xxx.xxx #VM IP
        ```

    2. Test SSH access to the VM:
        ```bash
        ssh k8s@xxx.xxx.xxx.xxx #VM IP
        ```


## Create New TLS

- sudo microk8s stop
- sudo microk8s refresh-certs --cert server.crt
- sudo nano /var/snap/microk8s/current/certs/csr.conf.template
- alt_names => IP.3 = 192.168.4.124
- sudo microk8s refresh-certs --cert server.crt
- sudo microk8s start


## Post-Installation Notes

**Important:** After K8s is operational, update the VM IP (192.168.4.124) in the following ConfigMaps:
- `uat-workflow-k8s-env-js`
- `uat-core-k8s-env-js`

**Public Port Mappings:**
- 30070: Workflow
- 30080: Core System
- 30090: S3 Console