Skip to content

Commit 227edae

Browse files
committed
added section for SpinKube support policy
Signed-off-by: macolso <[email protected]>
1 parent 096ef07 commit 227edae

File tree

1 file changed

+198
-0
lines changed

1 file changed

+198
-0
lines changed
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
title: Troubleshooting
3+
description: How to troubleshoot Spin Operator
4+
categories: [Spin Operator]
5+
tags: [Troubleshooting]
6+
weight: 100
7+
---
8+
9+
The following is a list of common error messages and potential troubleshooting suggestions that might assist you with your work.
10+
11+
## SpinKube Support Policy
12+
13+
SpinKube provides support on best effort basis. Please file an issue under the appropriate sub-project repository([Spin Operator](https://github.com/spinkube/spin-operator/issues/new), [`spin kube` plugin](https://github.com/spinkube/spin-plugin-kube/issues/new), [Runtime Class Manager](https://github.com/spinkube/runtime-class-manager/issues/new), [Containerd Spin Shim](https://github.com/spinkube/containerd-shim-spin/issues/new)) and if urgent, amplify in [Slack](https://cloud-native.slack.com/archives/C06PC7JA1EE).
14+
15+
16+
## No endpoints available for service "spin-operator-webhook-service"
17+
18+
When following the quickstart guide the following error can occur when running the `kubectl apply -f https://github.com/spinkube/spin-operator/releases/download/v0.1.0/spin-operator.shim-executor.yaml` command:
19+
20+
```console
21+
Error from server (InternalError): error when creating "https://github.com/spinkube/spin-operator/releases/download/v0.1.0/spin-operator.shim-executor.yaml": Internal error occurred: failed calling webhook "mspinappexecutor.kb.io": failed to call webhook: Post "https://spin-operator-webhook-service.spin-operator.svc:443/mutate-core-spinoperator-dev-v1alpha1-spinappexecutor?timeout=10s": no endpoints available for service "spin-operator-webhook-service"
22+
```
23+
24+
To address the error above, first look to see if Spin Operator is running:
25+
26+
```console
27+
get pods -n spin-operator
28+
NAME READY STATUS RESTARTS AGE
29+
spin-operator-controller-manager-5bdcdf577f-htshb 0/2 ContainerCreating 0 26m
30+
```
31+
32+
If the above result (ready 0/2) is returned, then use the name from the above result to `kubectl describe pod` of the spin-operator:
33+
34+
```console
35+
kubectl describe pod spin-operator-controller-manager-5bdcdf577f-htshb -n spin-operator
36+
```
37+
38+
If the above command's response includes the message `SetUp failed for volume "cert" : secret "webhook-server-cert" not found`, please check the certificate. The spin operator requires this certificate to serve webhooks, and the missing certificate could be one reason why the spin operator is failing to start.
39+
40+
The command to check the certificate and the desired output is as follows:
41+
42+
```console
43+
kubectl get certificate -n spin-operator
44+
NAME READY SECRET AGE
45+
spin-operator-serving-cert True webhook-server-cert 11m
46+
```
47+
48+
Instead of the desired output shown above you may be getting the `No resources found in spin-operator namespace.` response from the command. For example:
49+
50+
```console
51+
kubectl get certificate -n spin-operator
52+
No resources found in spin-operator namespace.
53+
```
54+
55+
To resolve this issue, please try to install the Spin Operator again. Except this time, use the `helm upgrade --install` syntax instead of just `helm install`:
56+
57+
```console
58+
helm upgrade --install spin-operator \
59+
--namespace spin-operator \
60+
--create-namespace \
61+
--version 0.1.0 \
62+
--wait \
63+
oci://ghcr.io/spinkube/charts/spin-operator
64+
```
65+
66+
Once the Spin Operator is installed you can try and run the `kubectl apply -f https://github.com/spinkube/spin-operator/releases/download/v0.1.0/spin-operator.shim-executor.yaml` command again. The issue should be resolved now.
67+
68+
## Error Validating Data: Connection Refused
69+
70+
When trying to run the `kubectl apply -f <URL>` command (for example installing the `cert-manager` etc.) you may encounter an error similar to the following:
71+
72+
```
73+
$ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.3/cert-manager.yaml
74+
75+
error: error validating "https://github.com/cert-manager/cert-manager/releases/download/v1.14.3/cert-manager.yaml": error validating data: failed to download openapi: Get "https://127.0.0.1:6443/openapi/v2?timeout=32s": dial tcp 127.0.0.1:6443: connect: connection refused; if you choose to ignore these errors, turn validation off with --validate=false
76+
```
77+
78+
This is because no cluster exists. You can create a cluster using the `k3d` [command]({{< ref "prerequisites#k3d" >}}) or install and configure a client like [Rancher Desktop]({{< ref "integrating-with-rancher-desktop" >}}) or [Docker Desktop]({{< ref "integrating-with-docker-desktop" >}}) to manage Kubernetes clusters on your behalf.
79+
80+
## Installation Failed
81+
82+
When trying to install a new version of a chart you may get the following error:
83+
84+
```console
85+
Error: INSTALLATION FAILED: cannot re-use a name that is still in use
86+
```
87+
88+
For example, if you have installed `v0.14.0` of kwasm-operator using the following `helm install` command:
89+
90+
```console
91+
helm install \
92+
kwasm-operator kwasm/kwasm-operator \
93+
--namespace kwasm \
94+
--create-namespace \
95+
--set kwasmOperator.installerImage=ghcr.io/spinkube/containerd-shim-spin/node-installer:v0.14.0
96+
```
97+
98+
Reissuing the above command with the new version `v0.14.1` will result in the following error - `Error: INSTALLATION FAILED: cannot re-use a name that is still in use`. To use the same command when installing and upgrading a release, use `upgrade --install` ([as referenced here in the official Helm documentation](https://v2.helm.sh/docs/developing_charts/#upgrade-a-release-idempotently)). For example:
99+
100+
```console
101+
helm upgrade --install \
102+
kwasm-operator kwasm/kwasm-operator \
103+
--namespace kwasm \
104+
--create-namespace \
105+
--set kwasmOperator.installerImage=ghcr.io/spinkube/containerd-shim-spin/node-installer:v0.14.1
106+
```
107+
108+
## Cluster Already Exists
109+
110+
When trying to create a cluster (e.g. a cluster named `wasm-cluster`) you may receive an error message similar to the following:
111+
112+
```console
113+
FATA[0000] Failed to create cluster 'wasm-cluster' because a cluster with that name already exists
114+
```
115+
116+
### Cluster Information
117+
118+
With `k3d` installed, you can use the following command to get a cluster list:
119+
120+
```console
121+
$ k3d cluster list
122+
NAME SERVERS AGENTS LOADBALANCER
123+
wasm-cluster 1/1 2/2 true
124+
```
125+
126+
With `kubectl installed, you can use the following command to dump cluster information (this is much more verbose):
127+
128+
```console
129+
kubectl cluster-info dump
130+
```
131+
132+
### Cluster Delete
133+
134+
With `k3d` installed, you can delete the cluster by name, as shown in the command below:
135+
136+
```console
137+
$ k3d cluster delete wasm-cluster
138+
INFO[0000] Deleting cluster 'wasm-cluster'
139+
INFO[0002] Deleting cluster network 'k3d-wasm-cluster'
140+
INFO[0002] Deleting 1 attached volumes...
141+
INFO[0002] Removing cluster details from default kubeconfig...
142+
INFO[0002] Removing standalone kubeconfig file (if there is one)...
143+
INFO[0002] Successfully deleted cluster wasm-cluster!
144+
```
145+
146+
## Too long: must have at most 262144 bytes
147+
148+
When running `kubectl apply -f my-file.yaml`, the following error can occur if the yaml file is too large:
149+
150+
```console
151+
Too long: must have at most 262144 bytes
152+
```
153+
154+
Using the `--server-side=true` option resolves this issue:
155+
156+
```console
157+
kubectl apply --server-side=true -f my-file.yaml
158+
```
159+
160+
## Redis Operator
161+
162+
Noted an error when installing Redis Operator:
163+
164+
```console
165+
$ helm repo add redis-operator https://spotahome.github.io/redis-operator
166+
"redis-operator" has been added to your repositories
167+
$ helm repo update
168+
Hang tight while we grab the latest from your chart repositories...
169+
...Successfully got an update from the "redis-operator" chart repository
170+
Update Complete. ⎈Happy Helming!⎈
171+
$ helm install redis-operator redis-operator/redis-operator
172+
Error: INSTALLATION FAILED: failed to install CRD crds/databases.spotahome.com_redisfailovers.yaml: error parsing : error converting YAML to JSON: yaml: line 4: did not find expected node content
173+
```
174+
175+
Used the following commands to enforce using a different version of Redis Operator (whilst waiting on [this PR fix](https://github.com/spotahome/redis-operator/pull/685) to be merged).
176+
177+
```console
178+
$ helm install redis-operator redis-operator/redis-operator --version 3.2.9
179+
NAME: redis-operator
180+
LAST DEPLOYED: Mon Jan 22 12:33:54 2024
181+
NAMESPACE: default
182+
STATUS: deployed
183+
REVISION: 1
184+
TEST SUITE: None
185+
```
186+
187+
## error: requires go version
188+
189+
When building apps like the [cpu-load-gen](https://github.com/spinkube/spin-operator/tree/main/apps/cpu-load-gen) Spin app, you may get the following error if your TinyGo is not up to date. The error requires go version `1.18` through `1.20` but this is not necessarily the case. It **is** recommended that you have the latest go installed e.g. `1.21` and downgrading is unnecessary. Instead please go ahead and [install the latest version of TinyGo]({{< ref "prerequisites#tinygo" >}}) to resolve this error:
190+
191+
```console
192+
user@user:~/spin-operator/apps/cpu-load-gen$ spin build
193+
Building component cpu-load-gen with `tinygo build -target=wasi -gc=leaking -no-debug -o main.wasm main.go`
194+
error: requires go version 1.18 through 1.20, got go1.21
195+
```
196+
197+
198+

0 commit comments

Comments
 (0)