The Kubernetes executor has surprisingly low test coverage: 64% 

https://codecov.io/gh/apache/airflow/src/master/airflow/executors/kubernetes_executor.py - looks like some of the "flush/end" code is not tested.

We might want to improve it.
tests/executors/test_kubernetes_executor.py
)
            assert not executor.task_queue.empty()
            task = executor.task_queue.get_nowait()
            _, _, expected_executor_config, expected_pod_template_file = task
            
            assert expected_executor_config.metadata.labels == {'release': 'stable'}
            assert expected_pod_template_file == template_file
            self.kubernetes_executor.kube_scheduler.run_next(task)
            mock_run_pod_async.assert_called_once_with(
                k8s.V1Pod(
                    api_version="v1",
                    kind="Pod",
                    metadata=k8s.V1ObjectMeta(
                        name=mock.ANY,
                        namespace="default",
                        annotations={
                            'dag_id': 'dag',
                            'execution_date': execution_date.isoformat(),
                            'task_id': 'task',
                            'try_number': '1',
                        },
                        labels={
                            'airflow-worker': '5',
                            'airflow_version': mock.ANY,
                            'dag_id': 'dag',
                            'execution_date': datetime_to_label_safe_datestring(execution_date),
                            'kubernetes_executor': 'True',
                            'mylabel': 'foo',
                            'release': 'stable',
                            'task_id': 'task',