book
  • README
  • cheatsheet
    • bash
      • builtin
      • syntactic sugar
      • cmd
      • havefun
    • text-processing
      • awk
      • sed
      • html
      • json
      • regex
      • unicode
    • osx
    • curl
    • tricky
    • widget
    • proxy
    • colors
    • math
    • media
    • ssl
      • keystore
      • verification
      • server
      • client
      • tricky
    • windows
      • powershell
      • choco
      • wsl
      • wt
      • shortcut
      • clsid
      • env
      • shell:folder
  • vim
    • nvim
    • install
    • color
    • plugins
      • usage
      • other plugins
      • deprecated
    • tricky
    • viml
    • windows
    • troubleshooting
  • devops
    • admin tools
    • ssh
    • git
      • config
      • alias
      • submodule
      • eol
      • example
      • gerrit
        • gerrit API
      • github
      • troubleshooting
      • tricky
      • statistics
    • pre-commit
    • release-tools
    • tmux
      • cheatsheet
    • ansible
    • vault
    • artifactory
      • api
      • cli
      • aql
      • nginx cert
    • klocwork
      • kwadmin
      • kwserver
      • api
      • q&a
    • elk
    • mongodb
    • android
    • mobile
  • jenkins
    • config
      • windows
    • appearance
    • troubleshooting
    • jenkinsfile
      • utility
      • parallel
      • build
      • envvar
      • properties
      • trigger
      • node
    • script
      • job
      • build
      • stage
      • agent
      • security & authorization
      • exception
      • monitor
      • tricky
    • api
      • blueocean
    • cli
    • plugins
      • kubernetes
      • docker
      • shared-libs
      • lockable-resource
      • ansicolor
      • badge
      • groovy-postbuild
      • simple-theme
      • customizable-header
      • artifactory
      • jira-steps
      • job-dsl
      • build-timeline
      • crumbIssuer
      • coverage
      • uno-choice
      • tricky
  • virtualization
    • kubernetes
      • init
        • kubespray
        • kubeadm
          • environment
          • crio v1.30.4
          • docker v1.15.3
          • HA
        • addons
        • etcd
      • kubectl
        • pod
        • deploy
        • replicasets
        • namespace
        • secrets
      • node
      • certificates
      • events
      • kubeconfig
      • kubelet
      • troubleshooting
      • cheatsheet
      • auth
      • api
      • tools
        • monitor
        • helm
        • network
        • minikube
    • docker
      • run & exec
      • voume
      • remove
      • show info
      • dockerfile
      • dockerd
      • tricky
      • troubleshooting
      • windows
    • crio
    • podman
  • ai
    • prompt
  • osx
    • apps
      • init
      • brew
    • defaults
    • system
    • network
    • script
    • tricky
  • linux
    • devenv
    • util
      • time & date
      • output formatting
      • params
      • tricky
    • nutshell
    • disk
    • network
    • troubleshooting
    • system
      • apt/yum/snap
      • authorization
      • apps
      • x11
    • ubuntu
      • systemctl
      • x
    • rpi
  • programming
    • groovy
    • python
      • config
      • basic
      • list
      • pip
      • q&a
    • others
    • archive
      • angular
      • maven
      • mysql
        • installation
        • logs
      • ruby
        • rubyInstallationQ&A
  • tools
    • fonts
    • html & css
    • Jira & Confluence
    • node & npm
      • gitbook
      • hexo
      • github.page
      • code themes
    • app
      • microsoft office
      • vscode
      • virtualbox
      • iterm2
      • browser
      • skype
      • teamviewer
      • others
  • quotes
  • english
Powered by GitBook
On this page
  • synopsis
  • options
  • init workflow
  • init steps
  • troubleshooting

Was this helpful?

  1. virtualization
  2. kubernetes

init

PreviouskubernetesNextkubespray

Last updated 8 months ago

Was this helpful?

preflight                    Run pre-flight checks
certs                        Certificate generation
  /ca                          Generate the self-signed Kubernetes CA to provision identities for other Kubernetes components
  /apiserver                   Generate the certificate for serving the Kubernetes API
  /apiserver-kubelet-client    Generate the certificate for the API server to connect to kubelet
  /front-proxy-ca              Generate the self-signed CA to provision identities for front proxy
  /front-proxy-client          Generate the certificate for the front proxy client
  /etcd-ca                     Generate the self-signed CA to provision identities for etcd
  /etcd-server                 Generate the certificate for serving etcd
  /etcd-peer                   Generate the certificate for etcd nodes to communicate with each other
  /etcd-healthcheck-client     Generate the certificate for liveness probes to healthcheck etcd
  /apiserver-etcd-client       Generate the certificate the apiserver uses to access etcd
  /sa                          Generate a private key for signing service account tokens along with its public key
kubeconfig                   Generate all kubeconfig files necessary to establish the control plane and the admin kubeconfig file
  /admin                       Generate a kubeconfig file for the admin to use and for kubeadm itself
  /kubelet                     Generate a kubeconfig file for the kubelet to use *only* for cluster bootstrapping purposes
  /controller-manager          Generate a kubeconfig file for the controller manager to use
  /scheduler                   Generate a kubeconfig file for the scheduler to use
kubelet-start                Write kubelet settings and (re)start the kubelet
control-plane                Generate all static Pod manifest files necessary to establish the control plane
  /apiserver                   Generates the kube-apiserver static Pod manifest
  /controller-manager          Generates the kube-controller-manager static Pod manifest
  /scheduler                   Generates the kube-scheduler static Pod manifest
etcd                         Generate static Pod manifest file for local etcd
  /local                       Generate the static Pod manifest file for a local, single-node local etcd instance
upload-config                Upload the kubeadm and kubelet configuration to a ConfigMap
  /kubeadm                     Upload the kubeadm ClusterConfiguration to a ConfigMap
  /kubelet                     Upload the kubelet component config to a ConfigMap
upload-certs                 Upload certificates to kubeadm-certs
mark-control-plane           Mark a node as a control-plane
bootstrap-token              Generates bootstrap tokens used to join a node to a cluster
kubelet-finalize             Updates settings relevant to the kubelet after TLS bootstrap
  /experimental-cert-rotation  Enable kubelet client certificate rotation
addon                        Install required addons for passing conformance tests
  /coredns                     Install the CoreDNS addon to a Kubernetes cluster
  /kube-proxy                  Install the kube-proxy addon to a Kubernetes cluster
  • --apiserver-advertise-address string

  • --apiserver-bind-port int32 Default: 6443

  • --apiserver-cert-extra-sans strings

  • --cert-dir string Default: "/etc/kubernetes/pki"

  • --certificate-key string

  • --config string

  • --control-plane-endpoint string

  • --cri-socket string

  • --dry-run

  • --feature-gates string : A set of key=value pairs that describe feature gates for various features

    • PublicKeysECDSA=true|false (ALPHA - default=false)

    • RootlessControlPlane=true|false (ALPHA - default=false)

    • UnversionedKubeletConfigMap=true|false (BETA - default=true)

  • -h, --help

  • --ignore-preflight-errors strings

  • --image-repository string Default: "k8s.gcr.io"

  • --kubernetes-version string Default: "stable-1"

  • --node-name string

  • --patches string

  • --pod-network-cidr string

  • --service-cidr string Default: "10.96.0.0/12"

  • --service-dns-domain string Default: "cluster.local"

  • --skip-certificate-key-print

  • --skip-phases strings

  • --skip-token-print

  • --token string

  • --token-ttl duration Default: 24h0m0s

  • --upload-certs

  • --rootfs string

  • api server

  • controller-manager

  • scheduler

references:

[!TIP] kubeadm waits (upto 4m0s) until localhost:6443/healthz (kube-apiserver liveness) returns ok. However in order to detect deadlock conditions, kubeadm fails fast if localhost:10255/healthz (kubelet liveness) or localhost:10255/healthz/syncloop (kubelet readiness) don't return ok within 40s and 60s respectively.

[!TIP] Please note that:

  • The node-role.kubernetes.io/master taint is deprecated and will be removed in kubeadm version 1.25

init steps

[!NOTE|label:references:]

  • others:

  1. install container runtime

  1. High Availability

troubleshooting

  • $ kubectl run curl-deploy --image=quay.io/curl/curl:latest -i --tty -- sh
    $ curl <clusterIP>:<svcPort>
    
    # resume
    $ kubectl attach curl-deploy -c curl-deploy -i -t

[!TIP] kubeadm writes static Pod manifest files for control plane components to /etc/kubernetes/manifests static pod manifest generation for control plane components can be invoked individually with the command

Mark control-plane phase phase can be invoked individually with the command

synopsis
options
init workflow
preflight checks
generate the necessary certificates
generate kubeconfig files for control plane components
generate static pod manifests for control plane components
kubeadm init phase control-plane all
using custom images
generate static pod manifest for local etcd
wait for the control plane to come up
save the kubeadm clusterconfiguration in a configmap for later reference
mark the node as control-plane
kubeadm init phase mark-control-plane
configure tls-bootstrapping for node joining
create a bootstrap token
allow joining nodes to call csr api
Setup auto approval for new bootstrap tokens
setup nodes certificate rotation with auto approval
create the public cluster-info configmap
install addons
proxy
dns
How to Setup Kubernetes(k8s) Cluster in HA with Kubeadm
Creating Highly Available Clusters with kubeadm
Multi-Master Kubernetes Cluster Setup with CRI-O and vSphere Storage on CentOS 8
cri-o/tutorials
Running CRI-O on a Kubernetes cluster
在Kubernetes中使用CRI-O运行时
使用 Kubeadm 和 CRI-O 在 Rocky Linux 8 上安装 Kubernetes 集群
kubernetes cri-o浅尝
AlmaLinux基于cri-o+Calico用kubeadm搭建1.24版本多master高可用Kubernetes集群
etcd-io/etcd
详解 K8S 高可用部署
Kubernetes 1.28 震撼发布,Sidecar Containers 迎面而来
Manual installation on Kubernetes from scratch with kubectl
environment setup
cri-o
docker
addons
curl/curl-container
kuberentes packates
init first control plane
join peer control planes
join work nodes
install network plugin
calico
flannel
install ingress
ingress-nginx
monitoring
kubernetes-dashboard
grafana
metrics-server
setup tls
keepalived
haproxy
extenal etcd
kubeadm init