Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/kong/kubernetes-testing-framework

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/kong/kubernetes-testing-framework

  • v0.47.2
  • Source
  • Go
  • Socket score

Version published
Created
Source

ktf-banner

tests codecov Go Report Card GoDoc License

Kong Kubernetes Testing Framework (KTF)

Testing framework used by the Kong Kubernetes Team.

Originally this testing framework was developed for the Kong Kubernetes Ingress Controller (KIC) but is now used across multiple Kubernetes projects.

This testing framework supports the following use cases:

  • provide Kubernetes testing environments pre-deployed with addons for manual and automated testing via CLI or Golang
  • provide unit testing utilities for Golang tests which focus on Kubernetes
  • provide integration testing utilities for Golang tests which test Kubernetes controllers and other applications

Requirements

  • Go v1.19.x+
  • Linux (Mac/Windows not currently supported)

Usage

This framework can be used via command-line interface or as a Golang library.

Command Line Tool

This project provides a command-line tool named ktf which can be used to build Kubernetes testing environments.

Install

If you have Golang installed locally you can install with go:

$ go install github.com/kong/kubernetes-testing-framework/cmd/ktf@latest

Otherwise you can use the shell script to install the latest release for your operating system:

$ curl --proto '=https' -sSf https://kong.github.io/kubernetes-testing-framework/install.sh | sh

If neither of these options suits you then you can install manually by navigating to the RELEASES page and downloading the binary for your platform directly.

Provisioning Kubernetes Testing Environments

You can deploy a testing environment with the following command:

$ ktf environments create --generate-name

Testing environments can be deleted with this command:

$ ktf environments delete --name <NAME>
Examples

Commonly this tool is used to deploy a Kubernetes environment with addons such as the Kong Gateway.

You can deploy a cluster with the Kong Gateway already deployed and accessible via LoadBalancer services by running the following:

$ ktf environments create --name kong-gateway-testing --addon metallb --addon kong

Once the cluster is up configure your kubectl to use it:

$ kubectl cluster-info --context kind-kong-gateway-testing

You can see the IP addresses where you can reach the Gateway and the Admin API with:

$ kubectl -n kong-system get services

Contributing

See CONTRIBUTING.md.

Community

If you have any questions about this tool and want to get in touch with the maintainers, check in on #kong in Kubernetes Slack.

FAQs

Package last updated on 19 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc