29 Jul 2025
05:23 PM
- last edited on
30 Jul 2025
10:26 AM
by
MaciejNeumann
Complementary Work Guide: Enhancing “Kubernetes Training - Logs on Grail - Part 1” – easyTrade 2024
Introduction
In this complementary guide, I’ll be sharing some tips and additional insights that I found helpful while following the original guide. These suggestions aim to make the process smoother and easier to understand.
Prerquisites
The type of access you’ll need depends on the kind of user you are:
Once we have the correct access to the tenant, a good practice for this example is to navigate to:
This step ensures that the tenant is configured to support the latest Kubernetes monitoring features, which are essential for following the rest of the guide effectively.
Within this menu, enable the options you’ll need. If you're working with a large volume of data, you can activate additional log ingestion rules to capture more information. Keep in mind that enabling more rules will significantly increase license consumption in a real-world scenario. Don’t forget to save your changes before exiting the menu.
For this exercise, it is recommended to create a virtual machine (VM) with at least 4 CPU cores and run a Linux-based Kubernetes cluster on it.
A useful tip for this setup is to install Visual Studio Code (VS Code).
Once installed and running, follow these steps:
This extension allows you to use VS Code on Windows to build and interact with Linux-based applications.
Complementary Tips and Advice for the Training Guide
Cloning and applying manifests
While following the guide, there’s some commands,
There’s a tricky part in step 2, particularly with the command kubectl -n easytrade apply -f ./kubernetes-manifests This command may not work properly, so we’ll need to do some extra steps to make it work correctly.
We will use ls to list all the folders inside the current path. Here, we should see the one we’re looking for: kubernetes-manifests.
Then, we go into that path using cd kubernetes-manifests.
Once inside, we use ls again, and we’ll see three available folders that we can use to fix the original command from the guide.
That means we have three variants of the command to apply the manifests:
Once we apply all these new steps using the command kubectl get pods -n easytrade , we will see how many pods are working actually in the implementation
Step 2a vs Step 2b: Choosing Your Path
Then, according to the guide, there are two partial steps to choose from:
This part becomes a bit introspective. If you want to move quickly and keep things simple, go with the first option.
But if you prefer a more manual approach that helps you understand the configuration process in more detail, then the second option is better.
In summary:
You either choose the easy and fast path, or the slower but more specific and educational one.
Helm version and installation
For the step where we need to install the Helm component, it’s possible that Helm is not installed yet. To check, run the command:
Helm version
If Helm is not installed, the terminal will give you instructions or an error pointing to how to install it properly. Just keep in mind that during the installation process, you might be asked to use the sudo command to get the necessary permissions.
Then we’re able to follow the next steps, but it’s possible that the following command may fail:
helm install dynatrace-operator dynatrace/dynatrace-operator \
--set "installCRD=true" \
--set "csidriver.enabled=true" \
--atomic \
--create-namespace --namespace dynatrace
This can happen for different reasons, like missing dependencies, Helm repo not being added, or permission issues. So be prepared to troubleshoot if the command doesn’t work as expected.
If that happens, we can use a different command to fix the context issue:
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Then, we run again the command to install the operator:
helm install dynatrace-operator dynatrace/dynatrace-operator \
--set "installCRD=true" \
--set "csidriver.enabled=true" \
--atomic \
--create-namespace --namespace dynatrace
This should help if the problem was related to the Kubernetes configuration file not being properly set.
And we can keep working with the guide.
Access Tokens VS Kubernetes Gen 3
If you’ve reached this step, I’ve noticed that it’s possible to change the flow of the guide by using the Kubernetes (new) app available in our Dynatrace tenant.
Here, I’ll explain how to follow this new approach instead of the one described in the guide. The steps are similar, but this method uses the updated Kubernetes Gen 3 integration, which can simplify some parts of the process and give you a more modern experience.
We have to enter the new Kubernetes App in Dynatrace and click the “Add cluster” button.
This will open a new form where we need to fill in information about the cluster we want to configure.
Since this is a practice scenario, we select:
EKS
Kubernetes platform monitoring + Full-Stack observability
In the next section, we can leave all options selected. Just keep in mind that in a real-world scenario, enabling everything will consume more license, and faster.
In the Configure cluster section, we can use any name we want. It’s also a good idea to assign a Host Group, even if it’s just an exercise.
Then comes the Install Dynatrace Operator section. Even though this sounds like something we already did in previous steps, it’s still important here. This is where we generate the tokens for the operator. If we already have them, we can paste them here. If not, we can generate secure tokens directly in this step — and we should save them in a safe place.
After that, we download the dynakube.yaml file — this is very important.
Since we’re working in VS Code, we can open the file there.
What we need to do now is create this file inside our VM. To do that, we use the command:
nano dynakube.yaml
Then we copy the content from the file opened in VS Code and paste it into the terminal.
To save the file, press CTRL + O, then ENTER, and to exit, press CTRL + X.
Back in the terminal, we use:
ls
to confirm that the file was created correctly.
Now we run the following command to install the operator:
helm install dynatrace-operator oci://public.ecr.aws/dynatrace/dynatrace-operator \
--create-namespace \
--namespace dynatrace \
--atomic
This command may fail if we already installed the operator in previous steps — don’t worry about it. Just continue with the next step.
It’s recommended to wait a little, so everything gets detected properly. Once your cluster connects, Kubernetes signals will be collected and displayed within 2 minutes.
If you want to be sure that everything is running properly, you have two options:
kubectl get pods -n dynatrace
This will show you the current status of the pods in the dynatrace namespace.