Skip to main content
Enterprise

Linux Root-Level Changes

Overview

This document provides a comprehensive reference of system-level changes made to a Linux host when installing NetBox Enterprise Embedded Cluster. Understanding these changes is essential for security audits, system administration, and troubleshooting.

Purpose: This reference helps administrators:

  • Review changes before installation for security approval
  • Understand file system modifications for backup planning
  • Troubleshoot installation or runtime issues
  • Audit system changes for compliance requirements

Scope: All changes are related to the embedded Kubernetes cluster (k0s), container runtime (containerd), and NetBox Enterprise application components.

Non-Destructive Installation

NetBox Enterprise installation does not modify existing system files or configurations outside the directories listed below. All changes are contained within dedicated paths for the embedded cluster.

Installation Overview

NetBox Enterprise creates a self-contained embedded cluster with the following components:

ComponentPurposeInstall Location
k0sKubernetes distribution/usr/local/bin/k0s, /etc/k0s, /var/lib/embedded-cluster
containerdContainer runtime/opt/containerd, /run/containerd
CNI PluginsContainer networking/etc/cni, /opt/cni, /var/lib/cni
kubeletKubernetes node agent/var/lib/kubelet
NetBox ApplicationMain applicationWithin Kubernetes pods
LogsSystem and application logs/var/log/embedded-cluster, /var/log/pods

Directories Created

Configuration Directories

Configuration files for Kubernetes and container networking.

PathDescriptionContains
/etc/k0sk0s Kubernetes configurationCluster configuration YAML, certificates, kubeconfig
/etc/cniContainer Network Interface configCNI plugin configuration files
/etc/containerdContainerd configurationcontainerd config.toml (if manually configured)
/etc/systemd/system/Service unit filesk0scontroller.service, containerd.service unit files

Binary and Plugin Directories

Executable binaries for Kubernetes and container operations.

PathDescriptionContains
/usr/local/bin/k0sk0s binaryMain Kubernetes distribution binary
/usr/libexec/k0sk0s helper executablesInternal service components and utilities
/opt/cniCNI plugin binariesContainer networking plugins
/opt/containerdContainerd binariesContainer runtime executables and libraries

Runtime Directories

Temporary runtime data, sockets, and process information.

PathDescriptionContains
/run/k0sk0s runtime filesPID files, runtime state
/run/containerdContainerd runtimeUnix sockets for containerd API, shims
/run/calicoCalico runtime dataCalico CNI plugin runtime state (if used)

Data and State Directories

Persistent data for Kubernetes components and container storage.

PathDescriptionContains
/var/lib/embedded-clusterMain installation directoryk0s installation, cluster state, configuration
/var/lib/k0sk0s data directoryKubernetes data, certificates (symlink to embedded-cluster)
/var/lib/kubeletKubelet statePod manifests, volumes, plugins, pod data
/var/lib/containersOCI container storageContainer images, layers, metadata
/var/lib/cniCNI plugin stateNetwork state, IP allocations
/var/lib/calicoCalico persistent dataCalico network plugin configuration (if used)

Logging Directories

Log files for troubleshooting and monitoring.

PathDescriptionContains
/var/log/embedded-clusterInstallation and cluster logsEmbedded Cluster installer logs, cluster events
/var/log/podsKubernetes pod logsPer-pod log files organized by namespace/pod name
/var/log/containersContainer logsSymlinks to container logs (typically from journald)
/var/log/calicoCalico logsCalico agent and networking logs (if used)

Control Group (cgroup) Hierarchies

Resource isolation for Kubernetes workloads.

PathDescriptionPurpose
/sys/fs/cgroup/kubepodsKubernetes pod cgroupsCPU, memory, and I/O limits for pods
/sys/fs/cgroup/system.slice/containerd.serviceContainerd service cgroupResource limits for containerd process
/sys/fs/cgroup/system.slice/k0scontroller.servicek0s controller cgroupResource limits for k0s controller process
cgroup Considerations

Systems with non-standard cgroup configurations or strict resource controls may require adjustment. The embedded cluster uses systemd cgroup driver for compatibility.

System Services

NetBox Enterprise installs the following systemd services:

ServiceDescriptionAuto-StartPurpose
k0scontroller.servicek0s Kubernetes controllerYesManages Kubernetes control plane (API server, etcd, scheduler)
containerd.serviceContainer runtimeYes (if manually installed)Provides container execution environment

View Service Status:

# Check k0s controller
systemctl status k0scontroller

# Check containerd (if manually installed)
systemctl status containerd

Network Port Requirements

Required network ports for cluster operation:

External Access Ports

Ports that require external access from users and administrators.

PortProtocolServiceAccess FromPurpose
80TCPNetBox HTTPExternal usersNetBox web UI and API (redirects to HTTPS)
443TCPNetBox HTTPS & Diode gRPCExternal usersSecure NetBox web UI, API, and Diode ingestion
30000TCPAdmin ConsoleAdministratorsNetBox Enterprise admin console

Internal Cluster Ports

Ports used for internal Kubernetes cluster communication.

PortProtocolServiceAccess FromPurpose
6443TCPKubernetes APIInternalKubernetes API server for kubectl, kubelet communication
2379-2380TCPetcdInternalKubernetes backing store (control plane only)
10250TCPKubelet APIInternalHealth checks, log retrieval, pod metrics
10251-10252TCPkube-scheduler, kube-controllerInternalKubernetes control plane components
10255TCPKubelet (read-only)InternalRead-only kubelet metrics
5473TCPCalico Typha (if used)InternalCalico datastore caching layer
10257TCPkube-controller-managerInternalControl plane secure port
10259TCPkube-schedulerInternalScheduler secure port

Pod Networking Ports

Ports used for container networking and service mesh.

PortProtocolServiceAccess FromPurpose
4789UDPVXLANInternalDefault VXLAN overlay networking
8472UDPVXLAN (alternative)InternalAlternative VXLAN port (rarely used)
179TCPBGPInternalBorder Gateway Protocol (if Calico uses BGP mode)
51820UDPWireGuardInternalEncrypted pod networking (if WireGuard enabled)

NodePort Service Range

Port RangeProtocolServiceAccess FromPurpose
30000-32767TCPNodePort servicesVariesKubernetes NodePort service range (admin console uses 30000)
Firewall Configuration Required

Ensure your firewall allows these ports. See distribution-specific guides:

Pod-to-Pod Networking

NetBox Enterprise requires pod-to-pod communication across Kubernetes pod networks:

Network RangePurposeFirewall Requirement
10.244.0.0/17Pod network (range 1)Allow bidirectional traffic
10.244.128.0/17Pod network (range 2)Allow bidirectional traffic

Required Firewall Rules:

  • Allow traffic from 10.244.0.0/17 to 10.244.128.0/17
  • Allow traffic from 10.244.128.0/17 to 10.244.0.0/17

See Special Configurations for restricted environment guidance.

Security Considerations

File Permissions

NetBox Enterprise installation creates files and directories with restricted permissions:

  • Service binaries: Owned by root, executable by root only
  • Configuration files: Readable by root only (contain sensitive data like certificates)
  • Data directories: Owned by root or container runtime user
  • Log files: Readable by root, may be readable by specific service accounts

Sensitive Files

The following files contain sensitive information and should be protected:

PathContainsSecurity Note
/etc/k0s/Kubernetes certificates and keysRoot-only access, TLS certificates for cluster communication
/var/lib/embedded-cluster/Cluster configuration, secretsContains kubeconfig and cluster credentials
/run/k0s/Runtime authentication tokensTemporary tokens for API access
Backup Security

When backing up NetBox Enterprise, ensure /etc/k0s/ and /var/lib/embedded-cluster/ are included and stored securely. These contain cluster certificates and configuration.

SELinux Considerations (RHEL)

On RHEL systems with SELinux enabled, additional security contexts are applied:

  • container_var_lib_t for /var/lib/embedded-cluster/
  • container_runtime_exec_t for k0s and containerd binaries
  • container_ro_file_t for container snapshots

See RHEL SELinux configuration for details.

Disk Space Requirements

Typical disk usage by directory:

DirectoryInitial SizeGrowth RateNotes
/var/lib/embedded-cluster/~500 MBModerateContains k0s, etcd data, grows with cluster state
/var/lib/containers/~2-5 GBHighContainer images, grows with installed plugins
/var/log/embedded-cluster/~50-100 MBLowInstallation logs, relatively static
/var/log/pods/~100 MBModerate to HighApplication logs, grows with usage and retention

Recommendations:

  • Allocate at least 50 GB for /var/lib (see system requirements)
  • Implement log rotation for /var/log/pods/ and /var/log/containers/
  • Monitor disk usage regularly with df -h /var/lib

Cleanup and Uninstallation

Data Loss Warning

Uninstalling NetBox Enterprise removes all cluster data, including NetBox database contents, configuration, and plugins. Ensure backups are current before uninstalling.

To completely remove NetBox Enterprise:

# Stop and remove embedded cluster
/var/lib/embedded-cluster/bin/netbox-enterprise reset

# Remove installation directories
sudo rm -rf /var/lib/embedded-cluster
sudo rm -rf /var/lib/k0s
sudo rm -rf /etc/k0s

# Remove systemd service files
sudo rm -f /etc/systemd/system/k0scontroller.service
sudo systemctl daemon-reload

# Remove k0s binary
sudo rm -f /usr/local/bin/k0s

# Optional: Remove logs
sudo rm -rf /var/log/embedded-cluster
sudo rm -rf /var/log/pods

Directories to preserve for backup before uninstall:

  • /var/lib/embedded-cluster/ - Full cluster state
  • /etc/k0s/ - Certificates and configuration

Troubleshooting

Disk Space Issues

Problem: Installation fails with "no space left on device"

Solution:

# Check disk usage
df -h /var/lib

# Identify large directories
du -sh /var/lib/* | sort -h

# Clean up container images if needed
crictl rmi --prune

Permission Issues

Problem: Services fail to start due to permission errors

Solution:

# Verify ownership
ls -la /var/lib/embedded-cluster
ls -la /etc/k0s

# Fix ownership if needed (use with caution)
sudo chown -R root:root /var/lib/embedded-cluster
sudo chown -R root:root /etc/k0s

Port Conflicts

Problem: Installation fails due to port already in use

Solution:

# Check what's using required ports
sudo lsof -i :6443
sudo lsof -i :30000

# If another service is using these ports, stop it or choose different ports

Additional Resources