|
2 | 2 | title: Troubleshooting |
3 | 3 | sidebar_label: Troubleshooting |
4 | 4 | --- |
5 | | -import Tabs from '@theme/Tabs'; |
6 | | -import TabItem from '@theme/TabItem'; |
7 | 5 |
|
8 | | -This document outlines trouble shooting for various topics. |
| 6 | +This document outlines steps to troubleshoot issues that may arise after initial deployment of Onepanel. |
9 | 7 |
|
10 | | -## You deployed to a cloud provided cluster using CloudFlare as DNS provider. |
11 | 8 |
|
12 | | -Issue: |
13 | | -- You enter the URL into your browser and the page does not load. |
| 9 | +## General troubleshooting steps |
14 | 10 |
|
15 | | -### Debugging steps: |
| 11 | +Once you have setup DNS accordingly but the site isn't showing up or you can't login, double check that you have set up DNS correctly: |
16 | 12 |
|
17 | | -#### Make sure all the pods are running with no errors |
18 | | - |
19 | | -Execute: |
20 | | -```shell script |
21 | | -kubectl get pods -A |
| 13 | +```bash |
| 14 | +opctl app status |
22 | 15 | ``` |
23 | 16 |
|
24 | | -Check if all are running. If some are pending, wait for them to complete. |
25 | | -- If they take a long time, they may not be scheduling correctly. |
| 17 | +The command above will return a result similar to the following: |
26 | 18 |
|
27 | | -If some are showing an error, check the pod logs with `kubectl log` or check |
28 | | -the pod in more detail with `kubectl describe` |
| 19 | +``` |
| 20 | +Your deployment is ready. |
29 | 21 |
|
30 | | -#### Test to see if the DNS is setup correctly. |
| 22 | +In your DNS, add an A record for *.sub.example.com and point it to '52.225.33.112' |
| 23 | +Once complete, your application will be running at https://app.sub.example.com |
| 24 | +``` |
31 | 25 |
|
32 | | -We want to check that the domain is pointed to your IP. |
| 26 | +:::note |
| 27 | +Depending on your provider, the `opctl app status` may prompt you to set up a `CNAME` record. |
| 28 | +::: |
33 | 29 |
|
34 | | -Use `ping` shell command. |
| 30 | +If you see "Your deployment is ready", double check that your DNS record is correct, then ping the domain in the URL above to confirm it is ready: |
35 | 31 |
|
36 | | -```text |
37 | | -$ ping app.web-demo.onepanel.ai |
38 | | -PING app.web-demo.onepanel.ai (52.224.34.111) 56(84) bytes of data. |
| 32 | +```bash |
| 33 | +$ ping app.sub.example.com |
| 34 | +PING app.sub.example.com (52.225.33.112) 56(84) bytes of data. |
39 | 35 | ``` |
40 | | -- This is pointing to the right IP |
41 | 36 |
|
42 | | -#### Check your Cloudflare API Token Value |
| 37 | +If you see "Not all required pods are running. Your deployment is not ready.", run the following command: |
43 | 38 |
|
44 | | -If your token was typo'd when entered, that can cause an issue. |
| 39 | +```bash |
| 40 | +kubectl get pods -A |
| 41 | +``` |
45 | 42 |
|
46 | | -If the token has non-alphanumerical characters, surround the token with single quotes. |
| 43 | +For `Pending` pods, check the `Age`, if it has been less than 5 minutes, wait and check again. |
47 | 44 |
|
48 | | -Example: |
49 | | -```yaml |
50 | | -certManager: |
51 | | - # DNS Provider: Cloudflare |
52 | | - # Docs: https://onepanelio.github.io/core-docs/docs/deployment/configuration/tls#cloudflare |
53 | | - # CLI flag: --dns-provider=cloudflare |
54 | | - cloudflare: |
55 | | - apiToken: token123ab_c |
56 | | - email: |
57 | | -``` |
58 | | -Should be |
59 | | -```yaml |
60 | | -certManager: |
61 | | - # DNS Provider: Cloudflare |
62 | | - # Docs: https://onepanelio.github.io/core-docs/docs/deployment/configuration/tls#cloudflare |
63 | | - # CLI flag: --dns-provider=cloudflare |
64 | | - cloudflare: |
65 | | - apiToken: 'token123ab_c' |
66 | | - email: |
67 | | -``` |
| 45 | +If the pods are showing `Error` or have been in `Pending` state for more than 5 minutes, check the pod in more details by running `kubectl describe` for more details. You can also check the pod log by running `kubectl logs`. |
68 | 46 |
|
69 | | -Then run `optcl apply` again. |
| 47 | +In most cases, pods stuck in `Pending` state could mean that you need to add another node to your cluster. |
70 | 48 |
|
71 | | -#### Investigating kubernetes resources |
72 | 49 |
|
73 | | -You can use this as a resource: |
74 | | -- https://cert-manager.io/docs/faq/acme/ |
| 50 | +## Troubleshooting deployments with cert-manager |
| 51 | +Onepanel uses [cert-manager](https://cert-manager.io/) to automatically manages TLS certificates when you install Onepanel with the following flags: |
75 | 52 |
|
76 | | -But in short: |
77 | | -- Check the status of the following resources (namespace: istio-system) |
| 53 | +```bash |
| 54 | +opctl init ... --enable-cert-manager --dns-provider <provider> |
| 55 | +``` |
78 | 56 |
|
79 | | -certificate(s) |
80 | | -- kubectl get certificates -n istio-system |
81 | | -- kubectl describe certificate <resource_name> -n istio-system |
| 57 | +All cert-manager resources in Onepanel are installed in the `istio-system` namespace. |
82 | 58 |
|
83 | | -certificaterequest(s) |
| 59 | +If you have enabled cert-manager and your application after following [General troubleshooting steps](#general-troubleshooting-steps), then you're most likely running into certificate issues. |
84 | 60 |
|
85 | | -order(s) |
| 61 | +You can troubleshoot these issues by following the steps in [Troubleshooting Issuing ACME Certificates](https://cert-manager.io/docs/faq/acme/). Make sure to run all the commands in the `istio-system` namespace. For example to get the certificate that Onepanel uses: |
86 | 62 |
|
87 | | -challenge(s) |
| 63 | +```bash |
| 64 | +kubectl describe certificate cert-manager-wildcard-certificate -n istio-system |
| 65 | +``` |
88 | 66 |
|
89 | | -There is a good chance that one of these will describe what the issue is. |
| 67 | +## Still having issues? |
| 68 | +Join our [Slack community](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg) or open an issue in [GitHub](https://github.com/onepanelio/core/issues). |
0 commit comments