Skip to content

Commit

Permalink
improve description
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed May 23, 2019
1 parent f6366db commit 799b496
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 18 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
- Website: https://get-kbld.io
- Slack: [#k14s in Kubernetes slack](https://slack.kubernetes.io)

`kbld` can
`kbld` seamlessly incorporates image building and image pushing into your development and deployment workflows.

- resolve images to their *immutable* image references (digests)
- optionally build Docker images (by delegating to tools such as Docker)
- export set of images as a single tarball, and import into a different registry
Features:

- Orchestrates image builds (delegates to tools like Docker) and registry pushes
- Works with local Docker daemon and remote registries, for development and production cases
- Records metadata about image sources in annotation on Kubernetes resources (see examples below)
- Resolves image references to their digest form (*immutable*) ([details](https://get-kbld.io/#why))
- Provides a way to transport set of images in a single tarball between registries
- maintaining exactly same digests, hence guaranteeing exactly same content
- Not specific to Kubernetes, but works really well with Kubernetes configuration files

![](docs/kbld-screenshot.png)

Example of using [ytt](https://github.com/k14s/ytt) + kbld + [kapp](https://github.com/k14s/kapp) to deploy an application:

```bash
ytt template -f kubernetes-manifests/ | kbld -f- | kapp -y deploy -a app1 -f-
```
See [building and deploying simple Go application to Kubernetes example](https://github.com/k14s/k8s-simple-app-example#step-3-building-container-images-locally) that uses kbld.

## Docs

Expand Down
1 change: 1 addition & 0 deletions pkg/kbld/website/js/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ code, .terminal, .logo {
border-width: 0;
vertical-align: text-top;
}
#before-after th { font-weight: bold; }
#before-after .before,
#before-after .after {
font-size: 80%;
Expand Down
45 changes: 36 additions & 9 deletions pkg/kbld/website/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<div class="header">
<h1><span class="logo">$ kbld</span></h1>

<p class="hero"><code>kbld</code> is a tool centered around <em>immutable</em><br/>
Docker image references (i.e. digests) for Kubernetes configuration.</p>
<p class="hero"><code>kbld</code> seamlessly incorporates image building<br/>
and image pushing into your development and deployment workflows.</p>

<p class="hero">
<a class="link-button" href="https://github.com/k14s/kbld">Github</a>
Expand All @@ -26,20 +26,26 @@ <h1><span class="logo">$ kbld</span></h1>

<div id="intro">
<div id="why">
<h2>Why?</h2>
<h2>Features</h2>
<ul>
<li>Orchestrates image builds (delegates to tools like Docker) and registry pushes</li>
<li>Works with local Docker daemon and remote registries, for development and production cases</li>
<li>Records metadata about image sources in annotation on Kubernetes resources (see examples below)</li>
<li>Resolves image references to their digest form (immutable) (<a href="#why">see "why" below</a>)</li>
<li>Provides a way to transport set of images in a single tarball between registries</li>
<li>Not specific to Kubernetes, but works really well with Kubernetes configuration files</li>
</ul>

<p>Docker images can be referenced by their name (<code>nginx</code>), name-tag pair (<code>nginx:1.14</code>), or a digest (<code>nginx@sha256:c398dc3f2...</code>). Using non-digest methods may lead to hard to find deployment inconsistencies, hence it's a good practice to use image digests as they uniquely represent a particular image and cannot change.</p>
<h2>Why Digest References?</h2>

<p>kbld helps Kubernetes users convert non-digest image references to their digest form so that it's easier to track which images are used and how they change over time.</p>

<p>Additionally, kbld can orchestrate image building (delegates to tools like Docker) and pushing (to registries) and capture digest references of built images.</p>
<p>Docker images can be referenced by their name (<code>nginx</code>), name-tag pair (<code>nginx:1.14</code>), or a digest (<code>nginx@sha256:c398dc3f2...</code>). One can avoid potential deployment inconsistencies by using digest references as they are immutable, and therefore <em>always</em> points to an exact image. kbld helps Kubernetes users convert image references to their digest form to make sure exact image is used during deploys.</p>
</div>

<div id="basic-usage">
<h2>Basic Usage</h2>
<pre class="terminal">
<span class="gray"># Configurations picked up from a directory</span>
$ kbld -R -f examples/cassandra/ <strong>|</strong> kubectl apply -f -
$ kbld -f examples/cassandra/ | kubectl apply -f -

<span class="gray"># Can be used with helm charts</span>
$ helm template my-chart --values my-vals.yml | kbld -f - | kubectl apply -f -
Expand All @@ -48,13 +54,17 @@ <h2>Basic Usage</h2>
$ kustomize build ./some-app | kbld -f - | kubectl apply -f -

<span class="gray"># ... or templated with ytt and deployed with kapp</span>
$ ytt template -R -f ./some-app | kbld -f - | kapp -y deploy -a some-app -f -</pre>
$ ytt template -f ./some-app | kbld -f - | kapp -y deploy -a some-app -f -</pre>
</div>

<div id="before-after">
<h2>Examples</h2>
<table>
<tbody>
<tr>
<th>Input file</th>
<th>stdout</th>
</tr>
<tr>
<td colspan="2"><p>Resolves name-tag pair reference (<code>nginx:1.7.9</code>) into digest reference (<code>index.docker.io/library/nginx@sha256:c398dc3f2...</code>)</p></td>
</tr>
Expand Down Expand Up @@ -91,6 +101,13 @@ <h2>Examples</h2>
name: nginx-deployment
labels:
app: nginx
annotations:
<span class="green">kbld.k14s.io/images: |
- Metas:
- Tag: 1.7.9
Type: resolved
URL: nginx:1.7.9
URL: index.docker.io/library/nginx@sha256:c398dc3f2...</span>
spec:
replicas: 3
selector:
Expand Down Expand Up @@ -162,6 +179,16 @@ <h2>Examples</h2>
name: app1-deployment
labels:
app: app1
annotations:
<span class="green">kbld.k14s.io/images: |
- Metas:
- Path: /Users/pivotal/workspace/simple-app
Type: local
- Dirty: false
RemoteURL: [email protected]:k14s/super-secret-simple-app
SHA: e877718521f7ccea0ab0844db0f86fe123a8d8ef
Type: git
URL: index.docker.io/dkalinin/simple-app@sha256:e932e46fd...</span>
spec:
replicas: 3
selector:
Expand Down

0 comments on commit 799b496

Please sign in to comment.