Giter Site home page Giter Site logo

kn-box's Introduction

Knative installation box

A collection of script to run Knative

Out of the Box: Apache Kafka and Knative

An opinionated package of Knative, Koruier, Apache Kafka and Strimzi can be found in this folder!

Modular Installers

The root director contains a set of more fine-grained scripts, allowing you a modular setup. The installer gets you a minikube/kind cluster:

./00-installer(kind).sh

You can specify the Kubernetes version with the K8S_IMAGE environment variable, before call the 00-install-kind.sh:

export K8S_IMAGE=kindest/node:v1.20.0

You can also specify the cpus, memory, disk size, and driver of the vm with the CPUS, MEMORY, DISKSIZE, and DRIVER environment variables. For example, to specify 6 cpus in the vm:

CPUS=6 ./00-installer.sh

NOTE: The scripts for the Knative components work against any Kubernetes cluster!

Knative Serving

To install the Knative Knative Serving with Kourier Ingress to the cluster invoke:

./01-kn-serving.sh

This installs the latest released version of Knative serving. If you want to install the latest nightly build, use option --nightly (i.e. ./01-kn-serving.sh --nightly)

Knative Eventing

To install the Knative Eventing components to the cluster invoke:

./02-kn-eventing.sh

This installs the latest released version of Knative eventing. If you want to install the latest nightly build, use option --nightly (i.e. ./02-kn-eventing.sh --nightly)

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 .

kn is the official CLI from the Knative project. Get it here!

Apache Kafka

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

./03-strimzi.sh

Knative components for Apache Kafka

To install the KafkaSource and the KafkaChannel CRDs, run:

./04-kn-kafka.sh

This command installs the latest release of the Apache Kafka components. If you instead want to install the latest nightly builds use the option --nightly (i.e. ./04-kn-kafka.sh --nightly).

The KafkaChannel in this version is currently not configured to run as a default channel!

Enabling tracing

If you want, you can install zipkin and configure it for Knative Eventing to read event traces:

./optional-tracing.sh

Be aware to configure tracing after you configured all the other components

Have fun!

kn-box's People

Contributors

aliok avatar cali0707 avatar devguyio avatar matzew avatar navidshaikh avatar rhuss avatar scholzj avatar slinkydeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kn-box's Issues

Error recognizing Image in caching.internal.knative.dev/v1alpha1

This is a probably an issue with Knative, but when I run 01-kn-serving.yaml on a Kind cluster, I see this.

error: unable to recognize "https://github.com/knative/serving/releases/download/v0.19.0/serving-core.yaml": no matches for kind "Image" in version "caching.internal.knative.dev/v1alpha1"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.