Knative notes

1 Installation

1.1 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}')

1.2 TODO Installation (minishift)

minishift start --memory=8192 --cpus=4

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

1.2.1 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

1.2.2 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

2 Command lines

3 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.

4 Community

Emacs 24.3.50.3 (Org mode 8.0.3)

Vincent Demeester. Last Updated 2019-03-23 Sat 15:46 (exported 2019-05-15 Wed 18:20).