Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dualstack template #36

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Add dualstack template #36

merged 1 commit into from
Aug 8, 2024

Conversation

bschimke95
Copy link
Contributor

Adds a template to use for dualstack clusters.

The following steps where done to test with CAPD:

  1. Create a dualstack network
    sudo docker network create kind –ipv6 --driver=bridge -o com.docker.network.bridge.enable_ip_masquerade=true
    (note that docker will ALWAYS use IPv4) -> --ipv6 == dualstack
  2. Generate cluster yaml from templates/docker/cluster-template-dualstack.yaml
KIND_IMAGE=k8s-snap:dev CONTROL_PLANE_MACHINE_COUNT=3 WORKER_MACHINE_COUNT=3 clusterctl generate cluster c1 --from ./templates/docker/cluster-template-dualstack.yaml  --kubernetes-version v1.30.3 > c1.yaml
  1. Wait until all nodes/pods are up on workload cluster
  2. Deploy nginx-dualstack.yaml on the cluster
    k8s kubectl apply -f https://raw.githubusercontent.com/canonical/k8s-snap/main/tests/integration/templates/nginx-dualstack.yaml
  3. Get IPv6 of service:
root@c1-control-plane-x2mk9:/# k8s kubectl describe svc nginx-dualstack | grep IPs
IPs:                      10.152.98.81,fd01::506a
  1. Try to curl nginx endpoint
root@c1-control-plane-x2mk9:/# curl http://\[fd01::506a\]/
<!DOCTYPE html>
<html>
<head>
<title>Kubernetes IPv6 nginx</title> 
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx on <span style="color:  #C70039">IPv6</span> Kubernetes!</h1>
<p>Pod: nginxdualstack-77676679b6-7rpmt</p>
</body>
</html>


@bschimke95 bschimke95 requested a review from a team as a code owner August 2, 2024 11:17
Copy link
Member

@mateoflorido mateoflorido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is this something we would like to include in the testing suite?

@bschimke95
Copy link
Contributor Author

I don't this this provides much value. We already have a test for dualstack on the k8s-snap.

@bschimke95 bschimke95 merged commit c7befd2 into main Aug 8, 2024
3 of 7 checks passed
@mateoflorido mateoflorido deleted the KU-1149/dualstack branch August 8, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants