Comments (5)
CBL-Mariner already provides the k3s
package:
root [ / ]# tdnf info k3s
Loaded plugin: tdnfrepogpgcheck
Name : k3s
Arch : x86_64
Epoch : 0
Version : 1.26.3
Release : 2.cm2
Install Size : 72.12M (75625221)
Download Size : 65.59M (68778323)
Repo : mariner-official-base
Summary : Lightweight Kubernetes
URL : https://k3s.io
License : ASL 2.0
Description : The certified Kubernetes distribution built for IoT & Edge computing.
Total Size: 72.12M (75625221)
from azurelinux.
It works using the installation script also!
Output, using your command:
zcobol@mariner3 [ ~ ]$ curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.24.10+k3s1" sh -s - server --cluster-init --disable-selinux
[INFO] Using v1.24.10+k3s1 as release
[INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.24.10+k3s1/sha256sum-amd64.txt
[INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.24.10+k3s1/k3s
[INFO] Verifying binary download
[INFO] Installing k3s to /usr/local/bin/k3s
[INFO] Skipping installation of SELinux RPM
[INFO] Creating /usr/local/bin/kubectl symlink to k3s
[INFO] Creating /usr/local/bin/crictl symlink to k3s
[INFO] Creating /usr/local/bin/ctr symlink to k3s
[INFO] Creating killall script /usr/local/bin/k3s-killall.sh
[INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh
[INFO] env: Creating environment file /etc/systemd/system/k3s.service.env
[INFO] systemd: Creating service file /etc/systemd/system/k3s.service
[INFO] systemd: Enabling k3s unit
Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service.
[INFO] systemd: Starting k3s
zcobol@mariner3 [ ~ ]$ sudo kubectl version --output=yaml
clientVersion:
buildDate: "2023-01-26T00:35:57Z"
compiler: gc
gitCommit: 546a94e9ae1c3be6f9c0dcde32a6e6672b035bc8
gitTreeState: clean
gitVersion: v1.24.10+k3s1
goVersion: go1.19.5
major: "1"
minor: "24"
platform: linux/amd64
kustomizeVersion: v4.5.4
serverVersion:
buildDate: "2023-01-26T00:35:57Z"
compiler: gc
gitCommit: 546a94e9ae1c3be6f9c0dcde32a6e6672b035bc8
gitTreeState: clean
gitVersion: v1.24.10+k3s1
goVersion: go1.19.5
major: "1"
minor: "24"
platform: linux/amd64
from azurelinux.
Thanks! Unfortunately, the "installation script" way not work for me, see logs below:
root@cbl-yockgen [ /home/yockgen ]# curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.24.10+k3s1" sh -s - server --cluster-init --disable-selinux
[INFO] Using v1.24.10+k3s1 as release
[INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.24.10+k3s1/sha256sum-amd64.txt
[INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.24.10+k3s1/k3s
[INFO] Verifying binary download
[INFO] Installing k3s to /usr/local/bin/k3s
[INFO] Finding available k3s-selinux versions
[ERROR] Failed to find the k3s-selinux policy, please install:
dnf install -y container-selinux
dnf install -y https://rpm.rancher.io/k3s/stable/common/centos/9/noarch/
However, by added "INSTALL_K3S_SKIP_SELINUX_RPM=true", the installation script able to proceed:
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION="v1.30.2+k3s2" INSTALL_K3S_SKIP_SELINUX_RPM=true sh -s - server --cluster-init
from azurelinux.
@yockgen what version of Mariner are you using? The script won't execute install_selinux_rpm()
unless it detects a redhat
, centos
, oracle
, fedora
or suse
distro. See installation script beginning line 639:
install_selinux_rpm() {
if [ -r /etc/redhat-release ] || [ -r /etc/centos-release ] || [ -r /etc/oracle-release ] || [ -r /etc/fedora-release ] || [ "${ID_LIKE%%[ ]*}" = "suse" ]; then
repodir=/etc/yum.repos.d
if [ -d /etc/zypp/repos.d ]; then
repodir=/etc/zypp/repos.d
fi
set +o noglob
$SUDO rm -f ${repodir}/rancher-k3s-common*.repo
set -o noglob
if [ -r /etc/redhat-release ] && [ "${3}" = "el7" ]; then
$SUDO yum install -y yum-utils
$SUDO yum-config-manager --enable rhel-7-server-extras-rpms
fi
$SUDO tee ${repodir}/rancher-k3s-common.repo >/dev/null << EOF
[rancher-k3s-common-${2}]
name=Rancher K3s Common (${2})
baseurl=https://${1}/k3s/${2}/common/${4}/noarch
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://${1}/public.key
EOF
case ${3} in
sle)
rpm_installer="zypper --gpg-auto-import-keys"
if [ "${TRANSACTIONAL_UPDATE=false}" != "true" ] && [ -x /usr/sbin/transactional-update ]; then
transactional_update_run="transactional-update --no-selfupdate -d run"
rpm_installer="transactional-update --no-selfupdate -d run ${rpm_installer}"
: "${INSTALL_K3S_SKIP_START:=true}"
fi
# create the /var/lib/rpm-state in SLE systems to fix the prein selinux macro
${transactional_update_run} mkdir -p /var/lib/rpm-state
;;
coreos)
rpm_installer="rpm-ostree --idempotent"
# rpm_install_extra_args="--apply-live"
: "${INSTALL_K3S_SKIP_START:=true}"
;;
*)
rpm_installer="yum"
;;
esac
if [ "${rpm_installer}" = "yum" ] && [ -x /usr/bin/dnf ]; then
rpm_installer=dnf
fi
if rpm -q --quiet k3s-selinux; then
# remove k3s-selinux module before upgrade to allow container-selinux to upgrade safely
if check_available_upgrades container-selinux ${3} && check_available_upgrades k3s-selinux ${3}; then
MODULE_PRIORITY=$($SUDO semodule --list=full | grep k3s | cut -f1 -d" ")
if [ -n "${MODULE_PRIORITY}" ]; then
$SUDO semodule -X $MODULE_PRIORITY -r k3s || true
fi
fi
fi
# shellcheck disable=SC2086
$SUDO ${rpm_installer} install -y "k3s-selinux"
fi
return
}
Tested on Mariner2
and Mariner3 Beta
the installer is not triggering this function, and you'll notice this in the logs [INFO] Skipping installation of SELinux RPM
from azurelinux.
My Mariner OS:
root@cbl-yockgen [ ~ ]# cat /etc/os-release
NAME="Common Base Linux Mariner"
VERSION="2.0.20240609"
ID=mariner
VERSION_ID="2.0"
PRETTY_NAME="CBL-Mariner/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://aka.ms/cbl-mariner"
BUG_REPORT_URL="https://aka.ms/cbl-mariner"
SUPPORT_URL="https://aka.ms/cbl-mariner"
root@cbl-yockgen [ ~ ]# uname -r
5.15.158.2-1.cm2
Is it possible to added Mariner flag on line 639 to enabled it?
Thanks a lot of your advice!
from azurelinux.
Related Issues (20)
- drop 0007-feat-dracut.sh-support-multiple-config-dirs.patch HOT 2
- OpenSSH critical vulnerability CVE-2024-6387 HOT 3
- Impact by CVE-2024-6387 HOT 3
- git shouldn't depend (transitively) on openssh-server
- openssh shouldn't install both clients and server
- drop 0002-disable-xattr.patch HOT 1
- Azure linux 3.0 release
- Missing feature systemd/systemctl? HOT 2
- Add stress-ng package HOT 2
- HACK SNAPCHAT WITH FREE PULL REQUEST USING ONLINE META SNAP BRUTE FORCE (howtohacksnapchat2024) ONLINE
- What's the ETA of WSL distribution be available in the Microsoft store? HOT 2
- avahi-daemon timeout in azurelinux 3.0
- CVE-2024-41110 backported only into AL2, not AL3
- [3.0] walinuxgent: missing dracut modules configuration HOT 1
- New package request: Add support for mimalloc
- `abseil-cpp` compilation creates ABI compatibility issues between `abseil-cpp` and dependent packages HOT 1
- Azure Linux sets permissions of root directory to 0750 by default, preventing non-root users from logging in
- `python-poetry-core` doesn't declare some of its runtime dependencies, resulting in errors at runtime
- Update packer to 1.11.x from 1.9.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azurelinux.