Update k8s version & can chose network interface
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
738896b356
commit
1b665fa94c
5 changed files with 27 additions and 9 deletions
|
|
@ -1,2 +1,2 @@
|
|||
[Service]
|
||||
Environment=KUBELET_EXTRA_ARGS="--container-runtime=remote --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_default_ipv4.address }}"
|
||||
Environment=KUBELET_EXTRA_ARGS="--container-runtime=remote --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ lookup('vars', 'ansible_' + kubernetes_interface ).ipv4.address }}"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
# https://stackoverflow.com/a/57456786
|
||||
# https://stackoverflow.com/questions/57456667/failed-to-get-kubelets-cgroup
|
||||
[Service]
|
||||
CPUAccounting=true
|
||||
MemoryAccounting=true
|
||||
|
|
@ -32,7 +32,7 @@ nodeRegistration:
|
|||
{% elif kubernetes_cri == "cri-o" %}
|
||||
container-runtime-endpoint: "unix:///var/run/crio/crio.sock"
|
||||
{% endif %}
|
||||
node-ip: {{ ansible_default_ipv4.address }}
|
||||
node-ip: {{ lookup('vars', 'ansible_' + kubernetes_interface ).ipv4.address }}
|
||||
# read-only-port: "10255"
|
||||
ignorePreflightErrors:
|
||||
- SystemVerification
|
||||
|
|
@ -43,7 +43,7 @@ nodeRegistration:
|
|||
- IsPrivilegedUser
|
||||
{% endif %}
|
||||
localAPIEndpoint:
|
||||
advertiseAddress: "{{ ansible_default_ipv4.address }}"
|
||||
advertiseAddress: "{{ lookup('vars', 'ansible_' + kubernetes_interface ).ipv4.address }}"
|
||||
bindPort: 6443
|
||||
{% if kubernetes_master|bool and groups['KubernetesMasterConfigured_' ~ kubernetes_cluster_name] is defined %}
|
||||
certificateKey: "{{ kubernetes_certificateKey.stdout }}"
|
||||
|
|
@ -56,11 +56,11 @@ kubernetesVersion: stable
|
|||
{% if lbip_kubeapiserver is defined %}
|
||||
controlPlaneEndpoint: "{{ lbip_kubeapiserver }}:6443"
|
||||
{% else %}
|
||||
controlPlaneEndpoint: "{{ ansible_default_ipv4.address }}:6443"
|
||||
controlPlaneEndpoint: "{{ lookup('vars', 'ansible_' + kubernetes_interface ).ipv4.address }}:6443"
|
||||
{% endif %}
|
||||
apiServer:
|
||||
extraArgs:
|
||||
enable-admission-plugins: NodeRestriction,PodSecurityPolicy
|
||||
enable-admission-plugins: NodeRestriction
|
||||
authorization-mode: "Node,RBAC"
|
||||
audit-policy-file: "/etc/kubernetes/policies/audit-policy.yaml"
|
||||
audit-log-path: "/var/log/apiserver/audit.log"
|
||||
|
|
@ -109,7 +109,7 @@ kind: JoinConfiguration
|
|||
{% if kubernetes_master|bool %}
|
||||
controlPlane:
|
||||
localAPIEndpoint:
|
||||
advertiseAddress: "{{ ansible_default_ipv4.address }}"
|
||||
advertiseAddress: "{{ lookup('vars', 'ansible_' + kubernetes_interface ).ipv4.address }}"
|
||||
bindPort: 6443
|
||||
{% if groups['KubernetesMasterConfigured_' ~ kubernetes_cluster_name] is defined %}
|
||||
certificateKey: "{{ kubernetes_certificateKey.stdout }}"
|
||||
|
|
@ -125,7 +125,7 @@ discovery:
|
|||
{% endif %}
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
node-ip: {{ ansible_default_ipv4.address }}
|
||||
node-ip: {{ lookup('vars', 'ansible_' + kubernetes_interface ).ipv4.address }}
|
||||
# read-only-port: "10255"
|
||||
ignorePreflightErrors:
|
||||
- SystemVerification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue