Skip to content

feat(network): add support for Cilium WireGuard Strict Mode (Zero-Trust)#12869

Open
aveljkovic wants to merge 1 commit intokubernetes-sigs:masterfrom
aveljkovic:feature/cilium-strict-mode
Open

feat(network): add support for Cilium WireGuard Strict Mode (Zero-Trust)#12869
aveljkovic wants to merge 1 commit intokubernetes-sigs:masterfrom
aveljkovic:feature/cilium-strict-mode

Conversation

@aveljkovic
Copy link

Description
This PR implements first-class support for Cilium WireGuard Strict Mode, enabling transparent "Zero-Trust" networking. When enabled, this feature encrypts ALL traffic (pod-to-pod and node-to-node) at the kernel level using WireGuard, blocking any unencrypted traffic.

This addresses the need for high-security, compliant cluster deployments directly via Kubespray inventory variables.

Changes

  • Defaults (roles/network_plugin/cilium/defaults/main.yml): Added cilium_encryption_strict_mode (default: false) to ensure backward compatibility.
  • Templates (templates/values.yaml.j2): Updated logic to automatically configure encryption.strictMode and encryption.nodeEncryption when the variable is enabled.
  • Scripts: Added roles/network_plugin/cilium/files/verify-encryption.sh, a helper script to audit the encryption status post-deployment.
  • Documentation: Updated docs/CNI/cilium.md with a guide on enabling Strict Mode and verifying zero-trust status.

How to Test

  1. Enable the feature in your inventory:
    cilium_encryption_strict_mode: true
  2. Deploy the cluster.
  3. Run the included verification script:
    ./roles/network_plugin/cilium/files/verify-encryption.sh
  4. Manual Verification:
    Exec into a Cilium pod and check for the WireGuard interface:
    kubectl -n kube-system exec ds/cilium -- cilium status | grep Encryption
    # Output should show: Encryption: WireGuard (Strict Mode)

Checklist

  • Ansible playbooks successfully run.
  • Feature is disabled by default (Backward Compatible).
  • Documentation updated.
  • Validation checks added for Kernel requirements.

Related Issue
(None)

Signed-off-by: Aleksandar Veljkovic <veljkovic.tech@gmail.com>
@k8s-ci-robot
Copy link
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Jan 14, 2026
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 14, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: aveljkovic / name: Aleksandar Veljković (452a9b0)

@k8s-ci-robot
Copy link
Contributor

Welcome @aveljkovic!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubespray has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 14, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aveljkovic
Once this PR has been reviewed and has the lgtm label, please assign vannten for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Hi @aveljkovic. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 14, 2026
@aveljkovic
Copy link
Author

@VannTen @mzaian Just wanted to check in and see if there are any updates or additional feedback on my PR. Let me know if there’s anything I can do to help move this forward. Thanks!

@bbaassssiiee
Copy link
Contributor

Why adding all this code for three vars?

cilium_encryption_enabled: true
cilium_encryption_type: "wireguard"
cilium_encryption_node_encryption: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants