Kubernetes Installation
You can use Kubernetes to install Belden Horizon Data Operations (BHDO).
Before you begin
- Get access to a configured Kubernetes cluster.
- Get access to PersistentVolumeClaim (PVC). Learn more about Persistent Volumes from the Kubernetes documentation.
- Get administrative permissions to run the kubectl command-line tool.
- Contact your account representative to get access to the service account .json file.
- Depending on the specific requirements of your environment, you may need to get access to a storage class. Learn more about Storage Classes from the Kubernetes documentation.
- For full DeviceHub driver support, ensure your Linux host kernel is version 6 or higher
To use Kubernetes to install Belden Horizon Data Operations, you will need to do the following:
- Step 1: Launch a Belden Horizon Data Operations Kubernetes
- Step 2: Log in to Belden Horizon Data Operations
Step 1: Launch a BHDO Edge Kubernetes
To launch a BHDO Edge Kubernetes:
1. Download the service account .json file, which you can get from your Belden account representative. 2. Open a Command Prompt Terminal (CTRL+R). 3. Execute the following Linux command to setup credentials for a Kubernetes namespace.
kubectl create secret --namespace bhdo-prod docker-registry bhdo-credential --docker-server=us-docker.pkg.dev --docker-username=_json_key --docker-password="$(cat ~/<file_name>.json)"Refer to the command parameters:
- kubectl create secret sets a Secret for use with a Docker registry.
- --namespace bhdo-prod sets up a Kubernetes namespace of bhdo-prod.
- docker-registry bhdo-credential sets up Secret name as bhdo-credential. This should not be changed.
- --docker-server=us-docker.pkg.dev sets the Docker registry server as us-docker.pkg.dev. This should not be changed.
- --docker-username=_json_key sets the Docker registry username to connect to the server above. This should not be changed.
- --docker-password="$(cat ~/<file_name>.json)" retrieves the password within the service account file requested from step 1.
Note: bhdo-prod should be changed to an isolated namespace to suit deployment best.
4. Copy or download the following Belden Horizon Data Operations deployment file.
# Create ServiceAccount
apiVersion: v1
kind: ServiceAccount
metadata:
name: bhdo-docker
namespace: bhdo-prod
labels:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
---
# Create PVC
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: bhdo-data
namespace: bhdo-prod
labels:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "10G"
---
# Create Service
apiVersion: v1
kind: Service
metadata:
name: bhdo-docker
namespace: bhdo-prod
labels:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
spec:
type: ClusterIP
ports:
- port: 443
targetPort: https
protocol: TCP
name: https
selector:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
---
# Create Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: bhdo-docker
namespace: bhdo-prod
labels:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
template:
metadata:
labels:
app.kubernetes.io/name: bhdo-docker
app.kubernetes.io/instance: bhdo-instance
spec:
serviceAccountName: bhdo-docker
securityContext:
{}
imagePullSecrets:
- name: bhdo-credential
containers:
- name: bhdo-docker
securityContext:
capabilities:
add:
- NET_ADMIN
image: "us-docker.pkg.dev/litmus-sales-enablement/bhdo/bhdo-std-docker:latest"
imagePullPolicy: IfNotPresent
ports:
- name: https
containerPort: 443
protocol: TCP
volumeMounts:
- mountPath: /var
mountPropagation:
name: bhdo-data
subPath:
subPathExpr:
resources:
requests:
cpu: 1
memory: 1024Mi
limits:
cpu: 4
memory: 4096Mi
volumes:
- name: bhdo-data
persistentVolumeClaim:
claimName: bhdo-data5. Execute the following command to deploy the Belden Horizon Data Operations Kubernetes cluster using the deployment file from Step 4.
kubectl apply -f bhdo-deployment.yaml --namespace bhdo-prodRefer to the command parameters:
- -f bhdo-deployment.yaml uses the file bhdo-deployment.yaml for deployment. This should not be changed.
- --namespace bhdo-prod sets bhdo-prod to be the deployment that Kubernetes will use.
Special and Additional Considerations:
- Belden Horizon Data Operations can function in both single and multi Kubernetes node clusters, and can support various networking modes. Your Kubernetes admin has the responsibility to configure proper networking.
- Adjust CPU/RAM/Storage for the Kubernetes cluster as needed. Storage should be set to at least 10GB. Scale additional computing resources when using Belden Horizon Data Operations features that use high-computing power, such as PLC drivers, integrations, and Flows.
- Consult Kubernetes official documentation for best practices.
- Ensure credentials are stored properly with Kubernetes management.
- NET_ADMIN permissions are required.
Step 2: Log in to Belden Horizon Data Operations
- See Access the Belden Horizon Data Operations Web UI for details on logging in.
- See Access the Terminal User Interface for instructions on how to navigate and log in for the first time.