Knative notes

Installation

Installation (minikube)

From knative-with-minikube :

minikube start --memory=8192 --cpus=4 \
  --kubernetes-version=v1.10.5 \
  --vm-driver=kvm2 \
  --bootstrapper=kubeadm \
  --extra-config=controller-manager.cluster-signing-cert-file="/var/lib/localkube/certs/ca.crt" \
  --extra-config=controller-manager.cluster-signing-key-file="/var/lib/localkube/certs/ca.key" \
  --extra-config=apiserver.admission-control="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"

Note: use 16834 if running ELK too (a.k.a full knative)

curl -L https://raw.githubusercontent.com/knative/serving/v0.1.1/third_party/istio-0.8.0/istio.yaml \
  | sed 's/LoadBalancer/NodePort/' \
  | kubectl apply --filename -
kubectl label namespace default istio-injection=enabled

Wait for components to be running or completede

kubectl get pods --namespace istio-system

Now, install knative serving

curl -L https://github.com/knative/serving/releases/download/v0.1.1/release-lite.yaml \
  | sed 's/LoadBalancer/NodePort/' \
  | kubectl apply --filename -

Wait for components to be running

kubectl get pods --namespace knative-serving

Finaly, to get the knative serving “URL”

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

DONE Installation (minishift)

Logbook
  • State “DONE” from “TODO” [2020-04-01 Wed 17:42]
minishift start --memory=8192 --cpus=4

minishift allows for profiles, let’s use them. let’s also put the definition in there.

OCF

name = "ocf"
config {
       openshift-version = "v3.11.0"
       memory = "12GB"
       cpus = 4
       disk-size = "50GB"
       image-caching = true
}
addons = [ "admin-user", "anyuid" ]

To create/start it

yak minishift start ocf

Knative build only

name = "knbuild"
config {
       openshift-version = "v3.11.0"
       memory = "8GB"
       cpus = 4
       disk-size = "50GB"
       image-caching = true
}
addons = [ "admin-user", "anyuid" ]

To create/start it

yak minishift start knbuild

Command lines

Check version of knative

kubectl describe deploy controller --namespace knative-serving
# […]
...
Pod Template:
  Labels:           app=controller
  Annotations:      sidecar.istio.io/inject=false
  Service Account:  controller
  Containers:
   controller:
   # Link to container used for Knative install
    Image:        gcr.io/knative-releases/github.com/knative/serving/cmd/controller@sha256:59abc8765d4396a3fc7cac27a932a9cc151ee66343fa5338fb7146b607c6e306
...
# […]

Copy the full gcr.io link to the container and paste it into your browser. If you are already signed in to a Google account, you’ll be taken to the Google Container Registry page for that container in the Google Cloud Platform console. If you aren’t already signed in, you’ll need to sign in a to a Google account before you can view the container details.

Community

Links

Running Knative with Istio in a Kind Cluster   kubernetes knative

[2020-05-04 Mon 13:32]