Instantly share code, notes, and snippets.

View *shell*<2>.txt
time="2019-01-14T20:42:31Z" level=info msg="Installing istio for Installation istio-installation"
time="2019-01-14T20:42:31Z" level=info msg="Failed to create namespace istio-system, error is: namespaces is forbidden: User \"system:serviceaccount:istio-operator:istio-operator\" cannot create namespaces at the cluster scope: no RBAC policy matched"
time="2019-01-14T20:42:31Z" level=error msg="error syncing key (istio-operator/istio-installation): namespaces is forbidden: User \"system:serviceaccount:istio-operator:istio-operator\" cannot create namespaces at the cluster scope: no RBAC policy matched"
View gist:c277b4bec27930dbf3ce361683945730
[jim@localhost knative-operators]$ export KUBE_SSH_USER=ec2-user
[jim@localhost knative-operators]$ export KUBE_SSH_KEY=~/.ssh/ocp-workshop.pem
[jim@localhost knative-operators]$ ./etc/scripts/install.sh
WARNING: This script will blindly attempt to install OLM, istio, and knative
on your OpenShift cluster, so if any are already there, hijinks may ensue.
If your cluster isn't minishift, ensure $KUBE_SSH_KEY and $KUBE_SSH_USER are set
Pass -q to disable this warning
View *shell*<3>.txt
[jim@localhost knative-operators]$ export KUBE_SSH_KEY=~/.ssh/ocp-workshop.pem
[jim@localhost knative-operators]$ export KUBE_SSH_USER=ec2-user
[jim@localhost knative-operators]$ source ./etc/scripts/installation-functions.sh
[jim@localhost knative-operators]$ set -x
[jim@localhost knative-operators]$ enable_admission_webhooks
View *shell*.txt
[jim@localhost knative-operators]$ oc get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default docker-registry-1-bvpkl 1/1 Running 0 23h
default logging-eventrouter-1-chhpp 1/1 Running 1 23h
default registry-console-1-25qdr 1/1 Running 0 23h
default router-2-64mhk 1/1 Running 0 23h
istio-operator istio-operator-5799b9967b-h7jvr 1/1 Running 0 5m
istio-system istio-citadel-746c765786-jw9zg 1/1 Running 0 4m
istio-system istio-egressg
View *shell*.txt
MutatingAdmissionWebhook:
configuration:
apiVersion: v1
disable: false
kind: DefaultAdmissionConfig
ValidatingAdmissionWebhook:
configuration:
apiVersion: v1
disable: false
kind: DefaultAdmissionConfig
View *shell*.txt
+ git clone https://github.com/operator-framework/operator-lifecycle-manager /home/jim/src/operators/knative-operators/etc/scripts/../../.repos/olm
Cloning into '/home/jim/src/operators/knative-operators/etc/scripts/../../.repos/olm'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 22334 (delta 24), reused 30 (delta 14), pack-reused 22281
Receiving objects: 100% (22334/22334), 13.41 MiB | 8.29 MiB/s, done.
Resolving deltas: 100% (12738/12738), done.
Checking out files: 100% (3851/3851), done.
+ oc apply -f -
View *shell*.txt
[jim@localhost knative-kubecon]$ minishift version
minishift v1.27.0+707887e
[jim@localhost knative-kubecon]$ oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://192.168.42.89:8443
kubernetes v1.11.0+d4cacc0
[jim@localhost knative-kubecon]$ minishift ssh /var/lib/minishift/bin/oc version
View *shell*.txt
[jim@localhost knative-kubecon]$ oc apply -f serving/010-service.yaml
service.serving.knative.dev/dumpy created
[jim@localhost knative-kubecon]$ oc get kservice
NAME DOMAIN LATESTCREATED LATESTREADY READY REASON
dumpy dumpy.myproject.example.com dumpy-00001 dumpy-00001 False RevisionFailed
[jim@localhost knative-kubecon]$ curl -H "Host: dumpy.myproject.example.com" "http://$(minishift ip):32380/health"
888 888 888
888 888 888
888 888 888
View *shell*.txt
[jim@localhost knative-kubecon]$ oc apply -f serving/013-service-final.yaml
error: error when retrieving current configuration of:
Resource: "serving.knative.dev/v1alpha1, Resource=services", GroupVersionKind: "serving.knative.dev/v1alpha1, Kind=Service"
Name: "dumpy", Namespace: "myproject"
Object: &{map["metadata":map["name":"dumpy" "namespace":"myproject" "annotations":map["kubectl.kubernetes.io/last-applied-configuration":""]] "spec":map["release":map["configuration":map["build":map["source":map["git":map["revision":"v2" "url":"https://github.com/openshift-cloud-functions/openshift-knative-application"]] "template":map["arguments":[map["name":"IMAGE_STREAM" "value":"golang:1.11"] map["value":"dumpy:latest" "name":"IMAGE"] map["value":"dumpy-build" "name":"NAME"]] "name":"openshift-builds"]] "revisionTemplate":map["metadata":map["annotations":map["alpha.image.policy.openshift.io/resolve-names":"*"]] "spec":map["container":map["image":"docker-registry.default.svc:5000/myproject/dumpy:latest" "imagePullPolic
View *shell*.txt
Patching OpenShift configuration '/var/lib/minishift/base/kube-apiserver/master-config.yaml' with '{
"admissionConfig": {
"pluginConfig": {
"ValidatingAdmissionWebhook": {
"configuration": {
"apiVersion": "apiserver.config.k8s.io/v1alpha1",
"kind": "WebhookAdmission",
"kubeConfigFile": "/dev/null"
}
},