> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Access and Port Requirements for Installation

> Provides the port and access requirements needed for the installation of Apinizer on Kubernetes. Covers port permissions and internet access requirements critical for the Kubernetes cluster to function correctly.

<Info>
  **Note:** These port accesses have been checked and approved for Kubernetes 1.31.0 and Flannel 0.27.4 versions. Ports may vary in different Kubernetes and Flannel versions.
</Info>

## Internet Access Requirements

Internet access to the following addresses is required during installation:

* `archive.ubuntu.com` / `cdn.redhat.com`
* `*.docker.com`
* `*.docker.io`
* `*.k8s.io`
* `*.amazonaws.com` (please refer to Kubernetes documentation for the reason for this access)
* `*.mongodb.org`
* `artifacts.elastic.co`

## Kubernetes Cluster Port Requirements

The following network diagram example explains which connection ports need to be configured to enable worker nodes' access to master nodes within a Kubernetes cluster. To ensure healthy communication between both public and private network zones within the Kubernetes cluster, certain connection ports need to be opened.

### Worker Node → Master Node Port Permissions

The connection ports specified in the diagram are necessary for Kubernetes Worker Nodes to communicate seamlessly with Master Nodes. These ports must be open from all Worker Nodes to Master Nodes for the cluster to function correctly.

<AccordionGroup>
  <Accordion title="Worker → Master Port Requirements">
    | Port        | Protocol | Description             | Required |
    | ----------- | -------- | ----------------------- | -------- |
    | 6443        | HTTPS    | Kubernetes API Server   | ✅        |
    | 10250       | HTTPS    | Kubelet API             | ✅        |
    | 10259       | HTTPS    | Kube-scheduler          | ✅        |
    | 10257       | HTTPS    | Kube-controller-manager | ✅        |
    | 2379-2380   | TCP      | etcd client/server      | ✅        |
    | 8472        | UDP      | Flannel VXLAN           | ✅        |
    | 51820/51821 | UDP      | Flannel Wireguard       | ⚠️       |
  </Accordion>
</AccordionGroup>

### Master Node → Worker Node Port Permissions

Connections from Kubernetes Master/Control Plane servers to Worker servers are necessary for communication between Kubernetes cluster components. These ports must be open from all Master Nodes to Worker Nodes for the cluster to function correctly.

<AccordionGroup>
  <Accordion title="Master → Worker Port Requirements">
    | Port        | Protocol | Description       | Required |
    | ----------- | -------- | ----------------- | -------- |
    | 10250       | HTTPS    | Kubelet API       | ✅        |
    | 30000-32767 | TCP/UDP  | NodePort Services | ✅        |
    | 8472        | UDP      | Flannel VXLAN     | ✅        |
    | 51820/51821 | UDP      | Flannel Wireguard | ⚠️       |
  </Accordion>
</AccordionGroup>

### Master Node ↔ Master Node Port Permissions

Connections between Kubernetes Master servers are necessary for communication between Kubernetes cluster components. These ports must be open between all Master Nodes for the cluster to function correctly.

<AccordionGroup>
  <Accordion title="Master ↔ Master Port Requirements">
    | Port      | Protocol | Description             | Required |
    | --------- | -------- | ----------------------- | -------- |
    | 6443      | HTTPS    | Kubernetes API Server   | ✅        |
    | 2379-2380 | TCP      | etcd client/server      | ✅        |
    | 10250     | HTTPS    | Kubelet API             | ✅        |
    | 10259     | HTTPS    | Kube-scheduler          | ✅        |
    | 10257     | HTTPS    | Kube-controller-manager | ✅        |
    | 8472      | UDP      | Flannel VXLAN           | ✅        |
  </Accordion>
</AccordionGroup>

<Warning>
  **Note:** All default ports can be changed, but in this case, operations and permissions should be done carefully.
</Warning>

## Kubernetes High Availability (HA) Cluster

When setting up a Kubernetes High Availability (High Access) Cluster:

### Load Balancer VIP Access

On Kubernetes Master/Control Plane and Worker servers, necessary permissions should be defined to access the Load Balancer's VIP over port 6443. This VIP performs load balancing by routing to Master nodes' 6443 ports.

<CardGroup cols={2}>
  <Card title="Load Balancer VIP" icon="network-wired">
    * VIP → Master Node 1:6443
    * VIP → Master Node 2:6443
    * VIP → Master Node 3:6443
  </Card>

  <Card title="HAProxy Example" icon="code">
    HAProxy example is available for Load Balancer configuration.
  </Card>
</CardGroup>

## Apinizer Port Requirements

Kubernetes uses ports in the 30000-32767 range for external access by default. Although specific default ports are used for Apinizer, these can be customized optionally.

### For Worker Servers

<CardGroup cols={2}>
  <Card title="Manager Port" icon="server">
    **Port:** 32080<br />
    **Protocol:** HTTP<br />
    **Description:** Apinizer Manager access
  </Card>

  <Card title="Worker Port" icon="server">
    **Port:** 30080 or 30090<br />
    **Protocol:** HTTP<br />
    **Description:** Apinizer Worker (API Gateway) access
  </Card>
</CardGroup>

### For MongoDB Servers

<CardGroup cols={1}>
  <Card title="MongoDB Port" icon="database">
    **Port:** 25080<br />
    **Protocol:** TCP<br />
    **Description:** MongoDB access (inter-node communication for Replica Set)
  </Card>
</CardGroup>

### For Elasticsearch Servers

<CardGroup cols={2}>
  <Card title="Elasticsearch HTTP" icon="search">
    **Port:** 9200<br />
    **Protocol:** HTTP<br />
    **Description:** Elasticsearch HTTP API access
  </Card>

  <Card title="Elasticsearch Transport" icon="search">
    **Port:** 9300<br />
    **Protocol:** TCP<br />
    **Description:** Elasticsearch cluster communication
  </Card>
</CardGroup>

## Special Cases

<Warning>
  **Note:** If applications such as Ingress Controller, Metric Server, Rancher, Lens, etc. will be used or if Kubernetes will be installed in a cloud environment, port requirements should be checked externally.
</Warning>

## Port Requirements Summary

### Basic Ports

<CardGroup cols={2}>
  <Card title="Kubernetes API" icon="network-wired">
    * **6443**: Kubernetes API Server
    * **10250**: Kubelet API
    * **10259**: Kube-scheduler
    * **10257**: Kube-controller-manager
  </Card>

  <Card title="Network Plugin" icon="network-wired">
    * **8472**: Flannel VXLAN
    * **51820/51821**: Flannel Wireguard (optional)
  </Card>

  <Card title="Apinizer" icon="server">
    * **32080**: Manager
    * **30080/30090**: Worker
  </Card>

  <Card title="Database" icon="database">
    * **25080**: MongoDB
    * **9200**: Elasticsearch HTTP
    * **9300**: Elasticsearch Transport
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Network Connection Matrix" icon="diagram-project" href="/en/concepts/deployment/network-connection-matrix">
    Learn port requirements between Apinizer components
  </Card>

  <Card title="Network Topology and Port Requirements" icon="network-wired" href="/en/concepts/deployment/network-topology">
    Get detailed information about port permissions
  </Card>

  <Card title="Installation Topologies" icon="sitemap" href="/en/setup/installation-topologies">
    Review installation topologies
  </Card>

  <Card title="Kubernetes Installation" icon="layer-group" href="/en/setup/kubernetes/kubernetes">
    Review Kubernetes installation steps
  </Card>
</CardGroup>
