def METHOD_NAME():
    """`prefect kubernetes manifest agent` should print a valid YAML file
    representing a basic agent deployment to a cluster"""
    result = invoke_and_assert(
        ["kubernetes", "manifest", "agent"],
        expected_output_contains="kind: Deployment",
    )
    manifests = yaml.load_all(result.stdout, yaml.SafeLoader)
    # Spot-check a few things. This test is mostly just confirming that the output
    # looks roughly like a set of Kubernetes manifests in YAML.
    assert manifests
    for manifest in manifests:
        if manifest["kind"] not in ["ClusterRole", "ClusterRoleBinding"]:
            assert manifest["metadata"]["namespace"] == "default"
        if manifest["kind"] == "Deployment":
            assert manifest["metadata"]["name"] == "prefect-agent"
            assert len(manifest["spec"]["template"]["spec"]["containers"]) == 1
            agent_container = manifest["spec"]["template"]["spec"]["containers"][0]
            assert agent_container["image"] == get_prefect_image_name()
            assert agent_container["command"] == [
                "prefect",
                "agent",
                "start",
                "-q",
                "kubernetes",
            ]
            assert len(agent_container["env"]) == 2
            assert agent_container["env"][0]["name"] == "PREFECT_API_URL"
            assert agent_container["env"][1]["name"] == "PREFECT_API_KEY"
            assert agent_container["env"][0]["value"] == str(PREFECT_API_URL.value())
            assert agent_container["env"][1]["value"] == str(PREFECT_API_KEY.value())