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
- Log in to the CCI console. In the navigation pane, choose Workloads. On the Deployments tab, click Create from YAML.
- 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
- Verify that the workload is in the Running state.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.