kubernetes
[!TIP]
kubernetes.io
add/_print
as suffix in the url, it will show pages into one page i.e.:
/etc/kubernetes/manifests
/etc/kubernetes/manifests
[!TIP]
/etc/kubernetes/manifests
as the path where kubelet should look for static Pod manifests. Names of static Pod manifests are:
etcd.yaml
kube-apiserver.yaml
kube-controller-manager.yaml
kube-scheduler.yaml
/etc/kubernetes
/etc/kubernetes
[!TIP]
important kubernetes cluster configurations
/etc/kubernetes/
as the path where kubeconfig files with identities for control plane components are stored. Names of kubeconfig files are:
kubelet.conf
(bootstrap-kubelet.conf during TLS bootstrap)
controller-manager.conf
scheduler.conf
admin.conf
for the cluster admin and kubeadm itself
names of certificates and key files
[!TIP]
ca.crt
,ca.key
for the Kubernetes certificate authority
apiserver.crt
,apiserver.key
for the API server certificate
apiserver-kubelet-client.crt
,apiserver-kubelet-client.key
for the client certificate used by the API server to connect to the kubelets securely
sa.pub
,sa.key
for the key used by the controller manager when signing ServiceAccount
front-proxy-ca.crt
,front-proxy-ca.key
for the front proxy certificate authority
front-proxy-client.crt
,front-proxy-client.key
for the front proxy client
[!TIP]
apiserver-advertise-address
andapiserver-bind-port
to bind to; if not provided, those value defaults to the IP address of the default network interface on the machine and port6443
service-cluster-ip-range
to use for servicesIf an external etcd server is specified, the
etcd-servers
address and related TLS settings (etcd-cafile
,etcd-certfile
,etcd-keyfile
);
if an external etcd server is not be provided, a local etcd will be used ( via host network )
If a cloud provider is specified, the corresponding
--cloud-provider
is configured, together with the--cloud-config
path if such file exists (this is experimental, alpha and will be removed in a future version)
other api server flags
--insecure-port=0
to avoid insecure connections to the api server--enable-bootstrap-token-auth=true
to enable the BootstrapTokenAuthenticator authentication module. See TLS Bootstrapping for more details--allow-privileged
to true (required e.g. by kube proxy)--requestheader-client-ca-file
to front-proxy-ca.crt--enable-admission-plugins
to:NamespaceLifecycle
e.g. to avoid deletion of system reserved namespacesLimitRanger
andResourceQuota
to enforce limits on namespacesServiceAccount
to enforce service account automationPersistentVolumeLabel
attaches region or zone labels to PersistentVolumes as defined by the cloud provider (This admission controller is deprecated and will be removed in a future version. It is not deployed by kubeadm by default with v1.9 onwards when not explicitly opting into using gce or aws as cloud providers)DefaultStorageClass
to enforce default storage class on PersistentVolumeClaim objectsDefaultTolerationSeconds
NodeRestriction
to limit what a kubelet can modify (e.g. only pods on this node)
--kubelet-preferred-address-types
toInternalIP
,ExternalIP
,Hostname
; this makeskubectl logs
and other API server-kubelet communication work in environments where the hostnames of the nodes aren't resolvableFlags for using certificates generated in previous steps:
--client-ca-file
toca.crt
--tls-cert-file
toapiserver.crt
--tls-private-key-file
toapiserver.key
--kubelet-client-certificate
toapiserver-kubelet-client.crt
--kubelet-client-key
toapiserver-kubelet-client.key
--service-account-key-file
tosa.pub
--requestheader-client-ca-file
tofront-proxy-ca.crt
--proxy-client-cert-file
tofront-proxy-client.crt
--proxy-client-key-file
tofront-proxy-client.key
Other flags for securing the front proxy (API Aggregation) communications:
--requestheader-username-headers=X-Remote-User
--requestheader-group-headers=X-Remote-Group
--requestheader-extra-headers-prefix=X-Remote-Extra-
--requestheader-allowed-names=front-proxy-client
[!TIP]
If kubeadm is invoked specifying a
--pod-network-cidr
, the subnet manager feature required for some CNI network plugins is enabled by setting:
--allocate-node-cidrs=true
--cluster-cidr
and--node-cidr-mask-size
flags according to the given CIDRIf a cloud provider is specified, the corresponding
--cloud-provider
is specified, together with the--cloud-config
path if such configuration file exists (this is experimental, alpha and will be removed in a future version)
other flags
--controllers
enabling all the default controllers plusBootstrapSigner
andTokenCleaner
controllers for TLS bootstrap. See TLS Bootstrapping for more details--use-service-account-credentials
to trueFlags for using certificates generated in previous steps:
--root-ca-file
to ca.crt--cluster-signing-cert-file
toca.crt
, if External CA mode is disabled, otherwise to""
--cluster-signing-key-file
toca.key
, if External CA mode is disabled, otherwise to""
--service-account-private-key-file
to sa.key
flow
pod creation
ingress traffic
contol plane
PROTOCOL | DIRECTION | PORT RANGE | PURPOSE | USED BY |
---|---|---|---|---|
TCP | Inbound |
| Kubernetes API server | All |
TCP | Inbound |
| etcd server client API | kube-apiserver, etcd |
TCP | Inbound |
| Kubelet API | Self, Control plane |
TCP | Inbound |
| kube-scheduler | Self |
TCP | Inbound |
| kube-controller-manager | Self |
worker node(s)
PROTOCOL | DIRECTION | PORT RANGE | PURPOSE | USED BY |
---|---|---|---|---|
TCP | Inbound |
| Kubelet API | Self, Control plane |
TCP | Inbound |
| All |
control pannel
kube-apiserver
etcd
kube-scheduler
controller manager
ccm : cloud controller manager
work node
[!NOTE]
linux
RUNTIME | PATH TO UNIX DOMAIN SOCKET |
---|---|
containerd | unix:///var/run/containerd/containerd.sock |
CRI-O | unix:///var/run/crio/crio.sock |
Docker Engine (using cri-dockerd) | unix:///var/run/cri-dockerd.sock |
windows
RUNTIME | PATH TO UNIX DOMAIN SOCKET |
---|---|
containerd | npipe:////./pipe/containerd-containerd |
Docker Engine (using cri-dockerd) | npipe:////./pipe/cri-dockerd |
kubelet
kube proxy
cri-o : container runtime
jsonpath
[!NOTE|label:references:]
options
explain
or
__start_kubectl
__start_kubectl
_complete_alias
_complete_alias
kubecolor
token
check token
generate token
[!NOET|label:see also:]
[!TIP]
ubuntu
CentOS/RHEL
references
references:
Kubernetes Architecture
resources:
Last updated