## 1. Project Overview & Quickstart (kubero-dev/README.zh-CN)

# README.zh-CN

Open-source repository kubero-dev/README.zh-CN

### Repository Details
- **Repository:** [kubero-dev/README.zh-CN](https://github.com/kubero-dev/README.zh-CN)
- **Primary Language:** Code

*Note: High-volume repository documentation is actively indexed and synchronized by YakaAI.*

## 2. Official Technical Reference & Guides (kubero-dev/docs)

## File: README.md

# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

---

## File: docs/Development/setup.md

# Local development

## Prerequisites
- A running Kubernetes cluster. This can be a local cluster like [kind](https://kind.sigs.k8s.io/) or a remote cluster like [GKE](https://cloud.google.com/kubernetes-engine).
- [Node.js](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/) installed on your local machine.
- Fully install kubero on your cluster by running ```kubero install```


## Create a Fork
Fork the repository to your own GitHub account.

## Clone the repository
```bash
git clone git@github.com:your-github-account/kubero.git
```

## Export your kubernetes config 
In case you are using a local cluster like kind, you can export the kubeconfig to the local directory.
```bash
kind get kubeconfig --name kubero-001 > ./kubeconfig
```
Make sure the context in your kubeconfig the same as in the .env file KUBERO_CONTEXT

## Start the UI Backend
Open the first terminal. Configure the local ENV values according your needs. Change to the server directory to start the server. 
```bash
cd server
cp .env.template .env
yarn dev
```

## Build the Client UI
Open a second terminal and change to the client directory. Install the dependencies and start the client.
```bash
cd client
yarn watch
```

## Access the UI
Open your browser and navigate to [http://localhost:3000](http://localhost:3000)

## Happy coding
This is how my terminal looks like after starting the server and the client.

---

## File: docs/Getting-Started/Installation/installation-colima.md

---
sidebar_position: 4
---

# Installation on colima

Runs on macOS only with [colima](https://github.com/abiosoft/colima)

### 1. Install colima

```bash
brew install colima
```

### 2. Start colima with kubernetes

```bash
colima start --with-kubernetes
```

### 3. Install Kubero 

Select "n" on step 1) to skip the installation of the kubernetes cluster

```bash
kubero install
```

---

## File: docs/Getting-Started/Installation/installation-microk8s.md

---
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';



# Installation on MicroK8s 


### 1. Install MicroK8s
https://microk8s.io/docs/getting-started 

### 2. Enable the required MicroK8s addons
```bash
microk8s enable dns ingress 
```

Optional but recommended: 
```bash
microk8s enable metrics-server cert-manager
```

Extract your kubeconfig and switch the context to this config
```bash
microk8s config > ~/.kube/config
kubectl config use-context microk8s
```

> For shortcut, use alias k = kubectl

Find the IP of the ingress controller
```bash
k get nodes -o wide
```

Point your domain to the IP from INTERNAL-IP field

### 3. Install Kubero Operator

<Tabs groupId="install-strategy">
  <TabItem value="kubectl" label="kubectl">

      ```bash
      kubectl apply -f https://raw.githubusercontent.com/kubero-dev/kubero-operator/main/deploy/operator.yaml
      ```
  </TabItem>
  <TabItem value="cli" label="Kubero CLI">

      ```bash
      kubero install -c kubero-operator
      ```
  </TabItem>
</Tabs>

### 4. Install Kubero UI

Run the kubero-cli to install the Kubero UI
```bash
kubero install -c kubero-ui
```

**Or** create the namespace, secrets and CRD manually

#### Create the namespace
```
kubectl create namespace kubero
```

#### Create the secrets
```bash
kubectl create secret generic kubero-secrets \
    --from-literal=KUBERO_WEBHOOK_SECRET=$(openssl rand -hex 20) \
    --from-literal=KUBERO_SESSION_KEY=$(openssl rand -hex 20) \
    --from-literal=GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_TOKEN \
    -n kubero
```
| Variable | Required | Description |
|-------:|:-------:|:-----------|
| GIT_DEPLOYMENTKEY_PUBLIC | deprecated | (Bug in Operator =< v0.0.70, set to random string) |
| GIT_DEPLOYMENTKEY_PRIVATE_B64 | deprecated | (Bug in Operator =< v0.0.70, set to random string)  |
| KUBERO_WEBHOOK_SECRET | required | Random secret string |
| KUBERO_SESSION_KEY | required | Random secret string |
| KUBECONFIG_BASE64 | optional | Base64 encoded Kubeconfig, may contain multiple contexts (required for multi cluster)|
| KUBERO_USERS | optional | Base64 encoded jsonfile (see Authentication chapter) |
| GITHUB_PERSONAL_ACCESS_TOKEN | optional | Personal access token for GitHub API |
| GITEA_PERSONAL_ACCESS_TOKEN | optional | Personal access token for Gitea API |

#### Deploy the Kubero UI

```bash
 kubectl apply -f https://raw.githubusercontent.com/kubero-dev/kubero-operator/main/config/samples/application_v1alpha1_kubero.yaml -n kubero
```

### 5. (Optional) configure the clusterissuer for cert-manager

```yaml
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  annotations:
  name: letsencrypt-prod
spec:
  acme:
    email: changeme@yourdomain.com
    privateKeySecretRef:
      name: letsencrypt
    server: https://acme-v02.api.letsencrypt.org/directory
    solvers:
    - http01:
        ingress:
          class: nginx
```

```bash
kubectl apply -f clusterissuer.yaml
```

---

## File: docs/Getting-Started/Installation/installation-minikube.md

---
sidebar_position: 3
---


# Installation on miniKube


### 1. Install minikube on macOS

```bash
brew install minikube
```

For other OS, follow the instructions here:
https://minikube.sigs.k8s.io/docs/start/

### 2. Start a minikube cluster

```bash
minikube start --memory='6g' --cpus='4' --disk-size='50g' --ports=80,443 --addons=ingress --addons=metrics-server
```

### 3. Install Kubero 

Select "n" on step 1) to skip the installation of the kubernetes cluster

```bash
kubero install
```

### 4. configure DNS

```bash
echo "$(minikube ip) demo.kubero.dev" | sudo tee -a /etc/hosts
```

### Result

```
/* Detailed source-code truncated for AI context efficiency. */
```

---

## File: docs/Getting-Started/Installation/installation-vanilla.md

---
sidebar_position: 1
Title: Installation on Vanilla/Kind
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


# Installation (vanilla, Kind)
This is the installation guide for Kubero on a vanilla Kubernetes. This fits also for Kind clusters. It will guide you through the installation of the required components, the Kubero Operator and the Kubero UI.

the Kubero CLI is currently using KIND. There are specific installation guides for [minikube](./installation-minikube.md), [microk8s](./installation-microk8s.md) and [colima](./installation-colima.md).


All these steps can be performed with the Kubero CLI or [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl). You can download the latest Kubero CLI version from the [releases page](https://github.com/kubero-dev/kubero-cli/releases/latest)


### Prerequisites
- Kubernetes cluster
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
- [Kubero CLI (optional)](https://github.com/kubero-dev/kubero-cli/releases/latest)

:::info

Kubero is designed to run with Nginx Ingress Controller, Metrics Server and Cert Manager. If you are using a different Ingress Controller, you will need to adjust the installation steps accordingly. Some features like Metrics and Proxy configurations (CORS, Bodysize, ... ) may not work.

It might be improved in later versions.

:::

## Components

### Ingress Controller
The Installation of the Ingress Controller depends on your Kubernetes provider. For example, if you are using Kind, you can use the following command:

<Tabs groupId="install-strategy">
  <TabItem value="kubectl" label="kubectl">

      ```bash
      kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
      ```
  </TabItem>
  <TabItem value="cli" label="Kubero CLI">
      
      ```bash
      kubero install -c ingress
      ```
  </TabItem>
</Tabs>

For other Kubernetes providers, please use one of the following [resources](https://github.com/kubernetes/ingress-nginx/tree/main/deploy/static/provider)

### Metrics Server
The Metrics Server is required for the Kubero UI to display CPU and Memory usage. You can install it with the following command:

<Tabs groupId="install-strategy">
  <TabItem value="kubectl" label="kubectl">

      ```bash
      kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
      ```
  </TabItem>
  <TabItem value="cli" label="Kubero CLI">

      ```bash
      kubero install -c metrics
      ```
  </TabItem>
</Tabs>

### Cert Manager
The Certmanager is required to generate and manage TLS certificates.
<Tabs groupId="install-strategy">
  <TabItem value="kubectl" label="kubectl">

      ```bash
      kubectl apply -f https://operatorhub.io/install/cert-manager.yaml
      ```
  </TabItem>
  <TabItem value="cli" label="Kubero CLI">

      ```bash
      kubero install -c certmanager
      ```
  </TabItem>
</Tabs>

### Monitoring Stack
(introduced in version v2.3.0)

In order to monitor your app with longterm statistics (metrics section), you will need to install Prometheus and kube-metrics. 
<Tabs groupId="install-strategy">
  <TabItem value="kubectl" label="kubectl">

      ```bash
      kubectl apply -f https://raw.githubusercontent.com/kubero-dev/kubero-operator/main/config/samples/application_v1alpha1_kuberoprometheus.yaml
      ```
  </TabItem>
  <TabItem value="cli" label="Kubero CLI">

      ```bash
      kubero install -c monitoring
      ```
  </TabItem>
</Tabs>


:::info

Make sure you nginx ingress controller is configured as described here : 

https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/monitoring.md

::: 


## Kubero Operator

There are two ways to install Kubero:
1) Minimal installation
2) Full installation with OLM (Operator Lifecycle Manager)

### Option 1) Default installation (recommended)

The minimal installation will install the Kubero Operator and the required CRDs. The Kubero UI will be installed on a later step.
<Tabs groupId="install-strategy">
  <TabItem value="kubectl" label="kubectl">

      ```bash
      kubectl apply -f https://raw.githubusercontent.com/kubero-dev/kubero-operator/main/deploy/operator.yaml
      ```
  </TabItem>
  <TabItem value="cli" label="Kubero CLI">

      ```bash
      kubero install -c kubero-operator
      ```
  </TabItem>
</Tabs>

### Option 2) Installation with OLM
The OLM installation will install the Operator Lifecycle Manager and the Kubero Operator. The Kubero UI will be installed on a later step.

**OLM (Operator Lifecycle Manager)**
```
kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml

kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml
```

**Kubero Operator**
```bash
kubectl create -f https://operatorhub.io/install/kubero-operator.yaml
```


## Kubero UI
The Kubero UI provides an API and a web interface to manage your Kubero installation. Without the Kubero UI, you can still use the Kubero Operator to manage your applications but you will need to use the kubectl to apply the rescources.

### Install Kubero UI with the Kubero CLI
```bash
kubero install -c kubero-ui
```


### Install Kubero UI with kubectl
These steps are not required if you have installed the Kubero UI with the Kubero CLI.

#### Create the namespace
```
kubectl create namespace kubero
```

#### Create the secrets
```bash
kubectl create secret generic kubero-secrets \
    --from-literal=KUBERO_WEBHOOK_SECRET=$(openssl rand -hex 20) \
    --from-literal=KUBERO_SESSION_KEY=$(openssl rand -hex 20) \
    --from-literal=GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_TOKEN \
    -n kubero
```
| Variable | Required | Description |
|-------:|:-------:|:-----------|
| GIT_DEPLOYMENTKEY_PUBLIC | deprecated | (Bug in Operator =< v0.0.70, set to random string) |
| GIT_DEPLOYMENTKEY_PRIVATE_B64 | deprecated | (Bug in Operator =< v0.0.70, set to random string)  |
| KUBERO_WEBHOOK_SECRET | required | Random secret string |
| KUBERO_SESSION_KEY | required | Random secret string |
| KUBECONFIG_BASE64 | optional | Base64 encoded Kubeconfig, may contain multiple contexts (required for multi cluster)|
| KUBERO_USERS | optional | Base64 encoded jsonfile (see Authentication chapter) |
| GITHUB_PERSONAL_ACCESS_TOKEN | optional | Personal access token for GitHub API |
| GITEA_PERSONAL_ACCESS_TOKEN | optional | Personal access token for Gitea API |

#### Deploy the Kubero UI

```bash
 kubectl apply -f https://raw.githubusercontent.com/kubero-dev/kubero-operator/main/config/samples/application_v1alpha1_kubero.yaml -n kubero
```

---

## File: docs/Getting-Started/configuration.md

---
sidebar_position: 3
---
# Configuration

## Kubero UI

## Customize the Kubero configuration
Allways edit the `kuberoes` CRD to make changes in your Kubero configuration. Changes on the configmap will be overwritten by the operator. 

```bash
kubectl edit kuberoes kubero -n kubero
```


The config has three sections so far:

1. kubero: configures the UI
2. buildpacks: the selectable list of buildpacks
3. podSizeList: the selectable list of pods

A full example can be found here https://github.com/kubero-dev/kubero/blob/main/config.yaml

```
/* Detailed source-code truncated for AI context efficiency. */
```

## CD/CD Buildpipeline

Building Docker images is a standard process in CI/CD pipelines. Kubero supports building images using these three methods:
[buildpacks.io](https://buildpacks.io/), Nixpacks and Dockerfiles.

Once built, these images must be pushed to a container registry, which is configured in the `kubero` Custom 
Resource Definition (CRD). The target registry must have a valid **TLS certificate**, **Fully Qualified Domain Name (FQDN)**, 
and **basic authentication** enabled for security. You can use a public (v2) registry like `docker.io` or `ghcr.io`, 
or set up a local registry by enabling the `create` flag.

If you opt for a local registry, ensure that it is configured as an insecure registry on all nodes in the cluster. 
For details on configuring insecure registries, see the [Docker CLI documentation](https://docs.docker.com/reference/cli/dockerd/#insecure-registries).


:::info

This config requires Kubero Operator >= v0.0.137

:::

```yaml
spec:
  registry:
    enabled: true  # creates registry credentials for a external or a local registry (required for build strategy apps)
    create: true   # spins up a local registry
    #host: registry.kubero.svc.cluster.local  # works for pushes, but not for pulls. DO NOT USE THIS :( since it requires to configure all nodes ot acceppt this "insecure" registry
    #host: docker.io                          # requires a docker account. Might be the best choice when running on a non public domain
    host: registry.mykubero.com               # will make your images publicly avaialble with a basic auth protection
    account:
      # create account with:
      # docker run --entrypoint htpasswd httpd:2 -Bbn [username] [password]
      # http://aspirine.org/htpasswd_en.html (use bcrypt)
      username: MyUser
      password: MyPassword
      hash: $2y$05$cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    port: 443
    storage: 1Gi
    storageClassName:
```


## Authentication
The Kubero UI has a built-in authentication to restrict access. All methods can be used simultaneously.

### Local
This setup is suitable for individual users or very small teams (up to 8 credentials). Authentication credentials are stored in the environment variable `KUBERO_USERS` as a base64-encoded string.

:::caution

Do not use this example credentials

:::

**1) create an encrypted password**
```
PASSWORD=asdf &&
SALT=asdf &&
echo -n $PASSWORD | openssl dgst -sha256 -hmac $SALT
```

**2) create a JSON file with the encrypted password. For example users.json**
```json
[
  {
    "id": 1,
    "method": "local",
    "username": "asdf",
    "password": "8a8423ba78c8f3da60a602493663c1cdc248a89541b12980e292399c0f0cad21",
    "insecure": false
    "apitoken": "asdf",
  },
  {
    "id": 2,
    "method": "local",
    "username": "qwer",
    "password": "qwer",
    "insecure": true,
    "apitoken": "asdf",
  }
]
```
**3) encode the created file to base64**
```
cat users.json | base64
```

**4) put the env var in your secrets.yaml and apply it**
```yaml
apiVersion: v1
kind: Secret
metadata:
  name: kubero-secrets
type: Opaque
data:
    ...
    ...
stringData:
    KUBERO_USERS: "WwogIHsKICAgICJpZCI6IDEsCiAgICAibWV0aG9kIjogImxvY2FsIiwKICAgICJ1c2VybmFtZSI6ICJhc2RmIiwKICAgICJwYXNzd29yZCI6ICI4YTg0MjNiYTc4YzhmM2RhNjBhNjAyNDkzNjYzYzFjZGMyNDhhODk1NDFiMTI5ODBlMjkyMzk5YzBmMGNhZDIxIiwKICAgICJpbnNlY3VyZSI6IGZhbHNlCiAgfSwKICB7CiAgICAiaWQiOiAyLAogICAgIm1ldGhvZCI6ICJsb2NhbCIsCiAgICAidXNlcm5hbWUiOiAicXdlciIsCiAgICAicGFzc3dvcmQiOiAicXdlciIsCiAgICAiaW5zZWN1cmUiOiB0cnVlCiAgfQpd"
    ...
    ...
```

```bash
kubectl apply -f secrets.yaml -n kubero
```

### Github
If you already have a GitHub organization and want to grant access to its members, use this section.


1. go to organisation settings -> developer settings -> OAuth Apps and register an application


2. Choos a name and a homepage URL. Set the callback url to `https://<your-kubero-domain>/api/auth/github/callback`


3. You will need the Client ID and the generated Client Secret


4. Configure the kubero UI
```yaml
kubero:
  auth:
    github:
      enabled: true
      id: "<your client id>"
      callbackUrl: "<your callback URL>"
      org: "your-org" # this will limit access to this organisation
```

:::info

The Organisation needs to be public and visible in user profile. Private Organisations are not supported by Github since they are not accessible during login process.

:::

5. Add the "Client Secret" to secret
```yaml
apiVersion: v1
kind: Secret
metadata:
  name: kubero-secrets
type: Opaque
stringData: 
  GITHUB_CLIENT_SECRET: <your client secret>
data:
    ...
    ...
```

### Oauth2 (gitea, azure, keycloak, ...)
This should fit all other usecases.

---

## File: docs/Getting-Started/prerequisites.md

---
sidebar_position: 1
---

# Prerequisites

To install Kubero, you need a Kubernetes cluster and the `kubectl` command-line tool.

## Kubernetes Cluster

Kubero can be installed on any Kubernetes cluster. If you don’t have access to one, there are a few options to get started:

- **Local Deployment**: Use [Kind (Kubernetes IN Docker)](https://kind.sigs.k8s.io/docs/user/quick-start/), Minikube, Microk8s, K3s, or Colima to create a local cluster on your desktop, server, or virtual machine.
- **Cloud Deployment**: Use the Kubero CLI to create a cluster on one of the many cloud providers offering Kubernetes as a service. (e.g., AWS, Azure, Google Cloud, Digital Ocean, Linode, Scaleway, etc.)

Choose the option that best fits your setup and proceed with the installation.

### Starting a local Kind cluster

```bash
wget https://raw.githubusercontent.com/kubero-dev/kubero/main/kind.yaml
kind create cluster --config kind.yaml
```

## kubero CLI (optional)
The Kubero CLI is a command line tool that can be used to install and manage Kubero. It is not required to install Kubero, but it can be helpful for managing Kubero resources.

You can install the Kubero CLI binary by running the following command:

```bash
curl -L https://get.kubero.dev | bash
```

Or you can install the Kubero CLI using Homebrew:

```bash
brew tap kubero-dev/kubero
brew install kubero-cli
```

### Environment variables for cloudcredentials (optional)

In order to enable the Kubero CLI to create clusters on cloud providers, you need to set the following environment variables:

**Scaleway**
```bash
export SCALEWAY_ACCESS_TOKEN=xxx
export SCALEWAY_PROJECTID=xxx
export SCALEWAY_ORGANIZATIONID=xxx
```
**Linode**
```bash
export LINODE_ACCESS_TOKEN=xxx
```
**Digital Ocean**
```bash
export DIGITALOCEAN_ACCESS_TOKEN=xxx
```
**Google GKE**
```bash
export GOOGLE_API_KEY=xxx
```

---

## File: docs/Getting-Started/repositories.md

---
sidebar_position: 4
---

# Connect Repositories

To depploy your app by pullrequest or push you need to connect a repository to Kubero.
Therefor you need to create a Personal Access Token (PAT) on your repository provider.

List of available repositories

- GitHub
- Gitlab (hosted and self-hosted)
- Bitbucket (hosted and self-hosted)
- Gitea (hosted and self-hosted)
- Gogs

## GitHub

Official documentation: [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)

Link to your developer settings: [Link](https://github.com/settings/apps)

GitHub offers two types of PATs: *"fine-grained (beta)"* and *"Tokens (classic)"*. Kubero works with both types.


### Tokens (classic)


### Fine-grained (beta)


## Gitea
1. Log into Gitea and click your avatar to open the user menu, then select Settings.



2. From the Settings menu, select Applications.

In the Generate New Token section:
1. Enter a name for the token
2. Select **All (public, private, and limited)** repository access
3. Select permissions
   - **admin Read and Write**
   - **repository Read and Write**
   - **user Read**
3. Then click the Generate Token button.

---

## File: docs/Getting-Started/troubleshooting.md

---
title: Troubleshooting
sidebar_position: 6
---

# Troubleshooting Kubero installation

There is a kubero debug command in the kubero-cli to help you troubleshoot your installation. 

```bash
kubero debug
```


## 1. Kubero UI is not accessible

### Check the Kubero UI CRD

```bash
kubectl get kuberoes.application.kubero.dev kubero -n kubero
```

```bash title="Expected result"
NAME     AGE
kubero   8d
```

### Check if the Kubero UI is running

```bash
kubectl get pods -n kubero
```

```bash title="Expected result"
NAME                               READY   STATUS    RESTARTS   AGE
kubero-785c84f85f-d65t2            1/1     Running   0          6d18h
kubero-registry-7d6d5cdb74-8fqm2   1/1     Running   0          8d  <---- Optional
```

### Check the Kubero ingress

```bash
kubectl get ingress -n kubero
```

```bash title="Expected result"
NAME                      CLASS   HOSTS                      ADDRESS         PORTS     AGE
kubero                    nginx   demo.kubero.dev            45.79.240.209   80, 443   126d
kubero-registry-ingress   nginx   registry.demo.kubero.dev   45.79.240.209   80, 443   8d  <---- Optional
```

### Check if the DNS entry is correct

```bash
dig demo.kubero.dev +noall +question +answer
```

```bash title="Expected result"
; <<>> DiG 9.10.6 <<>> demo.kubero.dev +noall +question +answer
;; global options: +cmd
;demo.kubero.dev.		IN	A
demo.kubero.dev.	11574	IN	A	45.79.240.209
```

## 2. Kubero is not starting the apps

### Make sure the Kubero CRDs are installed

```bash
kubectl get customresourcedefinitions.apiextensions.k8s.io | grep kubero
```

```bash title="Expected result"
kuberoapps.application.kubero.dev                     2023-01-01T01:10:42Z
kuberocouchdbs.application.kubero.dev                 2023-01-01T01:10:43Z
kuberoelasticsearches.application.kubero.dev          2023-01-01T01:10:43Z
kuberoes.application.kubero.dev                       2023-01-01T01:10:43Z
kuberokafkas.application.kubero.dev                   2023-01-01T01:10:44Z
kuberomongodbs.application.kubero.dev                 2023-01-01T01:10:44Z
kuberomysqls.application.kubero.dev                   2023-01-01T01:10:44Z
kuberopipelines.application.kubero.dev                2023-01-01T01:10:45Z
kuberopostgresqls.application.kubero.dev              2023-01-01T01:10:45Z
kuberoredis.application.kubero.dev                    2023-01-01T01:10:45Z
```

### Check if the Kubero operator is running

```bash
kubectl get pods --all-namespaces | grep kubero-operator-controller-manager
```

```bash title="Expected result"
kubero-operator-system   kubero-operator-controller-manager-XXXXXXXX-yyyyyyy   2/2     Running     2 (19h ago)     9d
```

### Check the operators logs
The Namespace may be different on a OLM installation.

```bash
kubectl logs kubero-operator-controller-manager-XXXXXXXX-yyyyyyy -n kubero-operator-system -f
```

```bash title="Expected result"
{"level":"info","ts":1680789537.7990057,"logger":"helm.controller","msg":"Reconciled release","namespace":"tools-production","name":"cyberchef","apiVersion":"applicat^C{"level":"info","ts":1680789547.8039916,"logger":"helm.controller","msg":"Reconciled release","namespace":"kubero-demo","name":"demo","apiVersion":"application.kubero.dev/v1alpha1","kind":"KuberoPipeline","release":"demo"}
{"level":"info","ts":1680789549.4616005,"logger":"helm.controller","msg":"Reconciled release","namespace":"tools-production","name":"rsshub","apiVersion":"application.kubero.dev/v1alpha1","kind":"KuberoApp","release":"rsshub"}
```


## 3. You can't issue SSL Certs for your apps

### Make sure your domain is accessible for letsencrypt

```bash
curl --insecure https://myservice.example.com
```

### Check the SSL Cert Manager

Make sure all Certmanager components are running 
```bash
kubectl get pods -n cert-manager
```

```bash title="Expected result"
NAME                                      READY   STATUS      RESTARTS       AGE
cert-manager-99bb69456-x285b              1/1     Running     39 (39h ago)   171d
cert-manager-cainjector-ffb4747bb-cktsq   0/1     Completed   22             218d
cert-manager-cainjector-ffb4747bb-r8gbt   1/1     Running     43 (39h ago)   171d
cert-manager-webhook-545bd5d7d8-282n5     1/1     Running     0              171d
```
The logs of these pods may hint at what is going wrong.

### Search for your signing request

```bash
kubectl get certificaterequests.cert-manager.io --all-namespaces
```

```bash title="Expected result"
NAMESPACE                       NAME                        APPROVED   DENIED   READY   ISSUER             REQUESTOR                                         AGE
demo-production                 node-tls-525dn              True                True    letsencrypt-prod   system:serviceaccount:cert-manager:cert-manager   194d
demo-production                 node-tls-cmzh7              True                True    letsencrypt-prod   system:serviceaccount:cert-manager:cert-manager   74d
demo-production                 node-tls-h87n2              True                True    letsencrypt-prod   system:serviceaccount:cert-manager:cert-manager   134d
demo-production                 node-tls-qt5v9              True                True    letsencrypt-prod   system:serviceaccount:cert-manager:cert-manager   14d
```

### Check your cluster issuer

```
kubectl get clusterissuers.cert-manager.io
```

```bash title="Expected result"
NAME               READY   AGE
letsencrypt-prod   True    222d
```

```
kubectl get clusterissuers.cert-manager.io letsencrypt-prod -o yaml
```

```bash title="Expected result"
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
  resourceVersion: "1467"
  uid: 02bded44-f4f2-40e7-8c76-f66f0eaf0ca2
spec:
  acme:
    email: yourname@myservice.example.com
    preferredChain: ""
    privateKeySecretRef:
      name: letsencrypt
    server: https://acme-v02.api.letsencrypt.org/directory
    solvers:
    - http01:
        ingress:
          class: nginx
```


### Reset Admin password

Run this command to reset the admin password to `admin`:
```
kubectl exec -it kubero-XXXXXX -n kubero -- yarn cli:reset-admin
```