kubernetes-sigs / external-dns

Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
Apache License 2.0
7.69k stars 2.56k forks source link

Azure Private DNS - flag parsing error: unknown long flag #1362

Closed rnkhouse closed 4 years ago

rnkhouse commented 4 years ago

I am using the below config file to add private DNS in Azure Private DNS. I am using istio gateway on AKS.

external_dns.yaml

    apiVersion: v1
    kind: ServiceAccount
    metadata:
    name: external-dns
    ---
    apiVersion: rbac.authorization.k8s.io/v1beta1
    kind: ClusterRole
    metadata:
    name: external-dns
    rules:
    - apiGroups: [""]
    resources: ["services"]
    verbs: ["get","watch","list"]
    - apiGroups: [""]
    resources: ["pods"]
    verbs: ["get","watch","list"]
    - apiGroups: ["extensions"] 
    resources: ["ingresses"] 
    verbs: ["get","watch","list"]
    - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["list"]
    - apiGroups: ["networking.istio.io"]
    resources: ["gateways"]
    verbs: ["get","watch","list"]
    ---
    apiVersion: rbac.authorization.k8s.io/v1beta1
    kind: ClusterRoleBinding
    metadata:
    name: external-dns-viewer
    roleRef:
    apiGroup: rbac.authorization.k8s.io
    kind: ClusterRole
    name: external-dns
    subjects:
    - kind: ServiceAccount
    name: external-dns
    namespace: default
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: external-dns
    spec:
    strategy:
        type: Recreate
    selector:
        matchLabels:
        app: external-dns
    template:
        metadata:
        labels:
            app: external-dns
        spec:
        serviceAccountName: external-dns
        containers:
        - name: external-dns
            image: registry.opensource.zalan.do/teapot/external-dns:latest
            args:
            - --source=service
            - --source=ingress
            - --source=istio-gateway
            - --domain-filter=example.com # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones
            - --provider=azure-private-dns
            - --azure-resource-group=example-dns
            - --azure-subscription-id=AZURE_SUBSCRIPTION_ID
            env:
            - name: AZURE_TENANT_ID
            value: "AZURE_TENANT_ID_VALUE"
            - name: AZURE_CLIENT_ID
            value: "AZURE_CLIENT_ID_VALUE"
            - name: AZURE_CLIENT_SECRET
            value: "AZURE_CLIENT_SECRET_VALUE"

Error:

time="2020-01-10T17:20:41Z" level=fatal msg="flag parsing error: unknown long flag '--azure-subscription-id'"

Also I am getting this error:

flag parsing error: enum value must be one of aws,aws-sd,google,azure,alibabacloud,cloudflare,rcodezero,digitalocean,dnsimple,infoblox,dyn,designate,coredns,skydns,inmemory,pdns,oci,exoscale,linode,rfc2136,ns1,transip,vinyldns,rdns, got 'azure-private-dns'

linki commented 4 years ago

Hi @rnkhouse

azure-private-dns isn't in a released version yet. It will be available in >=v0.5.18.

You can use gcr.io/k8s-staging-external-dns/external-dns:v20200110-v0.5.17-153-ga1ff7d75 in the meantime.