github.com/projectcontour/contour@v1.28.2/site/content/docs/1.24/troubleshooting/operator.md (about) 1 # Operator Troubleshooting 2 3 [Contour Operator][1] runs in a Kubernetes cluster and is managed by a 4 [Deployment][2] resource. The following steps can be used to verify and 5 troubleshoot the operator: 6 7 Verify the operator deployment is available: 8 ```bash 9 $ kubectl get deploy/contour-operator -n contour-operator 10 NAME READY UP-TO-DATE AVAILABLE AGE 11 contour-operator 1/1 1 1 39m 12 ``` 13 14 Check the logs of the operator: 15 ```bash 16 $ kubectl logs deploy/contour-operator -n contour-operator -c contour-operator -f 17 2020-12-01T00:10:14.245Z INFO controller-runtime.metrics metrics server is starting to listen {"addr": "127.0.0.1:8080"} 18 2020-12-01T00:10:14.341Z INFO setup starting contour-operator 19 I1201 00:10:14.343439 1 leaderelection.go:243] attempting to acquire leader lease contour-operator/0d879e31.projectcontour.io... 20 2020-12-01T00:10:14.345Z INFO controller-runtime.manager starting metrics server {"path": "/metrics"} 21 I1201 00:10:14.442755 1 leaderelection.go:253] successfully acquired lease contour-operator/0d879e31.projectcontour.io 22 2020-12-01T00:10:14.447Z INFO controller Starting EventSource {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "source": "kind source: /, Kind="} 23 2020-12-01T00:10:14.540Z DEBUG controller-runtime.manager.events Normal {"object": {"kind":"ConfigMap","namespace":"contour-operator","name":"0d879e31.projectcontour.io","uid":"40ebcf47-a105-4efc-b7e9-993df2070a07","apiVersion":"v1","resourceVersion":"33899"}, "reason": "LeaderElection", "message": "contour-operator-55d6c7b4b5-hkd78_e960056c-f959-45c9-8686-9b85e09e21d8 became leader"} 24 2020-12-01T00:10:14.842Z INFO controller Starting EventSource {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "source": "kind source: /, Kind="} 25 2020-12-01T00:10:15.046Z INFO controller Starting EventSource {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "source": "kind source: /, Kind="} 26 2020-12-01T00:10:15.340Z INFO controller Starting Controller {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour"} 27 2020-12-01T00:10:15.341Z INFO controller Starting workers {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "worker count": 1} 28 ... 29 ``` 30 31 When a `Contour` is created, the operator should successfully reconcile the object: 32 ```bash 33 ... 34 2020-12-01T00:10:15.341Z INFO controllers.Contour reconciling {"request": "default/contour-sample"} 35 ... 36 2020-12-01T00:10:15.442Z DEBUG controller Successfully Reconciled {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "name": "contour-sample", "namespace": "default"} 37 ``` 38 39 Check the status of your `Contour` resource: 40 ```bash 41 $ kubectl get contour/contour-sample -o yaml 42 apiVersion: operator.projectcontour.io/v1alpha1 43 kind: Contour 44 metadata: 45 name: contour-sample 46 namespace: default 47 ... 48 status: 49 availableContours: 2 50 availableEnvoys: 1 51 conditions: 52 - lastTransitionTime: "2020-12-01T00:55:38Z" 53 message: Contour has minimum availability. 54 reason: ContourAvailable 55 status: "True" 56 type: Available 57 ``` 58 59 If the `Contour` does not become available, check the status of operands. 60 ```bash 61 $ kubectl get po -n projectcontour 62 NAME READY STATUS RESTARTS AGE 63 contour-7649c6f6cc-9hxn9 1/1 Running 0 6m18s 64 contour-7649c6f6cc-sb4nn 1/1 Running 0 6m18s 65 contour-certgen-vcsqd 0/1 Completed 0 6m18s 66 envoy-qshxf 2/2 Running 0 6m18s 67 ``` 68 69 Check the logs of the operands. The following example checks the logs of the 70 contour deployment operand: 71 ```bash 72 $ kubectl logs deploy/contour -n projectcontour -c contour -f 73 2020-12-01T00:10:14.245Z INFO controller-runtime.metrics metrics server is starting to listen {"addr": "127.0.0.1:8080"} 74 2020-12-01T00:10:14.341Z INFO setup starting contour-operator 75 I1201 00:10:14.343439 1 leaderelection.go:243] attempting to acquire leader lease contour-operator/0d879e31.projectcontour.io... 76 2020-12-01T00:10:14.345Z INFO controller-runtime.manager starting metrics server {"path": "/metrics"} 77 I1201 00:10:14.442755 1 leaderelection.go:253] successfully acquired lease contour-operator/0d879e31.projectcontour.io 78 2020-12-01T00:10:14.447Z INFO controller Starting EventSource {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "source": "kind source: /, Kind="} 79 2020-12-01T00:10:14.540Z DEBUG controller-runtime.manager.events Normal {"object": {"kind":"ConfigMap","namespace":"contour-operator","name":"0d879e31.projectcontour.io","uid":"40ebcf47-a105-4efc-b7e9-993df2070a07","apiVersion":"v1","resourceVersion":"33899"}, "reason": "LeaderElection", "message": "contour-operator-55d6c7b4b5-hkd78_e960056c-f959-45c9-8686-9b85e09e21d8 became leader"} 80 2020-12-01T00:10:14.842Z INFO controller Starting EventSource {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "source": "kind source: /, Kind="} 81 2020-12-01T00:10:15.046Z INFO controller Starting EventSource {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "source": "kind source: /, Kind="} 82 2020-12-01T00:10:15.340Z INFO controller Starting Controller {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour"} 83 2020-12-01T00:10:15.341Z INFO controller Starting workers {"reconcilerGroup": "operator.projectcontour.io", "reconcilerKind": "Contour", "controller": "contour", "worker count": 1} 84 ... 85 ``` 86 87 __Note:__ `projectcontour` is the default namespace used by operands of a `Contour` 88 when `spec.namespace.name` is unspecified. 89 90 [1]: https://github.com/projectcontour/contour-operator 91 [2]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/