github.com/oam-dev/kubevela@v1.9.11/docs/examples/config/private-image-registry/README.md (about)

     1  # How to config a private registry
     2  
     3  * Step 1: Make sure there is a image-registry template
     4  
     5  ```bash
     6  $ vela config-template list -A
     7  NAMESPACE       NAME                    ALIAS                                   SCOPE   SENSITIVE       CREATED-TIME                 
     8  vela-system     dex-connector           Dex Connector                           system  false           2022-10-12 23:48:05 +0800 CST
     9  vela-system     helm-repository         Helm Repository                         project false           2022-10-14 12:04:58 +0800 CST
    10  vela-system     image-registry          Image Registry                          project false           2022-10-13 15:39:37 +0800 CST
    11  
    12  # View the document of the properties
    13  $ vela config-template show image-registry
    14  ```
    15  
    16  If not exist, please enable the VelaUX addon firstly.
    17  
    18  * Step 2: Create a config and distribute to the developer namespace
    19  
    20  ```bash
    21  # Create a developer environment(namespace)
    22  $ vela env init developer --namespace developer
    23  
    24  # Create a registry config for the docker hub, you could change the username and password
    25  $ vela config create private-demo --template image-registry --target developer registry=index.docker.io auth.username=demo auth.password=demo
    26  ```
    27  
    28  * Step 3: Create a application to use the private registry.
    29  
    30  ```bash
    31  apiVersion: core.oam.dev/v1beta1
    32  kind: Application
    33  metadata:
    34    name: private-image
    35    namespace: developer
    36  spec:
    37    components:
    38    - name: private-image
    39      properties:
    40        cpu: "0.5"
    41        image: private/nginx
    42        imagePullSecrets:
    43        - private-demo
    44      type: webservice
    45  ```