No kind "Deployment" is registered for version "apps/v1"

Asking for help? Comment out what you need so we can get more information to help you!

Kubernetes version:v1.29.3
Cloud being used: digital ocean
Installation method: curl
Host OS: macos
CNI and version:
CRI and version:

getting the error

no kind "Deployment" is registered for version "apps/v1"

APi resources

kubectl --kubeconfig=judge-taskmaster-cluster-kubeconfig.yaml api-resources --api-group=apps
NAME                  SHORTNAMES   APIVERSION   NAMESPACED   KIND
controllerrevisions                apps/v1      true         ControllerRevision
daemonsets            ds           apps/v1      true         DaemonSet
deployments           deploy       apps/v1      true         Deployment
replicasets           rs           apps/v1      true         ReplicaSet
statefulsets          sts          apps/v1      true         StatefulSet

kubeconfig

apiVersion: apps/v1
kind: Deployment
metadata:
  name: judge-taskmaster-deployment
  labels:
    app: judge-taskmaster
spec:
  replicas: 2
  selector: 
     matchLabels:
       app: judge-taskmaster
  template:
    metadata:
      labels:
        app: judge-taskmaster
    spec:
      containers:
      - name: judge-taskmaster
        image: codin***
        volumes:
          - "/tmp/runbox:/tmp/runbox"
          - "/var/run/docker.sock:/var/run/docker.sock"
        restart: "on-failure"
        env_file: .judge_env
      - name: worker-c
        image: codin**
      - name: worker-java8
        image: codin***
      - name: worker-java
        image: codin***
      - name: worker-cpp
        image: codin***
      - name: worker-py2
        image: codin***
      - name: worker-py3
        image: codin***
      - name: worker-kotlin
        image: codin***
      - name: worker-csv
        image: codin***

that looks ok to me. Restart is RestartPolicy and has different values. And I don’t think env-file exists in k8s