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
self.events.append({"type": 'MODIFIED', "object": self.pod})
        self._run()
        self.watcher.watcher_queue.put.assert_not_called()
    def test_process_status_pending_deleted(self):
        self.events.append({"type": 'DELETED', "object": self.pod})
        self._run()
        self.assert_watcher_queue_called_once_with_state(State.FAILED)
    def test_process_status_failed(self):
        self.pod.status.phase = "Failed"
        self.events.append({"type": 'MODIFIED', "object": self.pod})
        self._run()
        self.assert_watcher_queue_called_once_with_state(State.FAILED)
    def test_process_status_succeeded(self):
        self.pod.status.phase = "Succeeded"
        self.events.append({"type": 'MODIFIED', "object": self.pod})
        self._run()
        self.assert_watcher_queue_called_once_with_state(None)
    def test_process_status_running(self):
        self.pod.status.phase = "Running"
        self.events.append({"type": 'MODIFIED', "object": self.pod})
        self._run()
        self.watcher.watcher_queue.put.assert_not_called()
    def test_process_status_catchall(self):
        self.pod.status.phase = "Unknown"
        self.events.append({"type": 'MODIFIED', "object": self.pod})
        self._run()
        self.watcher.watcher_queue.put.assert_not_called()