azure::kubernetes-cluster

Creates a Kubernetes Cluster.

Example

azure::kubernetes-cluster kubernetes-cluster-example
    name: "kubernetes-cluster-example"
    version: "1.22.4"
    enable-private-cluster: false

    resource-group: $(azure::resource-group resource-group-cluster-example)

    linux-root-username: "adminuser"

    dns-prefix: "kubernetes-cluster-example-dns"
    enable-rbac: true

    agent-pool
        name: "agentpool"
        size: "Standard_DS2_v2"
        count: 1
        availability-zones: [1,2,3]
        mode: "System"
        auto-scaling-enabled: true
        type: "VirtualMachineScaleSets"
        os-type: "Linux"
        os-disk-type: "Manged"
        os-disk-size-in-gb: 128
        node-size: 1
        network: $(azure::network network-cluster-example)
        subnet: "subnet1"
        maximum-pods-per-node: 110
        minimum-node-size: 1
        maximum-node-size: 5
        kubelet-disk-type: "OS"

        tags: {
            Name: "agentpool_primary"
        }
    end

    network-profile
        dns-service-ip: "10.0.0.10"
        service-cidr: "10.0.0.0/16"
        load-balancer-sku: "Standard"
        outbound-type: "loadBalancer"

        load-balancer-profile
            outbound-ips
                public-ips: $(azure::public-ip-address public-ip-address-example-cluster)
            end

        end
    end

    tags: {
        Name: "kubernetes-cluster-example"
    }

end

Attributes

Attribute Description
name Name of the cluster. (Required)
version Version of the AKS cluster to use.
addon-profile set subresource

Addon profile configuration.

config map
The config for the addon profile. (Required)
identity
The identity for the addon profile. (Required)
enabled
If set to true enables the addon profile. Defaults to``true``.
agent-pool set subresource

Agent pool configuration. Minimum required items are 1. (Required)

name
The name of the agent pool. (Required)
size
The node size of the agent pool. (Required)
count
The node count of the agent pool.
availability-zones list
A list of availability zones to start the agent pool node on.
tags map
The tags of the agent pool.
mode
The mode of the agent pool. Valid values are System or User. (Required)
auto-scaling-enabled
If set to true enables autoscaling. Defaults to false.
kubelet-disk-type
The kublet disk type for the agent pool. Valid values are OS or Temporary.
maximum-node-size
The max node size for the agent pool. Can only be set if auto-scaling-enabled is set.
minimum-node-size
The max node size for the agent pool. Can only be set if auto-scaling-enabled is set.
maximum-pods-per-node
The max pods per node for the agent pool. (Required)
network
The network for the agent pool. (Required)
subnet
The subnet for the agent pool. (Required)
node-labels map
The node labels for the agent pool.
node-taints list
The list of node taints of the agent pool.
os-disk-size-in-gb
The os disk size of the agent pool. (Required)
os-disk-type
The os disk type of the agent pool. Valid values are Managed or Ephemeral. (Required)
os-type
The OS type of the agent pool. Valid values are Linux or Windows. (Required)
type
The type of the agent pool. Valid values are VirtualMachineScaleSets or AvailabilitySet. (Required)
virtual-machine-eviction-policy
The eviction policy of a spot instance for the node of the agent pool. Valid values are Delete or Deallocate.
virtual-machine-maximum-price
The max price for virtual machine for the node of the agent pool. Can only be set if virtual-machine-eviction-policy is set.
virtual-machine-priority
The priority for virtual machine for the node of the agent pool. Valid values are Spot or Regular. Can only be set if virtual-machine-eviction-policy is set.
network-profile subresource

Network Profile configuration.

dns-service-ip
The dns service ip for the network profile.
network-plugin
The network plugin for the network profile. Valid values are azure or kubenet. (Required)
network-mode
The network mode for the network profile. Valid values are transparent or bridge.
network-policy
The network policy for the network profile. Valid values are calico or azure.
load-balancer-profile subresource

The loadbalancer config for the network profile.

allocated-outbound-ports
The allocated outbound ports for the load balancer profile.
effective-outbound-ips list
A list of effective outbound ips for the load balancer profile.
enable-multiple-standard-load-balancers
If set to true enables multiple standard load balancer. Defaults to false.
idle-timeout-in-minutes
The idle timeouts in minutes for the load balancer profile.
managed-outbound-ips subresource

The managed outbound ip config for the load balancer profile.

count
The count of managed outbound ips. (Required)
outbound-ip-prefixes subresource

The load balancer outbound ip prefixes config for the load balancer profile.

public-ip-prefixes list
The count of public ip prefixes. (Required)
outbound-ips subresource

The load balancer outbound ips config for the load balancer profile.

public-ips list
The list of public ips. (Required)
load-balancer-sku
The load balancer sku for the network profile. Valid values are Standard or Basic.
nat-gateway-profile subresource

The natgateway config for the network profile.

effective-outbound-ips list
A list of effective outbound ips for the nat gateway profile.
idle-timeout-in-minutes
Idle timeout in minutes in for the nat gateway profile. (Required)
managed-outbound-ip-profile subresource

The managed outbound ip profile config for the nat gateway profile.

count
The desired number of outbound IPs created/managed by Azure. (Required)
outbound-type
The outbound type for the network profile. Valid values are loadBalancer, userDefinedRouting, managedNATGateway or userAssignedNATGateway.
pod-cidr
The pod cidr for the network profile.
service-cidr
The service cidr for the network profile.
dns-prefix The dns prefix for the cluster.
enable-rbac When set to true enables rbac for the cluster. Defaults to true.
linux-root-username The root user name. (Required)
service-principal-client-id The service principal client id for the cluster.
service-principal-secret The service principal secret for the cluster.
ssh-key The ssh key for the cluster. (Required)
resource-group The resource group where the cluster will belong. (Required)
tags map The tags for the cluster.
enable-private-cluster If set to true makes the cluster private. Defaults to false.
auto-scaler-profile subresource

Autoscaler profile config.

expander
The expander for the autoscaler profile. Valid values are least-waste, most-pods, priority or random. (Required)
balance-similar-node-groups
The balance similar node groups for the autoscaler profile.
max-empty-bulk-delete
The max empty bulk delete for the autoscaler profile.
max-graceful-termination-sec
The max graceful termination sec for the autoscaler profile.
max-total-unready-percentage
The max total unready percentage for the autoscaler profile.
new-pod-scale-up-delay
The new pod scale up delay for the autoscaler profile.
ok-total-unready-count
The ok total unready count for the autoscaler profile.
scale-down-delay-after-add
The scale down delay after add for the autoscaler profile. Values must be an integer followed by an ‘m’. No unit of time other than minutes (m) is supported.
scale-down-delay-after-delete
The scale down delay after delete for the autoscaler profile. Values must be an integer followed by an ‘m’. No unit of time other than minutes (m) is supported.
scale-down-delay-after-failure
The scale down delay after failure for the autoscaler profile. Values must be an integer followed by an ‘m’. No unit of time other than minutes (m) is supported.
scale-down-unready-time
The scale down unready time for the autoscaler profile.
scale-down-unneeded-time
The scale down unneeded time for the autoscaler profile.
scale-down-utilization-threshold
The scale down utilization threshold for the autoscaler profile.
scan-interval
The scan interval for the autoscaler profile.
skip-nodes-with-system-pods
The skip nodes with system pods for the autoscaler profile.
skip-nodes-with-local-storage
The skip nodes with local storage for the autoscaler profile.
api-server-access-profile subresource

Api server access profile config.

enable-private-cluster
Enable private cluster.
enable-private-cluster-public-fqdn
When set to true enables public fqdn on the private cluster.
disable-run-command
If set ot true disables run command.
private-dns-zone
The private dns mode. Valid values are system or none.
authorized-ip-ranges list
A list of authorized Ips.

Outputs

Attribute Description
fqdn The fqdn for the cluster.
system-assigned-managed-service-identity-principal-id The system assigned service principal id for the cluster.
id The id of the cluster.