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

rollback

$ 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

spec:
  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

helm

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

Kustomize - Kubernetes native configuration management

pod.yaml:

apiVersion: v1
kind: Pod
metadata:
  name: kusto
spec:
  containers:
  • name: test image: nginx

kustomization.yaml:

commonLabels:
  oreilly: foo
imageTags:
  • name: nginx newTag: v1 resources: - 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

stream.yaml:

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

st.yaml:

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

then

$ 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

kaniko

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

Knative Eventing

  • channel
  • subscription
  • broker
  • trigger
    $ kubectl get pods -n knative-eventing
    

a simple event source:

apiVersion: sources.eventing.knative.dev/v1alpha1
kind: CronJobSource
metadata:
  name: test‐cronjob‐source
spec:
  schedule: "*/2 * * * *"
  data: '{"message": "Hello world!"}'
  sink:
    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


Blog Archives

Search Blog: