Skip to content

Commit

Permalink
Add a troubleshooting docs page (#305)
Browse files Browse the repository at this point in the history
* add troubleshooting explanation
  • Loading branch information
kwmonroe authored Apr 12, 2024
1 parent 7db47a7 commit 27e3606
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 6 deletions.
9 changes: 4 additions & 5 deletions docs/src/howto/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ install/index
networking/index
/howto/storage
/howto/contribute
/howto/support
```

---

## Other documentation types

Our Reference section is for when you need to check specific details or
information such as the command reference or release notes.

Alternatively, the [Tutorials section] contains step-by-step tutorials to help
guide you through exploring and using Canonical Kubernetes.
If you are just getting started, the [Tutorials section] contains
step-by-step tutorials to help guide you through exploring and using
Canonical Kubernetes.

For a better understanding of how Canonical Kubernetes works and related topics
such as security, our [Explanation section] helps you expand your knowledge
Expand Down
13 changes: 12 additions & 1 deletion docs/src/howto/support.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# Get support
# How to get support

Support for Canonical Kubernetes is available in a variety of ways:

- Engagement with the [Canonical Kubernetes Community]
- Understanding common [Troubleshooting Techniques]
- Professional support services with [Ubuntu Support]

<!--LINKS -->
[Canonical Kubernetes Community]: ../reference/community
[Troubleshooting Techniques]: ../reference/troubleshooting
[Ubuntu Support]: https://ubuntu.com/support
1 change: 1 addition & 0 deletions docs/src/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Overview <self>
/reference/community
/reference/architecture
/reference/roadmap
/reference/troubleshooting
```

## Other documentation types
Expand Down
37 changes: 37 additions & 0 deletions docs/src/reference/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Troubleshooting

This page provides techniques for troubleshooting common Canonical Kubernetes
issues.

## Kubectl error: "dial tcp 127.0.0.1:6443: connect: connection refused"

### Problem

The [kubeconfig file] generated by the `k8s kubectl` CLI can not be used to
access the cluster from an external machine. The following error is seen when
running `kubectl` with the invalid kubeconfig:

```bash
...
E0412 08:36:06.404499 517166 memcache.go:265] couldn't get current server API group list: Get "https://127.0.0.1:6443/api?timeout=32s": dial tcp 127.0.0.1:6443: connect: connection refused
The connection to the server 127.0.0.1:6443 was refused - did you specify the right host or port?
```
### Explanation
A common technique for viewing a cluster kubeconfig file is by using the
`kubectl config view` command.
The `k8s kubectl` command invokes an integrated `kubectl` client. Thus
`k8s kubectl config view` will output a seemingly valid kubeconfig file.
However, this will only be valid on cluster nodes where control plane services
are available on localhost endpoints.
### Solution
Use `k8s config` instead of `k8s kubectl config` to generate a kubeconfig file
that is valid for use on external machines.
<!-- LINKS -->
[kubeconfig file]: https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/

0 comments on commit 27e3606

Please sign in to comment.