Class LocalDnsProfile

java.lang.Object
com.azure.resourcemanager.containerservice.models.LocalDnsProfile
All Implemented Interfaces:
com.azure.json.JsonSerializable<LocalDnsProfile>

public final class LocalDnsProfile extends Object implements com.azure.json.JsonSerializable<LocalDnsProfile>
Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.
  • Constructor Details

    • LocalDnsProfile

      public LocalDnsProfile()
      Creates an instance of LocalDnsProfile class.
  • Method Details

    • mode

      public LocalDnsMode mode()
      Get the mode property: Mode of enablement for localDNS.
      Returns:
      the mode value.
    • withMode

      public LocalDnsProfile withMode(LocalDnsMode mode)
      Set the mode property: Mode of enablement for localDNS.
      Parameters:
      mode - the mode value to set.
      Returns:
      the LocalDnsProfile object itself.
    • state

      public LocalDnsState state()
      Get the state property: System-generated state of localDNS.
      Returns:
      the state value.
    • vnetDnsOverrides

      public Map<String, LocalDnsOverride> vnetDnsOverrides()
      Get the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS traffic).
      Returns:
      the vnetDnsOverrides value.
    • withVnetDnsOverrides

      public LocalDnsProfile withVnetDnsOverrides(Map<String, LocalDnsOverride> vnetDnsOverrides)
      Set the vnetDnsOverrides property: VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to as VnetDNS traffic).
      Parameters:
      vnetDnsOverrides - the vnetDnsOverrides value to set.
      Returns:
      the LocalDnsProfile object itself.
    • kubeDnsOverrides

      public Map<String, LocalDnsOverride> kubeDnsOverrides()
      Get the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic).
      Returns:
      the kubeDnsOverrides value.
    • withKubeDnsOverrides

      public LocalDnsProfile withKubeDnsOverrides(Map<String, LocalDnsOverride> kubeDnsOverrides)
      Set the kubeDnsOverrides property: KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as KubeDNS traffic).
      Parameters:
      kubeDnsOverrides - the kubeDnsOverrides value to set.
      Returns:
      the LocalDnsProfile object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<LocalDnsProfile>
      Throws:
      IOException
    • fromJson

      public static LocalDnsProfile fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of LocalDnsProfile from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of LocalDnsProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the LocalDnsProfile.