I'm trying to deploy container with yml. Deployment file looks like this:
apiVersion: 2019-12-01
location: westeurope
name: imgeneus-login
properties:
imageRegistryCredentials:
- server: imgeneusregistrytest.azurecr.io
username: imgeneusregistrytest
password: #{registryPassword}#
restartPolicy: OnFailure
containers:
- name: imgeneus-login
properties:
image: imgeneusregistrytest.azurecr.io/imgeneus.login:latest
resources:
requests:
cpu: 1
memoryInGb: 1
ports:
- port: 80
- port: 30800
environmentVariables:
- name: Database__Host
value: imgeneus-test.mysql.database.azure.com
- name: Database__Username
value: aosyatnik
- name: Database__Password
value: #{dbPassword}#
- name: Database__SslMode
value: Required
- name: TcpServer__Host
value: "0.0.0.0"
osType: Linux
ipAddress:
type: Private
ports:
- protocol: tcp
port: 80
- protocol: tcp
port: 30800
subnetIds:
- id: /subscriptions/503236c4-a00c-466c-b7b0-4800e8dec527/resourceGroups/imgeneus-test/providers/Microsoft.Network/virtualNetworks/imgeneus-test/subnets/imgeneus-test
name: imgeneus-test
type: Microsoft.ContainerInstance/containerGroups
I'm pretty sure, that it's possible to deploy on private network, as described here: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-application-gateway
But in article they are doing it via terminal.
But it fails with error: Code: PrivateIPAddressNotSupported Message: IP Address type in container group 'imgeneus-login' is invalid. Private IP address is only supported when network profile is defined.
I can not find in documentation, how should I provide private network? "network profile is defined" what does it mean?