Skip to content

Appendix B. Configuring MAC Addresses in a Kubernetes Environment#

In a Kubernetes environment, Pods are not tied to a specific host server and may be rescheduled or recreated on different hosts within the cluster. Therefore, Altibase MAC address-based license validation requires the network interface name and MAC address of the physical Network Interface Card (NIC) on every host server in the Kubernetes cluster.

Before requesting a license, verify the physical network interface and its MAC address on each host server that will be used for license validation, and provide this information as part of the license request.

Configure the environment as follows.

1. Verify the MAC Address#

Verify the name and MAC address of the network interface to be used for license validation on each host server.

For <interface_name>, specify the actual network interface name on the host server to which the MAC address provided when the license was issued is assigned.

cat /sys/class/net/<interface_name>/address

Example:

$ cat /sys/class/net/eth0/address
a0:36:9f:18:da:ec

Because network interface names may differ across host servers, it is recommended to create a symbolic link to the MAC address file used for license validation at a fixed path (for example, /etc/altibase/macaddress).

Create the symbolic link on each host server using the following command:

ln -s /sys/class/net/<interface_name>/address /etc/altibase/macaddress

Example:

$ ln -s /sys/class/net/eth0/address /etc/altibase/macaddress

If all host servers use the same network interface name, you can specify the path to the file containing the MAC address information directly in the Pod YAML hostPath setting without creating a symbolic link. For a detailed example, refer to Configuration When Network Interface Names Are Identical.

3. Configure the Pod YAML#

Add the following configuration to the Pod YAML file. Specify the path to the MAC address file or a symbolic link to the file used for license validation in the hostPath.path field.

Important

To apply Altibase MAC address-based license validation in a Kubernetes environment, the Altibase Pod must be deployed as a StatefulSet, and the StatefulSet podManagementPolicy must be set to the default OrderedReady policy.

Basic Configuration#

Because network interface names may differ across host servers, it is recommended to use the symbolic link.

The following example uses a symbolic link.

spec:
  podManagementPolicy: OrderedReady # Default StatefulSet pod management policy
  template:
    spec:
      containers:
      - name: altibase
        volumeMounts:
        - name: host-volume
          mountPath: /macaddress
      volumes:
      - name: host-volume
        hostPath:
          path: /etc/altibase/macaddress # Path to the symbolic link to the MAC address file used for license validation
          type: File

With this configuration, the MAC address file on the host server is mounted to /macaddress inside the container.

Altibase validates the license using the /macaddress path inside the container. Therefore, the value of mountPath: /macaddress must not be changed.

Configuration When Network Interface Names Are Identical#

If all host servers use the same network interface name, you can specify the interface path directly without using a symbolic link.

Example: Using the ens1f0 network interface

spec:
  podManagementPolicy: OrderedReady # Default StatefulSet pod management policy
  template:
    spec:
      containers:
      - name: altibase
        volumeMounts:
        - name: host-volume
          mountPath: /macaddress
      volumes:
      - name: host-volume
        hostPath:
          path: /sys/class/net/ens1f0/address  # Path to the MAC address file used for license validation
          type: File

Important#

  • Configure the Pod YAML so that license validation can be performed on any host server where the Pod may be scheduled within the Kubernetes cluster.
  • Altibase validates the license using the /macaddress path inside the container. Therefore, this path must not be changed.