Skip to content

Commit

Permalink
docs review
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Jan 14, 2025
1 parent 81650b7 commit a94bc23
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 34 deletions.
4 changes: 2 additions & 2 deletions docs/src/snap/howto/networking/default-dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ desired values for your DNS configuration.
{{product}} also allows you to disable the built-in DNS,
if you desire a custom solution:

``` {warning} Disabling DNS will disrupt internal cluster communication. Ensure
```{warning} Disabling DNS will disrupt internal cluster communication. Ensure
a suitable custom DNS solution is in place before disabling. You can re-enable
DNS at any point, and your cluster will return to normal functionality.```
DNS at any point, and your cluster will return to normal functionality.
```

```
Expand Down
15 changes: 8 additions & 7 deletions docs/src/snap/howto/networking/default-ingress.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# How to use default Ingress

{{product}} allows you to configure Ingress into your cluster. When
enabled, it tells your cluster how external HTTP and HTTPS traffic should be
routed to its services.
{{product}} enables you to configure Ingress for your cluster. When enabled, it
directs external HTTP and HTTPS traffic to the appropriate services within the
cluster.

## Prerequisites

Expand Down Expand Up @@ -50,7 +50,8 @@ You should see three options:
- `default-tls-secret`: Name of the TLS (Transport Layer Security) Secret in
the kube-system namespace that will be used as the default Ingress
certificate
- `enable-proxy-protocol`: If set, proxy protocol will be enabled for the Ingress
- `enable-proxy-protocol`: If set, proxy protocol will be enabled for the
Ingress

### TLS Secret

Expand Down Expand Up @@ -88,9 +89,9 @@ requirements.

You can `disable` the built-in ingress:

``` {warning} Disabling Ingress may impact external access to services within
your cluster.
Ensure that you have alternative configurations in place before disabling Ingress.
```{warning}
Disabling Ingress may impact external access to services within your cluster.
Ensure that you have alternative configurations in place before disabling Ingress.
```

```
Expand Down
18 changes: 12 additions & 6 deletions docs/src/snap/howto/networking/default-loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This guide assumes the following:

## Check the status and configuration

Find out whether DNS is enabled or disabled with the following command:
Find out whether load-balancer is enabled or disabled with the following
command:

```
sudo k8s status
Expand All @@ -31,9 +32,9 @@ sudo k8s get load-balancer

This should output a list of values like this:


- `cidrs` - a list containing [CIDR] or IP address range definitions of the
pool of IP addresses to use
- `enabled`: if set to true, load-balancer is enabled
- `cidrs` - a list containing [CIDR] or IP address ranges for the
load-balancer's address pool
- `l2-mode` - whether L2 mode (failover) is turned on
- `l2-interfaces` - optional list of interfaces to announce services over
(defaults to all)
Expand All @@ -43,7 +44,7 @@ This should output a list of values like this:
- `bgp-peer-asn` - ASN of the peer network
- `bgp-peer-port` - port used on the BGP peer

These values are configured using the `k8s set`command, e.g.:
These values are configured using the `k8s set` command, e.g.:

```
sudo k8s set load-balancer.l2-mode=true
Expand All @@ -53,7 +54,7 @@ Note that for the BGP mode, it is necessary to set ***all*** the values
simultaneously. E.g.

```
sudo k8s set load-balancer.bgp-mode=true load-balancer.bgp-local-asn=64512 load-balancer.bgp-peer-address=10.0.10.55/32 load-balancer.bgp-peer-asn=64512 load-balancer.bgp-peer-port=7012
sudo k8s set load-balancer.bgp-mode=true load-balancer.bgp-local-asn=64512 load-balancer.bgp-peer-address=10.0.10.63 load-balancer.bgp-peer-asn=64512 load-balancer.bgp-peer-port=7012
```

## Enable the load-balancer
Expand All @@ -70,6 +71,11 @@ You can now confirm it is working by running:
sudo k8s status
```

```{important}
If you run `k8s status` soon after enabling the load-balancer in BGP mode,
`k8s status` might report errors. Please wait a few moments for the load-balancer to finish deploying and try again.
```

## Disable the load-balancer

The default load-balancer can be disabled again with:
Expand Down
8 changes: 4 additions & 4 deletions docs/src/snap/howto/networking/default-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ sudo k8s enable network
For more information on the command, execute:

```
sudo k8s enable network --help
sudo k8s enable --help
```

## Configure Network

It is not possible to reconfigure the network on a running cluster as this will
lead to unreachable pods/services and nodes. Any configuration options the CNI
needs to be aware of (e.g. pod and service CIDR, IPv6 support) are set during
the cluster bootstrap (k8s bootstrap command).
the cluster bootstrap (`k8s bootstrap` command).

### Check Network details

Expand Down Expand Up @@ -76,7 +76,7 @@ You can `disable` the built-in network:
disabling Network.
```

If your underlying network is cilium you will have to run
If your underlying network is Cilium you will have to run
`sudo k8s disable gateway` before disabling network.

```
Expand All @@ -86,7 +86,7 @@ sudo k8s disable network
For more information on this command, run:

```
sudo k8s disable network --help
sudo k8s disable --help
```

<!-- LINKS -->
Expand Down
26 changes: 11 additions & 15 deletions docs/src/snap/howto/networking/dualstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ cluster bootstrap process. The key configuration parameters are:
sudo k8s bootstrap --timeout 10m --interactive
```

When asked `Which features would you like to enable?`, press Enter to enable
the default components.

When prompted, set the Pod CIDR and Service CIDR:

```
Expand Down Expand Up @@ -59,39 +62,32 @@ cluster bootstrap process. The key configuration parameters are:
```

To test that the cluster is configured with dual-stack, apply the following
manifest that creates a service with `ipFamilyPolicy: RequireDualStack`.
It also creates an nginx deployment sample workload.
manifest that creates a service with `ipFamilyPolicy: RequireDualStack`.
It also creates an nginx deployment sample workload.

```
sudo k8s kubectl apply -f https://raw.githubusercontent.com/canonical/k8s-snap/main/docs/src/assets/how-to-dualstack-manifest.yaml
```
```

1. **Check IPv6 Connectivity**

Retrieve the service details and ensure that an IPv6 address is assigned:

```sh
sudo k8s kubectl get service -A
sudo k8s kubectl describe service nginx-dualstack
```

The output should be similar to:
The output should contain a line like:

```
root@k8s-dualstack:/k8s-snap# sudo k8s kubectl get svc -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.152.183.1 <none> 443/TCP 4m12s
default nginx6 NodePort fd98::7534 <none> 80:32748/TCP 8s
kube-system ck-storage-rawfile-csi-controller ClusterIP None <none> <none> 4m11s
kube-system ck-storage-rawfile-csi-node ClusterIP 10.152.183.172 <none> 9100/TCP 4m11s
kube-system coredns ClusterIP 10.152.183.69 <none> 53/UDP,53/TCP 4m12s
kube-system hubble-peer ClusterIP 10.152.183.217 <none> 443/TCP 4m11s
kube-system metrics-server ClusterIP 10.152.183.108 <none> 443/TCP 4m11s
IPs: 10.152.183.170,fd98::6f88
```

Test the connectivity to the deployed application using the IPv6 address
from the retrieved output:

```sh
curl http://[fd98::7534]/
curl http://[fd98::6f88]/
```

You should see a response from the Nginx server, confirming that IPv6 is
Expand Down

0 comments on commit a94bc23

Please sign in to comment.