The Kubernetes Cost History report gets cost by looking at the node level: For every node the platform collects, it is able to associate the corresponding EC2 Instance or Azure VM that the node is running on (this is in the node details). Then the cost of the EC2 Instances/Azure VMs is retrieved from the bill -- this cost is the "Instance Cost" which includes compute and transfer costs. This is why the platform can usually see a correlation between the "EC2 Instance" Cost Report and the Kubernetes Cost History Report when using the "Instance Cost" measure. However, these costs might not align 100% because there may be some instances that do not have any nodes running on them. These instances are not included in the Kubernetes Cost History report because we don't have a node that corresponds to those instances.
Here you can see the similarities between EC2 instance Cost History and Kubernetes Cost History: