def from_json(cls, p: dict) -> 'Pod':
        """Extracts information from original K8S pod info.

        Schema ref: https://github.com/garethr/kubernetes-json-schema/blob/
        master/v1.6.5-standalone/pod.json"""
        container_states: List[ContainerState] = []
        pod_conditions: List[PodCondition] = []
        if 'containerStatuses' in p['status'] and \
                isinstance(p['status']['containerStatuses'], list) and \
                len(p['status']['containerStatuses']) > 0:
            for state, detail in \
                    p['status']['containerStatuses'][0]['state'].items():
                container_states.append(ContainerState(
                    state=state,
                    message=detail.get('message'),
                    reason=detail.get('reason')
                ))
        if 'conditions' in p['status'] and \
                isinstance(p['status']['conditions'], list):
            for cond in p['status']['conditions']:
                pod_conditions.append(PodCondition(
                    cond_type=cond['type'],
                    message=cond.get('message'),
                    reason=cond.get('reason')
                ))
        return cls(
            name=p['metadata']['name'],
            pod_type=PodType.from_value(
                p['metadata']['labels']['fl-replica-type']),
            state=PodState.from_value(p['status']['phase']),
            pod_ip=p['status'].get('pod_ip'),
            container_states=container_states,
            pod_conditions=pod_conditions)
Extracts information from original K8S pod info.

        Schema ref: https://github.com/garethr/kubernetes-json-schema/blob/
        master/v1.6.5-standalone/pod.json
web_console_v2/api/fedlearner_webconsole/k8s/models.py