Coder Social home page Coder Social logo

k8s-go-tool-example's Introduction

PRs Welcome Contributors Forks Stargazers Issues MIT License


delineate.io

delineate.io

portray or describe (something) precisely.

k8s Go Tooling Example

Demonstrates a combination of k8s related tools for efficient build, test and deployment of Go microservices.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

This repo demonstrates a combination of k8s related tools that when used in combination provide an efficient build, test and deployment pipeline for developing Go microservices.

  • Using ko to create distroless images from go source code
  • Using kustomize to dyanmically transform k8s manifests before deployment
  • Using skaffold to manage a build, test and deploy opinionated pipeline

In addition to this DevContainer has been used to package the local development environment.

What's been built

Two "unique" services have been containerised that run in the background with no API, one is English and one is Spainish 🇬🇧🇪🇸, and print hello to the stdout.

logs

In addition to these two services, they have been packaged in a pod with a k8s echo server container. When running, the echo server can be accessed using http :8080 either from the host of from within the dev container.

Built With

Syntax Description
pre-commit Pre-commit git hooks that perform checks before pushes
GitHub Source control management platform
Go Writing of the example containerised services
Docker Used to providr the devcontainer
Kubernetes Provide the hosting of the containerised applications

Local Setup

Dev Container

The local development environment is provided using devcontainer which is natively supported in VSCode as described here. This has been used to show how this approach signficantly reduces local requirements.

Kubernetes

This examples repo relies on having access to a running local or remote k8s cluster, correctly setup and accessible with kubectl using kubectl cluster-info.

As part of the development container provisioning the [kube-config](.devcontainer/.kube-config.sh) script replicates the hosts $HOME/.kube/config` within the container.

This particular implementation has only been tested using minikube configured to use the VMWare driver.

Usage

Inside the container using the VSCode integrated terminal the following commands can be used...

# builds, deploys (1 pod) and watches for changes
task single:dev

#  alternatively, this builds and deploys once
task single:run

# cleans up the cluster
task cleanup

# builds, deploys a scaled example (3 pods)
task scaled:dev

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

If you would like to contribute to any delineate.io OSS projects please read:

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

k8s-go-tool-example's People

Contributors

jf-delineate avatar pre-commit-ci[bot] avatar

Watchers

 avatar

k8s-go-tool-example's Issues

Security Policy violation SECURITY.md

This issue was automatically created by Allstar.

Security Policy Violation
Security policy not enabled.
A SECURITY.md file can give users information about what constitutes a vulnerability and how to report one securely so that information about a bug is not publicly visible. Examples of secure reporting methods include using an issue tracker with private issue support, or encrypted email with a published key.

To fix this, add a SECURITY.md file that explains how to handle vulnerabilities found in your repository. Go to https://github.com/delineateio/k8s-go-tool-example/security/policy to enable.

For more information, see https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository.


This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.