-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskewer.yaml
64 lines (63 loc) · 2.1 KB
/
skewer.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
title: Accessing SERVER using Skupper
subtitle: Securely connect to SERVER on a remote Kubernetes cluster
overview: This example shows how you can use Skupper to access SERVER.
sites:
public:
title: Public
platform: kubernetes
namespace: public
env:
KUBECONFIG: ~/.kube/config-public
private:
title: Private
platform: kubernetes
namespace: private
env:
KUBECONFIG: ~/.kube/config-private
steps:
- standard: general/install_the_skupper_command_line_tool
- standard: kubernetes/set_up_your_clusters
- title: Deploy SERVER
preamble: |
In Private, use the `kubectl apply` command to install the
server.
commands:
private:
- run: kubectl apply -f server/kubernetes.yaml
output: deployment.apps/server created
- standard: kubernetes/create_your_sites
- standard: kubernetes/link_your_sites
- title: Expose SERVER
preamble: |
In Private, use `skupper expose` to expose SERVER on the Skupper
network.
Then, in Public, use `kubectl get service/server` to check that
the service appears after a moment.
commands:
private:
- await_resource: deployment/server
- run: skupper expose deployment/server --port 8080 --target-port 80
output: deployment server exposed as server
public:
- await_resource: service/server
- run: kubectl get service/server
output: |
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
server ClusterIP 10.100.58.95 <none> 8080/TCP 2s
- title: Run CLIENT
preamble: |
In Public, use `kubectl run` to run CLIENT.
commands:
public:
- await_resource: service/server
- run: kubectl run client --attach --rm --image docker.io/library/nginx --restart Never -- curl -sf http://server:8080/
output: |
OUTPUT
pod "client" deleted
- standard: kubernetes/cleaning_up
commands:
private:
- run: skupper delete
- run: kubectl delete -f server/kubernetes.yaml
public:
- run: skupper delete