Jim Cheung

Thursday, May 9, 2019

watching O'Reilly Software Architecture Conference New York 2019, keynotes are already pretty good (links are from subscribed service):

about Glenn Vanderburg's talk, he wrote a blog post with all books he mentioned in the talk: Reading Broadly: A List of Good Books

very good fireside chat: VCF East 2019 – Brian Kernighan interviews Ken Thompson

some pretty good videos from RedisConf 2019:

Jane Paek's talk is great, learned many things from it.

one is using range partitioning to scale pub/sub, very good idea.

joined an online training from OReilly: Building and Managing Kubernetes Applications, by Sébastien Goasguen

some notes:

quickly generate yaml manifest

$ kubectl run app --image=nginx --restart=Never -o yaml --dry-run

--restart=Never makes it a Pod kind, --dry-run skips creating the actual pod to run


$ kubectl rollout history deployment app
$ kubectl rollout undo deployment app --to-revision 1

quick start a wordpress

$ kubectl run mysql --image=mysql:5.5 --env MYSQL_ROOT_PASSWORD=root
$ kubectl expose deployment mysql --port 3306

$ kubectl run wordpress --image=wordpress --env WORDPRESS_DB_HOST=mysql --env WORDPRESS_DB_PASSWORD=root
$ kubectl expose deployment wordpress --port 80 --type NodePort

Friday, May 10, 2019

continue with the online training:

relax isolation

  ShareProcessNamespace: true

it relaxes isolation between containers in the pod

when you ps in one of the containers, you'll see /pause as pid 1


download client from helm repo

$ kubectl -n kube-system create serviceaccount tiller
$ kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller 
$ helm init --service-account tiller
$ helm search minio
$ helm install stable/minio
$ helm ls
$ helm delete <chart name>

can also just download the chart tar ball:

$ helm fetch stable/minio


Kustomize - Kubernetes native configuration management


apiVersion: v1
kind: Pod
  name: kusto
  - name: test
    image: nginx


  oreilly: foo
  - name: nginx
    newTag: v1
  - pod.yaml

since kubectl v1.14, instead of running kustomize build ., now you can run with kubectl kustomize .

also a -k flag to directly apply the manifest

Custom Resource Definitions (CRD)

Extend the Kubernetes API with CustomResourceDefinitions - Kubernetes


apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
  name: streams.netflix.com
  group: netflix.com
  version: v1alpha1
  scope: Namespaced
    plural: streams
    singular: stream
    kind: Stream
    ‐ stm
$ kubectl create -f stream.yaml
$ kubectl get streams
$ kubectl get stm
$ kubectl get stream


apiVersion: apiextensions.k8s.io/v1beta1
kind: Stream
  name: designatedsurvivor
  type: kiefer


$ kubectl create -f st.yaml
$ kubectl get stm

define CRDs, and write controllers or operators to extend your k8s

tools to help with writing controlers/operators:

Thursday, May 16, 2019

notes from Introduction to Knative online training:

download triggermesh/tm and login to triggermesh (free, just use github/google account to login)

Install Knative on a Kubernetes cluster

after installed knative, check what's added to the system:

$ kubectl get crd | grep knative
$ kubectl get ns | grep knative
$ kubectl get builds --all-namespaces

Knative Serving

$ kubectl get pods -n knative-serving

Knative Build


knative build is being deprecated in favor of tekton (original knative pipeline)

Knative Eventing

a simple event source:

apiVersion: sources.eventing.knative.dev/v1alpha1
kind: CronJobSource
  name: test‐cronjob‐source
  schedule: "*/2 * * * *"
  data: '{"message": "Hello world!"}'
    apiVersion: serving.knative.dev/v1alpha1
    kind: Service
    name: event‐display

ksources for more info

Thursday, May 23, 2019

from My new favorite tool for looking at TLS things is certigo, learned about certigo, good tool

Kubernetes Serverless with Knative

knative has 3 primary components:

Blog Archive