Skip to content

Instantly share code, notes, and snippets.

@hguerrero
Last active October 16, 2019 19:58
Show Gist options
  • Save hguerrero/d49e0727df1f488833b89caf898dd906 to your computer and use it in GitHub Desktop.
Save hguerrero/d49e0727df1f488833b89caf898dd906 to your computer and use it in GitHub Desktop.
Skupper instructions
# us-east
kubectl create namespace us-east
kubectl config set-context --current --namespace us-east
kubectl create deployment hello-world-frontend --image quay.io/skupper/hello-world-frontend
kubectl expose deployment/hello-world-frontend --port 8080 --type LoadBalancer
kubectl create deployment hello-world-backend-us-east --image quay.io/hguerreroo/hello-world-backend
kubectl expose deployment/hello-world-backend-us-east --port 8080 --name hello-world-backend
skupper init --cluster-local
skupper connection-token ~/secret.yaml
oc rsh hello-world-frontend-<tab>
while true; do curl localhost:8080; sleep 5; done
oc scale deployment hello-world-backend-us-east --replicas=0
# eu-north
kubectl create namespace eu-north
kubectl config set-context --current --namespace eu-north
kubectl create deployment hello-world-backend-eu-north --image quay.io/hguerreroo/hello-world-backend
kubectl expose deployment/hello-world-backend-eu-north --port 8080 --name hello-world-backend
skupper init
skupper connect ~/secret.yaml
kubectl annotate service/hello-world-backend skupper.io/proxy=http
# eu-north
kubectl create namespace eu-north
kubectl config set-context --current --namespace eu-north
skupper init
skupper connect ~/secret.yaml
kubectl create deployment hello-world-frontend --image quay.io/skupper/hello-world-frontend
kubectl expose deployment/hello-world-frontend --port 8080 --type LoadBalancer
curl $(kubectl get service/hello-world-frontend -o jsonpath='http://{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}/')
# us-east
kubectl create namespace us-east
kubectl config set-context --current --namespace us-east
skupper init
skupper connection-token ~/secret.yaml
kubectl create deployment hello-world-backend-us-east --image quay.io/hguerreroo/hello-world-backend
kubectl expose deployment/hello-world-backend-us-east --port 8080 --name hello-world-backend
kubectl annotate service/hello-world-backend skupper.io/proxy=http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment