Run command creates pod instead of deployment on Azure Kubernetes
You should use a generator
kubectl run selenium-node-chrome \ --image selenium/node-chrome:latest \ --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" \ --env="HUB_PORT_4444_TCP_PORT=4444" \ --generator=deployment/apps.v1beta1
https://v1-17.docs.kubernetes.io/docs/reference/kubectl/conventions/#generators
All generators are deprecated in Kubernetes version 1.18. From the docs here
Note: All kubectl generators are deprecated. See the Kubernetes v1.17 documentation for a list of generators and how they were used.
You can use kubectl create deployment my-dep --image=busybox
to create a deployment.
Also to create a yaml file use kubectl create deployment my-dep --image=busybox --dry-run=client -o yaml > deployment.yaml
and then edit the yaml file to add env or any other details and apply the yaml via kubectl apply -f deployment.yaml