Skip to content

Commit

Permalink
demo: add ServiceImport with existing clustersetIP
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
  • Loading branch information
andrewsykim committed Aug 11, 2020
1 parent 3c023fb commit a3047f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demo/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ run "${k1} get endpointslice -n demo ${ep_1} -o yaml | ./edit-meta --metadata '{
run "${k2} get endpointslice -n demo ${ep_2} -o yaml | ./edit-meta --metadata '{name: imported-${ep_2}, namespace: demo, labels: {multicluster.kubernetes.io/service-name: serve}}' > yaml/slice-2.tmp"
run "${k1} apply -f yaml/serviceimport.yaml -f yaml/slice-1.tmp -f yaml/slice-2.tmp"
run "${k2} apply -f yaml/serviceimport.yaml -f yaml/slice-1.tmp -f yaml/slice-2.tmp"
run "${k1} apply -f yaml/serviceimport-with-vip.yaml -f yaml/slice-1.tmp -f yaml/slice-2.tmp"
run "${k2} apply -f yaml/serviceimport-with-vip.yaml -f yaml/slice-1.tmp -f yaml/slice-2.tmp"

desc "See what we've created..."
run "${k1} get -n demo serviceimports"
Expand All @@ -77,4 +79,4 @@ desc "See for yourself"
desc "Cluster 1: kubectl --kubeconfig ${kubeconfig1} -n demo"
desc "Cluster 2: kubectl --kubeconfig ${kubeconfig2} -n demo"
desc "(Enter to exit)"
read -s
read -s
12 changes: 12 additions & 0 deletions demo/yaml/serviceimport-with-vip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ServiceImport
metadata:
name: serve-with-vip
namespace: demo
spec:
type: ClusterSetIP
ips:
- 1.2.3.4
ports:
- port: 80
protocol: TCP

0 comments on commit a3047f2

Please sign in to comment.