Creating a site on Kubernetes using YAML
Using YAML allows you to create and manage sites from the context of the current namespace.
A typical workflow is to create a site, link sites together, and expose services to the application network.
Creating a simple site on Kubernetes using YAML
You can use YAML to create and manage Skupper sites.
Prerequisites
- The Skupper controller is running on the Kubernetes cluster you are running or you are running on a platform.
Procedure
Create a site CR YAML file named
my-site.yaml, for example:apiVersion: skupper.io/v2alpha1 kind: Site metadata: name: my-site namespace: westThis YAML creates a site named
my-sitein thewestnamespace. Specifying the namespace is not required if the context is set to the namespace where you want to create the site.If you need to link to this site, enable link access:
apiVersion: skupper.io/v2alpha1 kind: Site metadata: name: my-site namespace: west spec: linkAccess: defaultCreate the site:
kubectl apply -f my-site.yamlCheck the status of the site:
kubectl get siteYou might need to issue the command multiple times before the site is ready:
$ kubectl get site NAME STATUS SITES IN NETWORK MESSAGE west Pending containers with unready status: [router kube-adaptor] $ kubectl get site NAME STATUS SITES IN NETWORK MESSAGE west Ready 1 OKYou can now link this site to another site to create an application network.
There are many options to consider when creating sites using YAML, see YAML Reference, including frequently used options.