https://github.com/apache/airflow/pull/27892 added Internal API as part of Webserver.

We need to introduce `airlfow internal-api` CLI command that starts Internal API as a independent component.
try:
                    from airflow.executors.celery_kubernetes_executor import CeleryKubernetesExecutor
                    classes += (CeleryKubernetesExecutor,)
                except ImportError:
                    pass
                if not issubclass(executor_cls, classes):
                    message = (
                        f"celery subcommand works only with CeleryExecutor, CeleryKubernetesExecutor and "
                        f"executors derived from them, your current executor: {executor}, subclassed from: "
                        f'{", ".join([base_cls.__qualname__ for base_cls in executor_cls.__bases__])}'
                    )
                    raise ArgumentError(action, message)
        if action.dest == "subcommand" and value == "kubernetes":
            try:
                import kubernetes.client  
            except ImportError:
                message = (
                    "The kubernetes subcommand requires that you pip install the kubernetes python client. "
                    "To do it, run: pip install 'apache-airflow[cncf.kubernetes]'"
                )
                raise ArgumentError(action, message)
        if action.choices is not None and value not in action.choices:
            check_legacy_command(action, value)
        super()._check_value(action, value)
    def error(self, message):
        """Override error and use print_instead of print_usage."""
        self.print_help()
        self.exit(2, f"\n{self.prog} command error: {message}, see help above.\n")
_UNSET = object()
class Arg: