github.com/GoogleContainerTools/skaffold/v2@v2.13.2/examples/remote-multi-config-microservices/README.md (about)

     1  ### Example: Remote config µSvcs with Skaffold
     2  
     3  [![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.svg)](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://github.com/GoogleContainerTools/skaffold&cloudshell_open_in_editor=README.md&cloudshell_workspace=examples/remote-multi-config-microservices)
     4  
     5  In this example:
     6  
     7  * Deploy microservice applications from a remote git repository using Skaffold.
     8  
     9  Skaffold can build and deploy from configurations defined in remote git repositories. In this example, we'll walk through using skaffold to deploy two applications, an exposed "web" frontend which calls an unexposed "app" backend from the [examples/multi-config-microservices](../multi-config-microservices) project as a remote dependency.
    10  
    11  **WARNING: If you're running this on a cloud cluster, this example will create a service and expose a webserver.
    12  It's highly suggested that you only run this example on a local, private cluster like minikube or Kubernetes in Docker for Desktop.**
    13  
    14  #### Running the example on minikube
    15  
    16  From this directory, run:
    17  
    18  ```bash
    19  skaffold dev
    20  ```
    21  
    22  Now, in a different terminal, hit the `leeroy-web` endpoint
    23  
    24  ```bash
    25  $ curl localhost:9000
    26  leeroooooy app!!
    27  ```
    28  Hitting `Ctrl + C` on the first terminal should kill the process and clean up the deployments.
    29  
    30  #### Configuration walkthrough
    31  
    32  The [`skaffold.yaml`](./skaffold.yaml) looks like:
    33  
    34  ```yaml
    35  apiVersion: skaffold/v2beta11
    36  kind: Config
    37  requires:
    38  - git:
    39      repo: https://github.com/GoogleContainerTools/skaffold
    40      path: examples/multi-config-microservices/leeroy-app
    41      ref: main
    42  
    43  - git:
    44      repo: https://github.com/GoogleContainerTools/skaffold
    45      path: examples/multi-config-microservices/leeroy-web
    46      ref: main
    47  
    48  ```
    49  
    50  There are two `git` dependencies from the same repository `GoogleContainerTools/skaffold`. You can add as many dependencies as you want across the same or different repositories; even between different branches of the same repository. Skaffold downloads each referenced repository (one copy per referenced branch) to its cache folder (`~/.skaffold/remote-cache` by default).
    51  
    52  The remote dependency caches should not be modified directly by the user. Skaffold will reset the cache to the latest from the remote on each run.