packaged by Chainguard
Catalog Starter gives your team 5 production-grade container images, free forever, with no contract or sales call. Sign up with your work email.
Try Starter for freeChainguard Harness uses frontier models from Anthropic, OpenAI, and Google to attack a copy of your app built on klipper-lb. It finds exploitable, validated issues that SAST and DAST tools aren't built to find.
Embedded service load balancer in Klipper
Chainguard Containers are regularly-updated, secure-by-default container images.
For those with access, this container image is available on cgr.dev:
Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.
Chainguard's klipper-lb image is comparable to the upstream rancher/klipper-lb image. It ships the upstream entry shell script at /usr/bin/entry along with the iptables, ip6tables, and nftables toolchains (both the nft and legacy xtables backends). The kmod package is included so that entry can use lsmod to detect whether the host uses the nft or legacy iptables backend.
The image runs as root by default because it programs iptables and nftables NAT rules. The container also needs the NET_ADMIN capability.
klipper-lb forwards traffic arriving on a port to one or more destination IPs using iptables DNAT and MASQUERADE rules.
You can run the image directly with Docker to forward a port to a destination IP:
To use the image as a service load balancer in K3s, first disable the built-in ServiceLB. A K3s server allows the net.ipv4.ip_forward and net.ipv6.conf.all.forwarding sysctls on its kubelet only while ServiceLB is enabled, and neither is a Kubernetes safe sysctl. Once ServiceLB is disabled, the server's kubelet rejects the load balancer pods with SysctlForbidden unless you allow those sysctls explicitly.
Edit /etc/rancher/k3s/config.yaml on each server node so that it contains the following keys. If the file already has a disable or kubelet-arg list, add these entries to the existing list rather than declaring the key a second time:
Agent nodes keep allowing these sysctls by default, so only servers need the kubelet-arg entry. The disable key applies to servers only.
Restart K3s on each server with systemctl restart k3s to apply the change.
Next, deploy a klipper-lb DaemonSet for a Service. The following example assumes a ClusterIP Service named web that listens on port 8080. It mirrors the DaemonSet that K3s generates: the pod enables the net.ipv4.ip_forward sysctl, the container adds the NET_ADMIN capability, DEST_IPS points at the Service cluster IP, and a hostPort exposes the listening port on every node:
Requests to port 80 on any node are then forwarded to the web Service.
The entry script reads these environment variables:
SRC_PORT: the port to listen on.DEST_PROTO: the protocol to forward, either tcp or udp.DEST_PORT: the destination port.DEST_IPS: a comma-separated list of destination IPv4 or IPv6 addresses.SRC_RANGES: a comma-separated list of source CIDR ranges allowed to connect.The image declares no exposed ports or volumes.
klipper-lb is licensed under the Apache License 2.0.
Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.
All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.
The main features of Chainguard Containers include:
For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.
In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.
Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.
To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.
To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.
Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.
This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.
Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:
Apache-2.0
BSD-2-Clause
BSD-3-Clause
GCC-exception-3.1
GPL-2.0-only
GPL-2.0-or-later
GPL-3.0-or-later
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreementChainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.
SLSA compliance at ChainguardThis image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.
PCI DSS at ChainguardA FIPS validated version of this image is available for FedRAMP compliance. STIG is included with FIPS image.