I have read about the Appdynamics in Kubernetes but I got confused.
The scenario is like I am having EC2 under which Kubernetes is running which is having POD and under 1 pod, multiple container is running.
Where I have to install machine-agent? In EC2 or in daemon set?
And where I have to install app-agent? do I have to add app-agent in each container Dockerfile?
And lastly, what would be my hostName and uniqueHostId?
As stated on the AppD docs regarding Kubernetes and AppDynamics APM
Install a Standalone Machine Agent (1) in a Kubernetes node.
Install an APM Agent (2) inside each container in a pod you want to monitor.
The Standalone Machine Agent then collects hardware metrics for each monitored container, as well as Machine and Server metrics for the host (3), and forwards the metrics to the Controller.
ContainerID and UniqueHostID can be taken from /proc/self/cgroup
ContainerID
cat /proc/self/cgroup | awk -F '/' '{print $NF}' | head -n 1
UniqueHostID
sed -rn '1s#.*/##; 1s/(.{12}).*/\1/p' /proc/self/cgroup