# development

The Add-On implementation needs to be a general solution so we provide a command to deliver a default example add-on which can be customized by the user.

## Development commands

The command to create the example add-on gets created with this.

```
tk8 addon create my-addon
```

This command pulls the tk8-addon-develop from GitHub and creates a new folder below ./addons/my-addon

The example is a simple nginx deployment and a LoadBalancer service to expose this. So the user who creates this add-on can directly use it and apply it to the k8s cluster

```
tk8 addon install my-addon
```

and could remove it from the k8s cluster with

```
tk8 addon destroy my-addon
```

The default developer add-on doesn't contain a main.sh file. But we need to create documentation for it. Our own add-ons could use and need it.

## TK8 Add-on structure

For a general use of Add-Ons with git we defined a standard frame which contains the folder structure, the yml structure and an example.

The Folder structure

→ addons

\| → my-addon

\| → | → LICENCE

\| → | → Readme.md

\| → | → main.yml

\| → | → main.sh

The main.yml contains all the needed information for k8s and will create all the deployments and services which are needed.

Optionally there is a main.sh which can used to download external repositories or to create a main.yml


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kubernauts.gitbook.io/tk8/docs/en/add-on/development.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
