Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.28] - k3s server process shows up as k3s agent in process list #10621

Closed
brandond opened this issue Jul 31, 2024 · 1 comment
Closed
Assignees
Milestone

Comments

@brandond
Copy link
Member

Backport fix for k3s server process shows up as k3s agent in process list

@endawkins
Copy link

Validated on branch release-1.28 with commit 815efbf / version 1.28

Environment Details

Infrastructure

  • Cloud
  • Hosted

Node(s) CPU architecture, OS, and Version:

Linux ip-172-31-15-66 5.15.0-1019-aws #23-Ubuntu SMP Wed Aug 17 18:33:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Cluster Configuration:

N/A [Any setup suffices as long as there is one server]

Config.yaml:

write-kubeconfig-mode: "0644"
tls-san:
  - fake.fqdn.value
node-name: [REDACTED]
protect-kernel-defaults: true
selinux: true
node-external-ip: [REDACTED]
node-ip: [REDACTED]
cluster-init: true
secrets-encryption: true
kube-apiserver-arg:
  - 'audit-log-path=/var/lib/rancher/k3s/server/logs/audit.log'
  - 'audit-policy-file=/var/lib/rancher/k3s/server/audit.yaml'
  - 'audit-log-maxage=30'
  - 'audit-log-maxbackup=10'
  - 'audit-log-maxsize=100'
  - 'request-timeout=300s'
  - 'service-account-lookup=true'
  - 'enable-admission-plugins=NodeRestriction,PodSecurity,NamespaceLifecycle,ServiceAccount'
  - 'admission-control-config-file=/var/lib/rancher/k3s/server/cluster-level-pss.yaml'
kube-controller-manager-arg:
  - 'terminated-pod-gc-threshold=10'
  - 'use-service-account-credentials=true'
kubelet-arg:
  - 'streaming-connection-idle-timeout=5m'
  - 'make-iptables-util-chains=true'

Additional files

N/A

Testing Steps

  1. Copy config.yaml
$ sudo mkdir -p /etc/rancher/k3s && sudo cp config.yaml /etc/rancher/k3s
  1. Install k3s
  2. kubectl get nodes,pods -A -o wide
  3. ps auxfww | grep bin/k3s

Replication Results:

  • k3s version used for replication:
k3s -v
k3s version v1.28.12+k3s1 (4717e2a5)
go version go1.22.5
kubectl get node -o wide
NAME                                         STATUS   ROLES                       AGE     VERSION         INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION    CONTAINER-RUNTIME
ip-172-31-15-87.us-east-2.compute.internal   Ready    <none>                      4h13m   v1.28.12+k3s1   172.31.15.87   [REDACTED]    Ubuntu 22.04.1 LTS   5.15.0-1019-aws   containerd://1.7.17-k3s1.28
ip-172-31-8-85.us-east-2.compute.internal    Ready    control-plane,etcd,master   4h15m   v1.28.12+k3s1   172.31.8.85    [REDACTED]    Ubuntu 22.04.1 LTS   5.15.0-1019-aws   containerd://1.7.17-k3s1.28

ps auxfww | grep bin/k3s
ubuntu     19919  0.0  0.0   7004  2076 pts/1    S+   03:13   0:00              \_ grep --color=auto bin/k3s
root        7789 10.7 13.6 16481808 542832 ?     Ssl  Aug09  29:25 /usr/local/bin/k3s agent

Validation Results:

  • k3s version used for validation:
k3s -v
k3s version v1.28.12+k3s-815efbfc (815efbfc)
go version go1.22.5
kubectl get nodes,pods -A -o wide
NAME                                              STATUS   ROLES                       AGE    VERSION                 INTERNAL-IP    EXTERNAL-IP     OS-IMAGE             KERNEL-VERSION    CONTAINER-RUNTIME
node/ip-172-31-10-25.us-east-2.compute.internal   Ready    <none>                      9m9s   v1.28.12+k3s-815efbfc   172.31.10.25   [REDACTED]      Ubuntu 22.04.1 LTS   5.15.0-1019-aws   containerd://1.7.20-k3s2.28
node/ip-172-31-15-66.us-east-2.compute.internal   Ready    control-plane,etcd,master   11m    v1.28.12+k3s-815efbfc   172.31.15.66   [REDACTED]      Ubuntu 22.04.1 LTS   5.15.0-1019-aws   containerd://1.7.20-k3s2.28

ps auxfww | grep bin/k3s
ubuntu     10855  0.0  0.0   7004  2076 pts/0    S+   03:31   0:00              \_ grep --color=auto bin/k3s
root        7752 18.8 13.1 16412476 522648 ?     Ssl  03:25   1:06 /usr/local/bin/k3s server

Additional context / logs:

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants