# Getting Started

This section will help you setup the environment with k8s-project-template from ground up.

# Prerequisite

[optional]

  • for unified IDE support without installing any programming language tools in the local environment, need
    • [Visual Studio Code][vscode] to be [installed][install vscode]
    • [Visual Studio Code Extension: Remote - Containers][vscode remote container] to be installed

# Quick Start

# 1. Clone this Repository

Clone this repository as your own repository or a submodule of your monolithic repository.

git clone https://github.com/lisy09/k8s-project-template
1

# 2. Build all necessary artifacts before running other commands

make all
1

# 3. Start a local k8s cluster with kind

make local-k8s
1

(Optional) remove local cluster finally

make local-k8s-undeploy
1

# 4. Deploy k8s workload

make deploy
1

# 5. Check the monitoring dash board

Open the browser with http://monitoring.observe.local (opens new window)

# Other Quick Entrypoints

# Docs

Preview the html docs:

make docs-preview
1

Then open http://localhost:8081 (opens new window).

You can build the ./docs/ from ./dev-docs/docs_src using:

make docs
1

# Local K8S Cluster

Deploy local k8s cluster using kind:

make local-k8s
1

Undeploy:

make local-k8s-undeploy
1

# CI/CD

Deploy CI/CD backend in cicd namespace of current k8s cluster:

make cicd
1

Undeploy:

make cicd-undeploy
1

After deploy, you can check Argo Server Web UI.

For local k8s cluster, check it from http://argo.cicd.localhost (opens new window).

WARNING

If you are deploying the cicd in local k8s cluster, you will need to be able to resolve DNS for *.localhost. You can check ./local-k8s-cluster/scripts/override_dns.sh as a tip.