Link sites on local systems using YAML¶
Use a link resource YAML file to create links between local system and Kubernetes sites.
Using a link resource YAML file allows you to create links between sites.
The link direction is not significant, and is typically determined by ease of connectivity. For example, if east is behind a firewall, linking from east to west is the easiest option.
Once sites are linked, services can be exposed and consumed across the application network without the need to open ports or manage inter-site connectivity.
The procedures below describe linking an existing site.
Typically, it is easier to configure a site, links, and services in a set of files.
Create a configured site by applying all the YAML files using skupper system apply.
Link sites using a link resource and YAML¶
Create a link resource YAML file and apply it to the local system site to establish a link.
An alternative approach to linking sites using tokens is to create a link resource YAML file, and to apply that resource to the local system site.
Prerequisites
- A local system site
- A Kubernetes site with
enable-link-accessenabled.
To link sites, you create a link resource YAML file on one site and apply that resource on the other site to create the link.
Procedure
- On the site where you want to create a link , ensure link access is enabled:
-
Create a
wherelinkresource YAML file:<filename>is the name of a YAML file that is saved on your local filesystem. -
Apply the
wherelinkresource YAML file on a local system site to create a link:<filename>.yamlis the name of the YAML file saved on your local filesystem. The file must have a.yamlor.jsonextension.
The apply command stages the resource into ~/.local/share/skupper/namespaces/<namespace>/input/resources/.
The reload command processes the staged resources and establishes the link.
The path is specific to the namespace; if you are configuring a different namespace, use that name instead.
- Check the status of the link: The output shows the link name: You can now expose services on the application network.