Skip to content

Instantly share code, notes, and snippets.

@vaporpin
Last active May 31, 2022 11:01
Show Gist options
  • Save vaporpin/a80877ded979d9c92ee44515a74884b7 to your computer and use it in GitHub Desktop.
Save vaporpin/a80877ded979d9c92ee44515a74884b7 to your computer and use it in GitHub Desktop.
install argo events in another namespace
1) kubectl create namespace another-ns
# deploy eventbus in another-ns
2) kubectl --namespace another-ns apply \
--filename https://raw.githubusercontent.com/argoproj/argo-events/stable/examples/eventbus/native.yaml
#create SA in another-ns
3) cat <<EOF | kubectl apply --filename -
apiVersion: v1
kind: ServiceAccount
metadata:
name: argo-events-sa
namespace: another-ns
EOF
4) kubectl --namespace another-ns apply \
--filename event-source.yaml
5) kubectl --namespace another-ns apply \
--filename sensor.yaml
6) export EVENTSOURCE_POD_NAME=$(\
kubectl --namespace another-ns \
get pods \
--output name \
--selector eventsource-name=webhook)
7) kubectl --namespace another-ns \
port-forward $EVENTSOURCE_POD_NAME 12000:12000 &
8) curl -X POST \
-H "Content-Type: application/json" \
-d '{"message":"My first webhook"}' \
http://localhost:12000/devops-toolkit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment