New-AzContainerAppInitContainerTemplateObject
Create an in-memory object for InitContainer.
Syntax
New-AzContainerAppInitContainerTemplateObject
[-Arg <String[]>]
[-Command <String[]>]
[-Env <IEnvironmentVar[]>]
[-Image <String>]
[-Name <String>]
[-ResourceCpu <Double>]
[-ResourceMemory <String>]
[-VolumeMount <IVolumeMount[]>]
[<CommonParameters>]
Description
Create an in-memory object for InitContainer.
Examples
Example 1: Create an in-memory object for InitContainer.
New-AzContainerAppInitContainerTemplateObject -Image "mcr.microsoft.com/k8se/quickstart:latest" -Name "simple-hello-world-container2" -ResourceCpu 0.25 -ResourceMemory "0.5Gi" -Command "/bin/sh" -Arg "-c","while true; do echo hello; sleep 10;done"
Image Name ResourceCpu ResourceEphemeralStorage ResourceMemory
----- ---- ----------- ------------------------ --------------
mcr.microsoft.com/k8se/quickstart:latest simple-hello-world-container2 0.25 0.5Gi
Create an in-memory object for InitContainer.
Parameters
-Arg
Container start command arguments.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Command
Container start command.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Env
Container environment variables.
Type: | IEnvironmentVar[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Image
Container image tag.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Custom container name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceCpu
Required CPU in cores, e.g. 0.5.
Type: | Double |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceMemory
Required memory, e.g. "250Mb".
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VolumeMount
Container volume mounts.
Type: | IVolumeMount[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Zusammenarbeit auf GitHub
Die Quelle für diesen Inhalt finden Sie auf GitHub, wo Sie auch Issues und Pull Requests erstellen und überprüfen können. Weitere Informationen finden Sie in unserem Leitfaden für Mitwirkende.
Azure PowerShell