GithubHelp home page GithubHelp logo

aaron-ai / knative-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meteatamel/knative-tutorial

0.0 2.0 0.0 3.45 MB

A step-by-step tutorial showing different parts of Knative

License: Apache License 2.0

Dockerfile 16.60% C# 58.25% Python 25.15%

knative-tutorial's Introduction

Knative Tutorial

This tutorial shows how to use different parts of Knative.

Slides

There's a presentation that accompanies the tutorial.

Serverless with Knative

Installation

If you need to install Knative and its dependencies (Istio), see Knative Installation page for your platform. We tested this tutorial on Google Kubernetes Engine (GKE) with Knative version 0.8. For detailed GKE instructions, see Install on Google Kubernetes Engine page. Let's briefly recap the steps of installing Knative on GKE.

Set some environment variables for the cluster name and zone:

export CLUSTER_NAME=knative
export CLUSTER_ZONE=europe-west1-b

Create a Kubernetes cluster with Istio add-on with the preferred name and zone:

gcloud beta container clusters create $CLUSTER_NAME \
  --addons=HorizontalPodAutoscaling,HttpLoadBalancing,Istio \
  --machine-type=n1-standard-4 \
  --cluster-version=latest --zone=$CLUSTER_ZONE \
  --enable-stackdriver-kubernetes --enable-ip-alias \
  --enable-autoscaling --min-nodes=1 --max-nodes=10 \
  --enable-autorepair \
  --scopes cloud-platform

Grant cluster-admin permissions to the current user:

kubectl create clusterrolebinding cluster-admin-binding \
     --clusterrole=cluster-admin \
     --user=$(gcloud config get-value core/account)

Install Knative in 2 steps:

kubectl apply --selector knative.dev/crd-install=true \
   --filename https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
   --filename https://github.com/knative/eventing/releases/download/v0.8.0/release.yaml \
   --filename https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml

kubectl apply --filename https://github.com/knative/serving/releases/download/v0.8.0/serving.yaml \
   --filename https://github.com/knative/eventing/releases/download/v0.8.0/eventing.yaml \
   --filename https://github.com/knative/serving/releases/download/v0.8.0/monitoring.yaml

If everything worked, all Knative components should show a STATUS of Running:

kubectl get pods -n knative-serving
kubectl get pods -n knative-eventing
kubectl get pods -n knative-monitoring

Steps

Knative Serving

Knative Eventing

Build


This is not an official Google product.

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.