---
title: "Calico integration with WireGuard using kOps"
source: "https://wordpress-1075849-4005834.cloudwaysapps.com/blog/calico-integration-with-wireguard-using-kops/"
---

[Technical Blog](https://wordpress-1075849-4005834.cloudwaysapps.com/category/technical-blog/)

# Calico integration with WireGuard using kOps

By [Reza Ramezanpour](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/author/rezar/) on Aug 31, 2021 • 5 min read

It has been a while since I have been excited to write about encrypted tunnels. It might be the sheer pain of troubleshooting old technologies, or countless hours of falling down the rabbit hole of a project’s source code, that always motivated me to pursue a better alternative (without much luck). However, I believe luck is finally on my side.

In this blog post we will explore using open-source [WireGuard](http://www.wireguard.com/), a new technology that offers encrypted tunnels with remarkable performance and an effortless implementation, to establish secure encrypted tunnels between workloads in K8s clusters.

## Introduction: WireGuard

With the release of open-source Calico 3.14 back in June of 2020, Tigera announced a tech preview of its [WireGuard integration](https://www.projectcalico.org/introducing-wireguard-encryption-with-calico/), which allows node-to-node traffic to be encrypted using WireGuard.

Other encryption methods (e.g. [TLS](http://www.cloudflare.com/en-ca/learning/ssl/transport-layer-security-tls/)) were available to encrypt workloads’ traffic at higher TCP/IP layers (in this case, the Application Layer). However, WireGuard targets traffic at a lower layer (the Transport Layer), which makes it effective for a wider range of applications, and also reduces complexity for the user.

WireGuard is an open-source project that implements virtual private network (VPN) techniques to establish secure point-to-point connections leveraging Linux kernel capabilities. It aims to be faster, simpler, and leaner than previous technologies. With only around 4,000 lines of code, WireGuard source code is also easier to audit.

WireGuard is designed to be extended by third-party programmers and scripts, which makes the project more valuable to the community. In terms of logging and dynamic firewall updates, this can be a great factor for its adoption.

However, our focus will be on kOps’s [new release](http://kops.sigs.k8s.io/releases/1.19-notes/), which enables easy implementation of Calico and WireGuard in self-managed K8s clusters.

Let’s start by exploring some performance metrics.

## Performance

Before we dive into numbers, it is worth mentioning that benchmark results are heavily influenced by the test environment. For this test, we used a K8s cluster with 3 nodes using t3.medium ec2 instances from AWS, with 5Gbps burstable network bandwidth. (You can view t3 tier details at [this link](http://aws.amazon.com/ec2/instance-types/t3/).)

WireGuard’s remarkable performance in comparison to older technologies is one of the main reasons behind its integration into Calico. Combined with Calico’s eBPF data plane, WireGuard was able to utilize (on average) 73% of the 5Gbps bandwidth link in order to send encrypted traffic to another node.

The following figure showing network throughput shows the Calico eBPF data plane with different settings.

![Bar chart showing Calico eBPF data plane network throughput with WireGuard, IPsec, and no encryption](https://wordpress-1075849-4005834.cloudwaysapps.com/app/uploads/2021/08/network-throughput-ebpf-wireguard.png)Network throughput (higher is better)

In cryptography, encryption and decryption are the essential building blocks of secure communication. Due to the resource-intensive nature of these procedures, there can be a huge toll on the amount of available resources in a busy cluster. WireGuard was written with a modern approach to cryptography in order to deliver better performance and a softer grip on resources, resulting in more data throughput at higher speed.

The following figure shows an estimate of how much vCPU would be required in order to transmit 10Gbps of data in each scenario.

![Bar chart: vCPU requirements to transmit 10Gbps of data using Calico eBPF, Wireguard, and IPsec in pod-to-pod and](https://wordpress-1075849-4005834.cloudwaysapps.com/app/uploads/2021/08/total-vCPU-ebpf-wireguard.png)Total vCPU per 10Gbps (lower is better)

It is worth noting that the performance test was conducted without any tuning, and there are various ways to boost these figures depending on the environment.

## Demo

### Before we begin

This blog post assumes that you have a running, self-managed K8s cluster named “demo.k8s.local” deployed with kOps version 1.19.1 or higher. If you would like to know more about how to deploy such a cluster, see [this article](http://thenewstack.io/kops-adds-support-for-calicos-ebpf-dataplane/).

### WireGuard preparation

***Note: If you are using a different kOps cluster name, please replace the name (demo.k8s.local) with your cluster’s name before executing these commands.***

Execute the following command to launch the editor:

```
kops edit cluster demo.k8s.local
```

Add the following line under the Calico parameters in the networking section:

```
wireguardEnabled: true
```

Configuration should look similar to this:

```
networking:
calico:
awsSrcDstCheck: Disable
bpfEnabled: true
bpfExternalServiceMode: DSR
encapsulationMode: vxlan
wireguardEnabled: true
```

Save the configuration and exit the editor.

### Updating the cluster

kOps uses a `state store` approach in order to save cluster configurations. From the moment a self-managed cluster is created, all configurations and manifests are stored in a specific location (AWS S3 bucket in this instance). It is worth noting that kOps requires you to apply configuration in order to create or make changes.

Apply the configuration change by executing this command:

```
kops update cluster demo.k8s.local --yes
```

That’s it, node-to-node traffic is now encrypted.

### Verify

In order to run WireGuard, Calico injects a `WireguardPublicKey` into the node manifest; this public key is then used by WireGuard to establish secure tunnels.

It is possible to query this value in order to determine if WireGuard is successfully configured in your cluster.

To do so, execute the following command:

```
kubectl get nodes -o yaml | grep -i WireguardPublicKey
```

You should see a result similar to:

```
projectcalico.org/WireguardPublicKey: 5p8afGSOO6y3h+ztrmJe2gzyvh414YVL+WwD/JvKi3k=
f:projectcalico.org/WireguardPublicKey: {}
projectcalico.org/WireguardPublicKey: p3cyWzMurgMB86usdvGh9mVUFMrU+DErt4eYTHoIaz8=
f:projectcalico.org/WireguardPublicKey: {}
projectcalico.org/WireguardPublicKey: OppRgoRrLo8QJOULrR3gVPGEqFuU7vNPNMKEaxhbS0Q=
f:projectcalico.org/WireguardPublicKey: {}
```

## Conclusion

As we have established in this blog post, Calico offers an effortless way to set up secure communication in a K8s cluster, using open-source WireGuard. This latest kOps release provides an effortless install path, while providing an incredibly powerful and compelling feature for your K8s cluster: networking that is lightweight, low maintenance, highly performant, and secure.

 

***Did you know you can become a certified Calico operator? Learn Kubernetes networking and security fundamentals using Calico in this [free, self-paced certification course](https://academy.tigera.io/course/certified-calico-operator-level-1/).***

 

### If you enjoyed this blog then you might also like:

- Calico community meeting: [Demonstration of WireGuard encryption](http://youtu.be/Ejfk9P6lvEw?t=1320)

- In-cluster encryption [documentation](http://docs.projectcalico.org/security/encrypt-cluster-pod-traffic)

- [Getting started with Calico network policy](http://docs.projectcalico.org/security/calico-network-policy)

- Free, online [webinars, workshops, and resources](https://wordpress-1075849-4005834.cloudwaysapps.com/free-training-resources)

- Learn about [Calico Cloud](https://wordpress-1075849-4005834.cloudwaysapps.com/tigera-products/calico-commercial-editions/)

- WireGuard [technical whitepaper](http://www.wireguard.com/papers/wireguard.pdf)

[eBPF](https://wordpress-1075849-4005834.cloudwaysapps.com/tags/ebpf/)[How-To](https://wordpress-1075849-4005834.cloudwaysapps.com/tags/how-to/)[Open Source](https://wordpress-1075849-4005834.cloudwaysapps.com/tags/open-source/)[Project Calico](https://wordpress-1075849-4005834.cloudwaysapps.com/tags/project-calico/)

Add Tigera as a preferred source on Google to see more of our content in your search results.

[![Add as a preferred source on Google](https://wordpress-1075849-4005834.cloudwaysapps.com/app/themes/tigera2021/dist/img/google-preferred-source-light.png)](https://www.google.com/preferences/source?q=tigera.io)

## Related posts

[![AI Assistant for Calico: Troubleshooting at the Speed of Thought](https://wordpress-1075849-4005834.cloudwaysapps.com/app/uploads/2026/03/Blog-Mar-20-AI-Assistant-for-Calico.png)](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/ai-assistant-for-calico-troubleshooting-at-the-speed-of-thought/)

#### [AI Assistant for Calico: Troubleshooting at the Speed of Thought](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/ai-assistant-for-calico-troubleshooting-at-the-speed-of-thought/)

By [Veronika Smolik](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/author/veronika-smolik/)
on Mar 19, 2026

Despite the wealth of data available, distilling a coherent narrative from a Kubernetes cluster remains a challenge for modern infrastructure teams. Even with powerful visualization tools like the Policy Board, Service Graph, and specialized dashboards,...

[Read more](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/ai-assistant-for-calico-troubleshooting-at-the-speed-of-thought/)

[![What Your EKS Flow Logs Aren’t Telling You](https://wordpress-1075849-4005834.cloudwaysapps.com/app/uploads/2026/03/Blog-Mar-18-What-Your-EKS-Flow-Logs-Arent-Telling-You.png)](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/what-your-eks-flow-logs-arent-telling-you/)

#### [What Your EKS Flow Logs Aren’t Telling You](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/what-your-eks-flow-logs-arent-telling-you/)

By [Phil DiCorpo](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/author/phil-dicorpo/)
on Mar 18, 2026

If you’re running workloads on Amazon EKS, there’s a good chance you already have some form of network observability in place. VPC Flow Logs have been a staple of AWS networking for years, and AWS...

[Read more](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/what-your-eks-flow-logs-arent-telling-you/)

[![What’s New in Calico: Winter 2026 Release](https://wordpress-1075849-4005834.cloudwaysapps.com/app/uploads/2026/03/What-is-new-in-Calico-winter-2026.png)](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/whats-new-in-calico-winter-2026-release/)

[Company Blog](https://wordpress-1075849-4005834.cloudwaysapps.com/category/company-blog/)

#### [What’s New in Calico: Winter 2026 Release](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/whats-new-in-calico-winter-2026-release/)

By [Veronika Smolik](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/author/veronika-smolik/)
on Mar 4, 2026

AI Powered Intelligence, Unified Traffic Observability and Scalable Infrastructure Management As anyone managing one or more Kubernetes clusters knows by now, scaling can introduce an exponentially growing number of problems. The sheer volume of metrics,...

[Read more](https://wordpress-1075849-4005834.cloudwaysapps.com/blog/whats-new-in-calico-winter-2026-release/)

<!-- plugin=object-cache-pro client=phpredis metric#hits=6203 metric#misses=17 metric#hit-ratio=99.7 metric#bytes=2194980 metric#prefetches=0 metric#store-reads=420 metric#store-writes=13 metric#store-hits=435 metric#store-misses=6 metric#sql-queries=31 metric#ms-total=2124.34 metric#ms-cache=190.16 metric#ms-cache-avg=0.4402 metric#ms-cache-ratio=9.0 -->
