Q:

How to get BundleKey in EntityManager after getting storage of entity?

I want to get bundleKey of any entity type after is loading from
$node = \Drupal::entityManager()->getStorage('node');

After getStorage I am getting bundleKey Value as "type", but how to render that, as it is saying that is a protected value.
Tried to fetch like:
-> $node->get('bundleKey')->Value();
-> $node->getField('bundleKey')->getValue();
-> $node->bundleKey;

All above methods i tried to fetch Values but still no luck.
Anyone Knows how to fetch bundleKey.

A:

Found Solution:
Rather that loading complete storage, we can use entityDefinitionUpdateManager and get keys where you will get all id, bundle, label, etc
$manager = \Drupal::entityTypeManager();
$entity_type = $manager->getEntityType('commerce_product');
$entity_keys = $entity_type->getKeys();
$bundle = $entity_keys['bundle'];

