Proposal
Presently k3s waits for the message "k3s is up and running"" to validate that the cluster is ready for use. However, this check is insufficient, as the API Server may still be synchronizing the database and therefore unable to respond to requests.
This may cause unexpected behaviors. For instance, as discussed in this thread, trying to create a pod may fail with the error looking up service account default/default: serviceaccount "default" not found.
The proposed solution is to wait for a message that contains the text Node controller sync successful. This is the way the java implementation works. Also, a quick PoC implemented using a LogAcceptor validates that waiting for this condition is more robust and prevents the error described above.
However, in order to implement this validation, the ForLog strategy must be extended as proposed in #1541 to allow validating regular expressions, instead of just fixed text.
Proposal
Presently k3s waits for the message
"k3s is up and running""to validate that the cluster is ready for use. However, this check is insufficient, as the API Server may still be synchronizing the database and therefore unable to respond to requests.This may cause unexpected behaviors. For instance, as discussed in this thread, trying to create a pod may fail with the
error looking up service account default/default: serviceaccount "default" not found.The proposed solution is to wait for a message that contains the text
Node controller sync successful. This is the way the java implementation works. Also, a quick PoC implemented using aLogAcceptorvalidates that waiting for this condition is more robust and prevents the error described above.However, in order to implement this validation, the
ForLogstrategy must be extended as proposed in #1541 to allow validating regular expressions, instead of just fixed text.