rhuss / kn-box

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Knative installation box

A collection of script to run Knative

Installer

The installer gets you a minikube cluster, that runs:

  • Knative Serving CORE
  • Kourier Ingress
  • Knative Eventing CORE
./installer.sh

Accessing a service

To extract the host & port for accessing a Knative service via Minikube you can use the following expression:

$(minikube ip):$(kubectl get svc kourier --namespace kourier-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')

For example:

# Get host:port for acessing a service
ADDR=$(minikube ip):$(kubectl get svc kourier --namespace kourier-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')

# Create a sample service
kn service create random --image rhuss/random:1.0

# Access the Knative service
curl -sH "Host: random.default.example.com" http://$ADDR | jq .

Apache Kafka

If you want to experiment with Apache Kafka, install it using Strimzi:

./strimzi.sh

Knative components for Apache Kafka

To install the KafkaSource and the KafkaChannel CRDs, run:

./kn-kafka.sh

Have fun!

About


Languages

Language:Shell 100.0%