I am trying to create target group binding with service called name. Running kubectl apply -n default -f target-group.yml keeps on throwing error error: unable to recognize "target-group.yml": no matches for kind "TargetGroupBinding" in version "apiextensions.k8s.io/v1". Have tried changing the apiVersion to multiple things but none of them is working.
This will only work if you have installed the AWS load balancer controller. The latest version uses
apiVersion: elbv2.k8s.aws/v1beta1
. See https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/targetgroupbinding/targetgroupbinding/