Container Instances: ContainerInstance¶
Manage OCI Container Instance workloads. This page is generated from checked-in package metadata, CRD schemas, and sample manifests.
Resource Snapshot¶
| Field | Value |
|---|---|
| Service | containerinstances |
| Resource | ContainerInstance |
| API Version | containerinstances.oracle.com/v1beta1 |
| Package | Container Instances |
| Support Status | Preview |
| Latest Released Version | v2.0.0-alpha |
| Install Namespace | oci-service-operator-containerinstances-system |
Quick Links¶
- Resource Guide Index
- Setup Guide
- Package Page
- API Reference
- Spec Reference
- Status Reference
- Rendered Sample (
config/samples/containerinstances_v1beta1_containerinstance.yaml)
Spec Fields¶
This summary shows the top-level spec fields. Use the full API reference for nested fields, defaults, and enum values.
| Field | Description | Type | Required |
|---|---|---|---|
availabilityDomain |
The availability domain where the container instance runs. | string |
Yes |
compartmentId |
The compartment OCID. | string |
Yes |
containerRestartPolicy |
Container restart policy | string |
No |
containers |
The containers to create on this container instance. | list[object] |
Yes |
definedTags |
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}}. |
map[string, map[string, string]] |
No |
displayName |
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If you don't provide a name, a name is generated automatically. | string |
No |
dnsConfig |
ContainerInstanceDnsConfig defines nested fields for ContainerInstance.DnsConfig. | object |
No |
faultDomain |
The fault domain where the container instance runs. | string |
No |
freeformTags |
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"} |
map[string, string] |
No |
gracefulShutdownTimeoutInSeconds |
The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted. | integer (int64) |
No |
imagePullSecrets |
The image pulls secrets so you can access private registry to pull container images. | list[object] |
No |
shape |
The shape of the container instance. The shape determines the resources available to the container instance. | string |
Yes |
shapeConfig |
ContainerInstanceShapeConfig defines nested fields for ContainerInstance.ShapeConfig. | object |
Yes |
vnics |
The networks available to containers on this container instance. | list[object] |
Yes |
volumes |
A volume is a directory with data that is accessible across multiple containers in a container instance. You can attach up to 32 volumes to single container instance. | list[object] |
No |
Status Fields¶
This summary shows the top-level status fields. Use the full API reference for nested fields, defaults, and enum values.
| Field | Description | Type | Required |
|---|---|---|---|
availabilityDomain |
The availability domain to place the container instance. | string |
No |
compartmentId |
The OCID of the compartment. | string |
No |
containerCount |
The number of containers on the container instance. | integer |
No |
containerRestartPolicy |
The container restart policy is applied for all containers in container instance. | string |
No |
containers |
The containers on the container instance. | list[object] |
No |
definedTags |
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}}. |
map[string, map[string, string]] |
No |
displayName |
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. | string |
No |
dnsConfig |
ContainerInstanceDnsConfig defines nested fields for ContainerInstance.DnsConfig. | object |
No |
faultDomain |
The fault domain to place the container instance. | string |
No |
freeformTags |
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"} |
map[string, string] |
No |
gracefulShutdownTimeoutInSeconds |
The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted. | integer (int64) |
No |
id |
An OCID that cannot be changed. | string |
No |
imagePullSecrets |
The image pulls secrets so you can access private registry to pull container images. | list[object] |
No |
lifecycleDetails |
A message that describes the current state of the container in more detail. Can be used to provide actionable information. | string |
No |
lifecycleState |
The current state of the container instance. | string |
No |
shape |
The shape of the container instance. The shape determines the number of OCPUs, amount of memory, and other resources that are allocated to a container instance. | string |
No |
shapeConfig |
ContainerInstanceShapeConfigObservedState defines nested fields for ContainerInstance.ShapeConfig. | object |
No |
status |
- | object |
Yes |
systemTags |
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud": {"free-tier-retained": "true"}}. |
map[string, map[string, string]] |
No |
timeCreated |
The time the container instance was created, in the format defined by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). | string |
No |
timeUpdated |
The time the container instance was updated, in the format defined by RFC 3339 (https://tools.ietf.org/rfc/rfc3339). | string |
No |
vnics |
The virtual networks available to the containers in the container instance. | list[object] |
No |
volumeCount |
The number of volumes that are attached to the container instance. | integer |
No |
volumes |
A volume is a directory with data that is accessible across multiple containers in a container instance. | list[object] |
No |
Sample Manifest¶
This example is generated from the checked-in sample manifest at config/samples/containerinstances_v1beta1_containerinstance.yaml. Replace placeholder values before applying it.
#
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#
#
# Replace the OCI identifiers below before running e2e.
# Update metadata.name and spec.displayName if you want to force a fresh create
# instead of binding to an existing ContainerInstance with the same display name in
# the same compartment and availability domain.
#
apiVersion: containerinstances.oracle.com/v1beta1
kind: ContainerInstance
metadata:
name: containerinstance-sample
spec:
compartmentId: ocid1.compartment.oc1..exampleuniqueID
availabilityDomain: "AD-1"
shape: "CI.Standard.E4.Flex"
shapeConfig:
ocpus: 1
memoryInGBs: 4
containers:
- imageUrl: "busybox:latest"
displayName: "hello"
command:
- "/bin/sh"
arguments:
- "-c"
- "echo hello && sleep 3600"
vnics:
- subnetId: ocid1.subnet.oc1..exampleuniqueID
displayName: "primary-vnic"
displayName: "containerinstance-sample"
containerRestartPolicy: "NEVER"