I have the following code in a file called `block.py`:
from prefect.infrastructure.kubernetes import KubernetesJob
kubernetes_job = KubernetesJob(
env={"HELLO": "WORLD"},
name="my-custom-kubernetes-job",
image="prefecthq/prefect:2.0.1-python3.9",
service_account_name="my-service-account",
image_pull_policy="IfNotPresent",
)
I am trying to register it as follows:
❯ prefect block register -f block.py
Successfully registered 1 block
┏━━━━━━━━━━━━━━━━━━━┓
┃ Registered Blocks ┃
┡━━━━━━━━━━━━━━━━━━━┩
│ Kubernetes Job │
└───────────────────┘
To configure the newly registered blocks, go to the Blocks page in the Prefect UI.
However, when I go to the Prefect UI, I don't see the new block. I have checked and I am correctly logged into the expected workspace.
Is this expected behavior, or am I doing something wrong? Thanks!