kcd can be deployed using:
- Kubect: yaml specs for Kubenetes configuration is here
- ktmpl: ktmpl is another simple yaml templating engine. The Kubenetes yaml specs for kcd configuration is here
- Helm: Helm chart spec is here and helm package is avaialble here
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