kubernetes-pfsense-controller: CrashLoopBackOff: invalid username or password

First of all I can’t express my gratitude enough for the Kubernetes pfSense controller!

System details

k3s -version

k3s version v1.21.3+k3s1 (1d1f220f) go version go1.16.6

Ubuntu version

Linux 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

pfSense version

2.5.2-RELEASE (amd64) built on Fri Jul 02 15:33:00 EDT 2021 FreeBSD 12.2-STABLE

Installation details

kubectl method

i.e. kubectl apply -f secret.yaml, in which secret.yaml was edited and adjusted according the pfSense admin password. The password was generated via the following command within the OS system where k3s is running.

To generate a base64 encoded password: echo 'blabla' | base64

YmxhYmxhCg==

And to decode the base64 code into a human readable form echo 'YmxhYmxhCg==' | base64 -d

blabla

The password is than defined in secret.yaml as follows:

apiVersion: v1
kind: Secret
metadata:
  name: kubernetes-pfsense-controller
  namespace: kube-system
type: Opaque
data:
  pfsense-password: YmxhYmxhCg==

Log details

kubectl logs kubernetes-pfsense-controller-668c59c454-rlxbs -n kube-system

PHP Deprecated:  Required parameter $callback follows optional parameter $params in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-client-php/src/KubernetesClient/Client.php on line 170
PHP Warning:  Undefined array key "data" in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-controller-php/src/KubernetesController/Store.php on line 128
PHP Deprecated:  Required parameter $callback follows optional parameter $params in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-client-php/src/KubernetesClient/Watch.php on line 137
2021-08-01T11:47:05+00:00 store successfully initialized
2021-08-01T11:47:05+00:00 controller config loaded/updated
2021-08-01T11:47:05+00:00 loading plugin metallb
PHP Warning:  Undefined array key "configMap" in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/MetalLB.php on line 30
2021-08-01T11:47:05+00:00 loading plugin haproxy-declarative
2021-08-01T11:47:05+00:00 loading plugin haproxy-ingress-proxy
2021-08-01T11:47:05+00:00 loading plugin pfsense-dns-services
PHP Warning:  Undefined array key "serviceLabelSelector" in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSIngresses.php on line 32
PHP Warning:  Undefined array key "serviceFieldSelector" in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSIngresses.php on line 33
2021-08-01T11:47:05+00:00 loading plugin pfsense-dns-ingresses
2021-08-01T11:47:05+00:00 loading plugin pfsense-dns-haproxy-ingress-proxy
PHP Warning:  Trying to access array offset on value of type null in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-controller-php/src/KubernetesController/Store.php on line 218
2021-08-01T11:47:05+00:00 plugin (metallb): /v1/namespaces/metallb-system/ConfigMap/config ADDED - 135950
PHP Fatal error:  Uncaught Laminas\XmlRpc\Client\Exception\FaultException: Authentication failed: Invalid username or password in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/laminas/laminas-xmlrpc/src/Client.php:324
Stack trace:
#0 phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/XmlRpc/Client.php(59): Laminas\XmlRpc\Client->call('pfsense.backup_...', Array)
#1 phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/PfSenseConfigBlock.php(96): KubernetesPfSenseController\XmlRpc\Client->call('pfsense.backup_...', Array)
#2 phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/MetalLB.php(141): KubernetesPfSenseController\Plugin\PfSenseConfigBlock::getInstalledPackagesConfigBlock(Object(KubernetesPfSenseController\XmlRpc\Client), 'frrbgpneighbors')
#3 phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/MetalLB.php(117): KubernetesPfSenseController\Plugin\MetalLB->doActionGeneric()
#4 phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-controller-php/src/KubernetesController/Plugin/AbstractPlugin.php(108): KubernetesPfSenseController\Plugin\MetalLB->doAction()
#5 phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-controller-php/src/KubernetesController/Controller.php(532): KubernetesController\Plugin\AbstractPlugin->invokeAction()
#6 phar:///usr/local/bin/kubernetes-pfsense-controller/controller.php(87): KubernetesController\Controller->main()
#7 /usr/local/bin/kubernetes-pfsense-controller(2): include('phar:///usr/loc...')
#8 {main}
  thrown in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/laminas/laminas-xmlrpc/src/Client.php on line 324

In other words

PHP Fatal error: Uncaught Laminas\XmlRpc\Client\Exception\FaultException: Authentication failed: Invalid username or password in phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/laminas/laminas-xmlrpc/src/Client.php:324

Questions

  1. How do you define, generate and/or structure the base64 password of pfSense within the secret.yaml? Or even perhaps extract the password from config.xml?
  2. Could you give an exact example of the secret.yaml file?
  3. Could you also provide an extra section with applicable tested against or an overview on the first github landing page. As of now it unclear which version of kubernetes and pfSense the kubernetes-pfsense-controlller is succesfully tested against or working with? Changelog.md is somewhat hidden.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

I don’t think there’s anything wrong with how pfSense is setup at this point. These error are all related to php 8 being more stringent than php 7. I’ll have another release shortly to clean this one up (the errors are simply a result of starting the first time every so I don’t see them generally).

Yeah I’ll fix it up. That’s the first release with php8 and it appears to be more stringent on some things. It will be a few hours but I’ll get a new release in a bit.

I’ll also update the static yaml to more recent versions!