Skip to content

ContainerInstance Sample

This page is generated from the checked-in sample manifest at config/samples/containerinstances_v1beta1_containerinstance.yaml.

Field Value
Resource containerinstances/ContainerInstance
API Version containerinstances.oracle.com/v1beta1
Source Path config/samples/containerinstances_v1beta1_containerinstance.yaml
#
# 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"