tinkerbell / tink

Workflow Engine for provisioning Bare Metal
https://tinkerbell.org
Apache License 2.0
930 stars 134 forks source link

Create a Kubernetes deployment #226

Closed displague closed 2 years ago

displague commented 4 years ago

Expected Behaviour

Tinkerbell should be installable via kubectl apply ... or helm install ....

Current Behaviour

Tinkerbell is not installable in Kubernetes.

Possible Solution

Create manifests for Kubernetes installations.

This requires that images are published.

This requires that Kubernetes manifests:

And these manifests have optionally:

Your Environment

Kubernetes 😄

displague commented 4 years ago

I converted the docker-compose environment from https://github.com/tinkerbell/tink/tree/master/deploy into an initial set of manifests: https://github.com/displague/tink-charts.

These currently lack any documentation on the configuration steps necessary to make them usable, because I am still tinkering with them.

I am using this on Raspberry Pis. When installing these manifests, I ran into the lack of multi-arch builds for the various services.

displague commented 4 years ago

@matoszz directed me to https://github.com/tinkerbell/tink/wiki/RFC-%233-Kubernetes-Support which covers the changes needed to get Tinkerbell running from Kubernetes from the perspective of a CRD controller handling the data.

This issue was opened with the expectation of using CSI or local-path volumes to persist data. I think this is a shorter path to running Tinkerbell within Kubernetes. A CRD based approach would overcome the persistent data hurdles (especially in the case of running K3s+Tinkerbell on a single Raspberry Pi node 😄 ).

Such a change could potentially remove the need for PBNJ and PostgreSQL. The other services would then use Kubernetes resources as the source of truth. The controller would effectively replace PBNJ and Kubernetes resources would replace PostgreSQL.

Without a bespoke API, tink-cli could become a Kubectl plugin that affects Kubernetes CRDs.

The CRDs that would be needed would map to the existing database tables (and tink-cli commands):

displague commented 4 years ago

@detiber, it sounds like @Cbkhare is going to be exploring this topic more with helm charts to deploy Tink in Kubernetes as one avenue to provide resiliency (https://github.com/tinkerbell/proposals/pull/10).

I was hoping you might be able to share some of your progress and thinking with Kind (https://github.com/detiber/tink/tree/kindDev) here.

displague commented 4 years ago

364 offers charts that may check some of the boxes on this issue.

detiber commented 4 years ago

I created https://github.com/tinkerbell/k8s-sandbox as a place that we could use for Kubernetes related work.

invidian commented 3 years ago

See also https://github.com/tinkerbell/tink/issues/335

displague commented 2 years ago

Closing this in light of https://github.com/tinkerbell/k8s-sandbox/tree/main/deploy/kubernetes