Interaction with the deployment on a specific server | MediaKind Docs
Interaction with the deployment on a specific server
The product is installed as a set of pods running on a k3s deployment in a namespace called mediakind.
In the following paragraphs, more information is provided about how to interact with the different microservices composing the product as well as where to find useful information about the installation.
Interaction is possible using either the kubectl command line tool or the k9s environment tool.
For more details about the usage of the kubectl tool, please refer to the official documentation available here: kubectl documentation
For more details about the usage of the k9s tool, please refer to the official documentation available here: k9s documentation
Monitor the status of microservices
The product is composed of a set of microservices. Faults in any of them may result in misbehavior and affect customer operations.
Login on the server where the product is installed.
Switch to user mediakind (for password information, ask MediaKind support):
su - mediakindType
kubectl get pods -n mediakind | grep stream-processor. A list of pods appears with some information associated to each of them: name, ready, status, restarts, age.
The installation of the stream-processor-asi and the stream-processor-simulcrypt controls is optional. They should not be present on your system unless you have chosen to install them and executed the additional installation steps as described in the installation guides.
- Verify that the status is “Running” for all the pods. If this is not the case, the system may not behave as expected.
If any of the pods is not in “Running” state, type any or all of these commands to help you understand what is wrong:
kubectl get pods -n mediakind: Get the status of all the pods running on the server. It may be that some other microservice is also not in “Running” state.kubectl describe pod -n mediakind <pod_name>: Check the last part of the information. It can contain a list of warning or error events.
Type
k9s. An interactive user interface appears.Type
:namespaces.Press Enter.
Use the down arrow key to highlight the line containing the string mediakind.
Press Enter. The user interface shows the complete list of pods running in the mediakind namespace.
Verify that the status is “Running” for all the pods. If this is not the case, the system may not behave as expected.
If any of the pods is not in “Running” state, try the following:
- Use the up arrow and down arrow keys to scroll the list of all the pods and check if any other microservice is also not in “Running” state.
- When the line containing the name of the pod is highlighted, press the d key. A description of the pod appears.
- Use the down arrow key to scroll down and check the last part of the information. It can contain a list of warning or error events.
- To exit from the pod description, press the Esc key.
Get the logs from a specific service
Login on the server where the product is installed.
Switch to user mediakind (for password information, ask MediaKind support):
su - mediakindType
kubectl logs -n mediakind <pod name>where<pod_name>is the name of the pod associated to the microservice of interest.- For most microservices, the output contains the logs for the (single) container running in the pod.
- The output of the kubectl logs command can be easily used as input into less, grep, sed or other string/stream manipulation commands.
- It is possible to also use the bark utility installed by default with the host application:
kubectl logs -n mediakind <pod name>| barkto increase readability of the kubectl logs output.
Type
k9s. An interactive user interface appears.Type
:pods.Press Enter.
Use the up arrow and down arrow keys to scroll through the list and highlight the microservice of interest.
Press Enter. The list of containers running in the pod appears.
Press the l key. The logs for the microservice appear.
To exit the logs screen, press the Esc key. To return to the pods list, press the Esc key again.
Restart a microservice
The product microservices run as pods on the k3s deployment. The k3s framework ensures that all the required pods are always running. To restart a microservice, you only need to delete the corresponding pod. The k3s framework will restart it.
Login on the server where the product is installed.
Switch to user mediakind (for password information, ask MediaKind support):
su - mediakindVerify that the status is “Running” for all the pods. If this is not the case, the system may not behave as expected.
Type
kubectl delete pod <pod name> -n mediakindwhere<pod_name>is the name of the pod associated to the microservice of interest as it appears in the output of the previous command.Type
kubectl get pods -n mediakind | grep stream-processoragain to check that a new pod for the microservice is running.
Check and edit the configuration of microservices
The behavior of each stream-processor microservice depends not only on the configuration chosen for the Multiplexing service but also on a set of microservice-specific configuration parameters.
In this deployment, for each microservice, these parameters are stored in the corresponding configmap. To view and change them, you can use either the kubectl command line tool or the k9s environment tool.
To view a specific microservice configuration:
Type
kubectl get configmap -n mediakind | grep stream-processor. A list of configmaps appears with some information associated to each of them.Type
kubectl get configmap -n mediakind <configmap> -o yamlwhere<configmap>is the name of the configmap associated to the microservice of interest as it appears in the output of the previous command.
To edit a specific microservice configuration:
Type
kubectl edit configmap -n mediakind <configmap>where<configmap>is the name of the configmap associated to the microservice of interest as it appears in the output of the previous command. The configmap is now open in vi editor and can be edited.Apply your changes and save the configmap.
Further interaction with your k3s deployment
You can use kubectl or k9s to get additional information about your deployment status and configuration.
Here are a few examples of useful operations:
- Check the version of a specific microservice:
kubectl get deployments -n mediakind - Save the deployment or configmap for a microservice as yaml to file for later comparison with configuration on other servers.
Check latest installation options
- Check the version of the product currently running on your server.
- Navigate to the
/var/installfolder and list its content:
cd /var/install
ls
Navigate to the
stream-processor-xxxfolder corresponding to the version currently running. It contains a subfolder called either standalone, controller, compact or server.Read the previous installation parameters from the
last_configure.shfile:
cat last_configure.sh