Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 1.49 KB

README.md

File metadata and controls

61 lines (48 loc) · 1.49 KB

Deployment of kcd

kcd can be deployed using:

  1. Kubect: yaml specs for Kubenetes configuration is here
  2. ktmpl: ktmpl is another simple yaml templating engine. The Kubenetes yaml specs for kcd configuration is here
  3. Helm: Helm chart spec is here and helm package is avaialble here

KCD: a Custom Kubernetes Resource

KCD is essentially a custom kubernetes resource definition (CRD) which is controller by the kcd (a k8s controller). The spec of KCD is specified here.

An example of CV resource is:

apiVersion: custom.k8s.io/v1
kind: KCD
metadata:
  name: myapp-kcd
spec:
  imageRepo: nearmap/myapp
  tag: dev
  pollIntervalSeconds: 5
  container: myapp
  selector:
    kcdapp: myappkcd

And an example creation of CV resource is:

cat <<EOF | kubectl create -f -
apiVersion: custom.k8s.io/v1
kind: KCD
metadata:
  name: myapp-kcd
spec:
  imageRepo: nearmap/myapp
  tag: dev
  pollIntervalSeconds: 5
  container: myappapp-container
  selector:
    kcdapp: photokcd
EOF

When KCD CRD is defined using (or with helm):

kubectl apply -f crd.yaml

and are avaialble on API server at following interface: http://localhost:8001/apis/custom.k8s.io/v1/kcds/ http://localhost:8001/apis/custom.k8s.io/v1/namespaces/myapp/kcds

and using kubectl:

    kubectl get kcd --all-namespaces