Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Nov 7, 2023
1 parent e33f8df commit 697a217
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 21 deletions.
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ across cloud providers, data centers, and edge sites.
* [Prerequisites](#prerequisites)
* [Step 1: Configure separate console sessions](#step-1-configure-separate-console-sessions)
* [Step 2: Access your clusters](#step-2-access-your-clusters)
* [Step 3: Apply your YAML resources](#step-3-apply-your-yaml-resources)
* [Step 4: Link your namespaces](#step-4-link-your-namespaces)
* [Step 5: Test the application](#step-5-test-the-application)
* [Step 3: Set up your namespaces](#step-3-set-up-your-namespaces)
* [Step 4: Apply your YAML resources](#step-4-apply-your-yaml-resources)
* [Step 5: Link your namespaces](#step-5-link-your-namespaces)
* [Step 6: Test the application](#step-6-test-the-application)
* [Cleaning up](#cleaning-up)
* [About this example](#about-this-example)

Expand Down Expand Up @@ -99,7 +100,27 @@ configure access for each console session.

[kube-providers]: https://skupper.io/start/kubernetes.html

## Step 3: Apply your YAML resources
## Step 3: Set up your namespaces

Use `kubectl create namespace` to create the namespaces you wish
to use (or use existing namespaces). Use `kubectl config
set-context` to set the current namespace for each session.

_**Console for west:**_

~~~ shell
kubectl create namespace west
kubectl config set-context --current --namespace west
~~~

_**Console for east:**_

~~~ shell
kubectl create namespace east
kubectl config set-context --current --namespace east
~~~

## Step 4: Apply your YAML resources

To configure our example sites and service bindings, we are
using the following resources:
Expand Down Expand Up @@ -134,7 +155,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: skupper-site
namespace: west
data:
name: west
~~~
Expand All @@ -153,7 +173,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: skupper-site
namespace: east
data:
name: east
ingress: "false"
Expand All @@ -172,7 +191,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: east
labels:
app: backend
annotations:
Expand Down Expand Up @@ -207,7 +225,6 @@ _Sample output:_

~~~ console
$ kubectl apply -f west/frontend.yaml -f west/skupper.yaml -f west/site.yaml
namespace/west created
deployment.apps/frontend created
service/frontend created
serviceaccount/skupper-site-controller created
Expand All @@ -227,7 +244,6 @@ _Sample output:_

~~~ console
$ kubectl apply -f east/backend.yaml -f east/skupper.yaml -f east/site.yaml
namespace/east created
deployment.apps/backend created
serviceaccount/skupper-site-controller created
role.rbac.authorization.k8s.io/skupper-site-controller created
Expand All @@ -236,7 +252,7 @@ deployment.apps/skupper-site-controller created
configmap/skupper-site created
~~~

## Step 4: Link your namespaces
## Step 5: Link your namespaces

You can configure sites and service bindings declaratively, but
linking sites is different. To create a link, you must have the
Expand Down Expand Up @@ -299,7 +315,7 @@ to use `sftp` or a similar tool to transfer the token securely.
By default, tokens expire after a single use or 15 minutes after
creation.

## Step 5: Test the application
## Step 6: Test the application

Now we're ready to try it out. Use `kubectl get service/frontend`
to look up the external IP of the frontend service. Then use
Expand Down
1 change: 0 additions & 1 deletion east/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: east
labels:
app: backend
annotations:
Expand Down
1 change: 0 additions & 1 deletion east/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: skupper-site
namespace: east
data:
name: east
ingress: "false"
5 changes: 0 additions & 5 deletions skewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ steps:
kind: ConfigMap
metadata:
name: skupper-site
namespace: west
data:
name: west
~~~
Expand All @@ -88,7 +87,6 @@ steps:
kind: ConfigMap
metadata:
name: skupper-site
namespace: east
data:
name: east
ingress: "false"
Expand All @@ -107,7 +105,6 @@ steps:
kind: Deployment
metadata:
name: backend
namespace: east
labels:
app: backend
annotations:
Expand Down Expand Up @@ -135,7 +132,6 @@ steps:
west:
- run: kubectl apply -f west/frontend.yaml -f west/skupper.yaml -f west/site.yaml
output: |
namespace/west created
deployment.apps/frontend created
service/frontend created
serviceaccount/skupper-site-controller created
Expand All @@ -147,7 +143,6 @@ steps:
east:
- run: kubectl apply -f east/backend.yaml -f east/skupper.yaml -f east/site.yaml
output: |
namespace/east created
deployment.apps/backend created
serviceaccount/skupper-site-controller created
role.rbac.authorization.k8s.io/skupper-site-controller created
Expand Down
2 changes: 0 additions & 2 deletions west/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
namespace: west
labels:
app: frontend
spec:
Expand All @@ -26,7 +25,6 @@ apiVersion: v1
kind: Service
metadata:
name: frontend
namespace: west
spec:
type: LoadBalancer
selector:
Expand Down
1 change: 0 additions & 1 deletion west/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: skupper-site
namespace: west
data:
name: west
console: "true"
Expand Down

0 comments on commit 697a217

Please sign in to comment.