I'm trying to create a LoadBalancer in my OKE cluster(Oracle Cloud Container Engine for Kubernetes). I'm doing a kubectl apply -f
on the file, but it gives me this error.
The Service "servicename" is invalid: metadata.labels: Invalid value: "ocid1.vcn.oc1.iad.xx...xx": must be no more than 63 characters.
Here's the yaml file
apiVersion: v1
kind: Service
metadata:
name: my-nginx-svc
labels:
app: nginx
annotations:
service.beta.kubernetes.io/oci-load-balancer-internal: "true"
service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid1.subnet.oc1..aaaaaa...xxxxx"
spec:
type: LoadBalancer
ports:
- port: 8100
selector:
app: nginx
I see the issue is because the value for service.beta.kubernetes.io/oci-load-balancer-subnet1:
is more than 63 chars. But I can't change the value of the OCID.
Is there a fix for this?
metadata.labels
, did you by any chance put the OCID under labels and not annotations? – Brannonmetadata.labels
– Gizela