Skip to main content

Reserve an IP for a Purpose

Introduction

Sometimes you need to reserve and assign an IP for a specific purpose (for example, for a node, service, load balancer, etc.). This document explains how to do that.


Public IP

To find and allocate an available public IP:

  1. Log in to IPAM: https://ipam.hamravesh.ir

    IPAM

  2. Open the IP Addresses section:

    IP Addresses

  3. Filter by the tags you need and review the results:

    Filter

  4. Find an IP with the status Reserved:

    Reserved IP

  5. Select the IP and click Edit:

    Select and edit

  6. Update the IP fields:

    • Set the required tags
    • Add a clear description
    • Change the status from Reserved to Active

    Update fields


Private IP

Private IPs are also managed in IPAM, but the IPAM instance is private and must be accessed via port-forwarding.

Access IPAM (NetBox) via Port Forward

Use the following cluster and namespace:

cluster    -> hamravesh-c18
namespace -> hamravesh-k8s
  1. List services in the namespace and find the service named netbox:
kubectl -n hamravesh-k8s get svc
  1. Port-forward the service:
kubectl -n hamravesh-k8s port-forward svc/netbox 8080:80
  1. Open the UI in your browser:
http://localhost:8080

Credentials

The login credentials are stored in the netbox secret under the manually_defined_user field:

kubectl -n hamravesh-k8s get secret netbox -oyaml

After logging in, the procedure is the same as for public IPs (find a reserved IP, then tag it, describe it, and set it to Active).