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, for Altibase license validation based on MAC addresses, the MAC address information of the host servers that make up the Kubernetes cluster is required. Configure the settings by following the procedure below.

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.

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:
  containers:
  - name: altibase
    volumeMounts:
    - name: host-volume
      mountPath: /macaddress
  volumes:
  - name: host-volume
    hostPath:
      path: /etc/altibase/macaddress    # Path to the MAC address file(symbolic link) 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:
  containers:
  - name: altibase
    volumeMounts:
    - name: host-volume
      mountPath: /macaddress
  volumes:
  - name: host-volume
    hostPath:
      path: /sys/class/net/ens1f0/address
      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.