Help Center/ Cloud Container Instance (CCI)/ Best Practices/ Image Management/ Using a Third-Party Image to Create a Pod
Updated on 2025-08-12 GMT+08:00

Using a Third-Party Image to Create a Pod

This topic describes how to create a pod using an image pulled from a third-party repository.

Scenario

An image in a third-party repository is required.

Constraints

An EIP must be configured for Harbor first.

Procedure

  1. Log in to the CCI 2.0 console. In the navigation pane, choose Workloads. On the Deployments tab, click Create from YAML.

  2. Fill in the YAML file as follows:

    kind: Deployment
    apiVersion: cci/v2
    metadata:
      name: nginx
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: nginx
      template:
        metadata:
          labels:
            app: nginx
          annotations:
            cci.io/insecure-registries: 100.85.XXX.XXX # EIP bound to Harbor. This IP address is used to pull images from the self-managed image repository.
            yangtse.io/pod-with-eip: 'true' # Controls whether the pod can access the EIP.
        spec:
          containers:
            - name: nginx
              image: 100.85.XXX.XXX/library/nginx:stable-alpine-perl # Image address in Harbor
              resources:
                requests:
                  cpu: 500m
                  memory: 1Gi

  3. Verify that the workload is in the Running state.