mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
kubeadm implement preflight checks
Includes checks for verifying services exist and are enabled, ports are open, directories do not exist or are empty, and required binaries are in the path. Checks that user running kubeamd init and join is root and will only execute command if user is root. Moved away from using kubectl error handling to having kubeadm handle its own errors. This should allow kubeadm to have more meaningful errors, exit codes, and logging for specific kubeadm use cases.
This commit is contained in:
committed by
Devan Goodwin
parent
b673e2d0a0
commit
16b159c12b
@@ -21,12 +21,12 @@ import (
|
||||
"os"
|
||||
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app"
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app/util"
|
||||
)
|
||||
|
||||
// TODO(phase1+): check for root
|
||||
func main() {
|
||||
if err := app.Run(); err != nil {
|
||||
fmt.Printf(app.AlphaWarningOnExit)
|
||||
fmt.Printf(util.AlphaWarningOnExit)
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Exit(0)
|
||||
|
Reference in New Issue
Block a user