Praxisbericht: Warum voestalpine mit SAP und SUSE in die Zukunft geht

Dienstag, 12 Februar, 2019

‚One step ahead‘ lautet das Unternehmensmotto der österreichischen voestalpine AG. Mit innovativen und qualitativ hochwertigen Lösungen hilft der Technologiekonzern seinen Kunden, neue Ziele zu erreichen und dem Wettbewerb immer einen Schritt voraus zu sein. Höchste Anforderungen hat das Unternehmen auch an die Verfügbarkeit und Performance seiner IT. Beim Betrieb seiner geschäftskritischen SAP Anwendungen setzt voestalpine daher auf SUSE. Mit SUSE Linux Enterprise Server for SAP Applications sorgt das Unternehmen für unterbrechungsfreie Produktionsprozesse und legte die Basis für den Wechsel zu SAP HANA.

Die Herausforderung: Eine stabile Basis für die SAP Landschaft der nächsten Generation

Mehr als 50.000 Mitarbeiter und rund 500 Standorte in 50 Ländern: Der voestalpine Konzern mit Hauptsitz in Linz ist ein echter Global Player. Das Unternehmen produziert hochwertige Produkt- und Systemlösungen aus Stahl und anderen Metallen für die Automobil- und Hausgeräteindustrie und beliefert auch zahlreiche Kunden aus der Luftfahrt-, Öl- und Gasindustrie. Darüber hinaus ist voestalpine Weltmarktführer in der Weichentechnologie, im Spezialschienenbereich sowie bei Werkzeugstahl und Spezialprofilen.

Um die Nachfrage der weltweiten Kunden zuverlässig zu erfüllen, ist voestalpine an 365 Tagen rund um die Uhr im Einsatz. Der Konzern produziert in fast jeder Zeitzone, unter anderem in Australien, Brasilien, Singapur, Japan und den USA. Die vielen digitalen Prozesse rund um die Produktion werden heute größtenteils mit SAP Anwendungen gesteuert

Als der interne IT-Dienstleister – die voestalpine group-IT – eine neue SAP Landschaft für alle vier Geschäftsbereiche des Konzerns plante, suchte man auch nach Möglichkeiten, die IT-Abläufe zu straffen und zu optimieren. Die Verantwortlichen evaluierten dazu eine Reihe unterschiedlicher Lösungsarchitekturen. Höchste Priorität hatte dabei die durchgängige Verfügbarkeit der neuen SAP Landschaft. Das Unternehmen betreibt die SAP Anwendungen für alle Standorte in einem zentralen Rechenzentrum und es darf keine Ausfallzeiten geben.

Warum sich voestalpine für SUSE entschieden hat

Die voestalpine group-IT wählte SUSE Linux Enterprise Server for SAP Applications als Basis für die neue SAP Landschaft. Das Betriebssystem ist speziell für den Betrieb von SAP Software optimiert und bietet daher außergewöhnliche Performance und Ausfallsicherheit. Gleichzeitig vereinfacht die Plattform die Bereitstellung von neuen Anwendungen und Funktionen.

Ein wichtiger Faktor bei der Entscheidung war für voestalpine die strategische Kooperation der beiden Technologieanbieter. SAP empfiehlt SUSE Linux Enterprise Server for SAP Applications als Basis für SAP HANA und nutzt das Betriebssystem auch für seine eigene SAP Cloud Platform. Auch beim Support arbeiten SAP und SUSE eng zusammen. Dies gab den IT-Verantwortlichen bei voestalpine von Anfang an das Vertrauen, die richtige Wahl getroffen zu haben.

Mittlerweile werden die meisten SAP Anwendungen bei voestalpine auf SUSE Linux Enterprise Server for SAP Applications betrieben. Damit hatte voestalpine auch frühzeitig die Voraussetzungen für die Einführung der innovativen In-Memory-Plattform SAP HANA geschaffen.

Das Zusammenspiel mit anderen IT-Komponenten funktioniert in der Praxis ebenfalls hervorragend. Die voestalpine group-IT implementierte die neue SAP Architektur mit SUSE Linux auf Servern von Cisco mit Virtualisierungstechnologie von VMware und einer leistungsfähige Storage-Lösung von NetApp.

Für das regelmäßige Aktualisieren und Patchen der Linux-Infrastruktur nutzt die voestalpine group-IT den SUSE Manager. Die Lösung minimiert den laufenden Administrationsaufwand und sorgt dafür, dass die rund 200 Systeme mit SUSE Linux Enterprise Server for SAP Applications immer auf dem neuesten Stand sind.

Die Ergebnis

„SUSE Linux Enterprise Server for SAP Applications ist eine enorm stabile Plattform mit einer hervorragenden Verfügbarkeit – sie funktioniert einfach“, berichtet ein Sprecher von voestalpine group-IT. „Und obwohl wir einige sehr große SAP Anwendungen mit Datenbanken größer als 2 Terabyte und tausenden von Benutzern betreiben, ist die Performance konsistent sehr gut.“

Bei der Verwaltung der Infrastruktur profitiert die IT-Organisation zudem enorm von den Funktionen des SUSE Manager. Die Möglichkeit, Patches noch regelmäßiger zu installieren, hilft dem Unternehmen, schneller von Leistungsverbesserungen zu profitieren. Softwareaktualisierungen laufen heute reibungslos und weitgehend automatisiert ab.

voestalpine group-IT stellt mit der Linux-Plattform von SUSE sicher, dass das breite Portfolio an SAP Anwendungen jeden Tag rund um die Uhr störungsfrei läuft. Dadurch bleibt der Konzern bei der Fertigung im Plan und kann seine Kunden zuverlässig mit Stahl- und Metallprodukten beliefern. Die Produkte von voestalpine werden weltweit benötigt, um damit hochwertige Autos, Züge, Kühlschränke und andere Waren herzustellen.

Laden Sie sich jetzt die komplette Success Story herunter und erfahren Sie mehr darüber, wie voestalpine mit SUSE auch in Zukunft immer einen Schritt voraus sein will.

voestalpine group-IT GmbH

Freitag, 19 Oktober, 2018

Bei SUSE sorgen wir für Auswahlmöglichkeiten

Mittwoch, 12 Juli, 2023

Seit über 25 Jahren hat Open Source unsere Welt revolutioniert. Vom Wachstum von Linux über die Virtualisierung bis hin zur Cloud und vielem mehr – viele, wenn nicht sogar die meisten großen Fortschritte in der Technologie hatten Open Source-Innovationen als treibende Kraft. Für mich ist der Grund dafür klar. Wir wollen, dass so viele Köpfe wie möglich daran arbeiten, Lösungen zu finden – und zwar in einem Rahmen, in dem diese Entwicklungen weitergegeben werden, so dass alle davon profitieren. Wenn Probleme auftauchen, machen viele Augen alle Fehler sichtbar und lösbar. Im Kern geht es darum, dass Software „für alle frei zugänglich, verwendbar, veränderbar und gemeinsam nutzbar sein sollte (in veränderter oder unveränderter Form)“. Wenn Kunden und Kundinnen daran gehindert werden, den Quellcode, den sie von ihrem Anbieter erhalten haben, gemeinsam zu nutzen, schränkt dies ihre Möglichkeiten zur gemeinsamen Analyse und Prüfung der Software ein, von der sie abhängig sind.

SUSE steht zu 100 Prozent hinter dieser Ansicht. Eine zunehmende Proprietarisierung sollte nicht die Grundlage für den Wettbewerb zwischen Open Source-Unternehmen sein. Wir alle haben zur Open Source-Gemeinschaft beigetragen – genauso wie wir alle von ihr profitiert haben. Sie ist etwas Größeres als die Summe unserer Teile.

Bei SUSE arbeiten wir aktiv mit der Open Source-Community zusammen, um aus Open Source-Projekten Produkte in Unternehmensqualität zu entwickeln. Unsere Kunden zahlen nicht für die Software, sondern für die Möglichkeit, sie in einer geschäftskritischen Umgebung mit langfristigem 24/7-Support, Sicherheit, einem zertifizierten Stack und für ihre Präsenz in der Open Source-Community einzusetzen. Hier stehen wir im Wettbewerb, um der beste, zuverlässigste und kostengünstigste Anbieter für unsere Kunden zu sein.

Mit den jüngsten Einschränkungen der Verfügbarkeit von Quellcode verschiebt sich die Wettbewerbslandschaft unseres Erachtens in die falsche Richtung.

Eine wichtige Priorität ist es, den Kunden weiterhin eine Auswahl zu bieten. SUSE hat heute angekündigt, dass wir einen Hard Fork der RHEL-Codebasis entwickeln, unterstützen und der Community zur Verfügung stellen werden. Das ist unsere Stärke und wird den Kunden langfristige Kompatibilität und Wahlmöglichkeiten bieten.

Am besten lässt sich dies mit folgendem Vergleich erklären:

Wenn Sie ein Mobiltelefon benutzen, möchten Sie die Möglichkeit haben, den Telekommunikationsanbieter zu wechseln und gleichzeitig Ihre Nummer zu behalten, um den Nutzen, den Sie daraus ziehen, zu maximieren.

Ebenso können Sie als Nutzer und Nutzerinnen von Enterprise Linux auf SUSE umsteigen und Ihr bestehendes Linux beibehalten. Wir bei SUSE sind Experten darin, Anwendern von Open Source-Software auf äußerst wettbewerbsfähige Weise einen Unternehmensnutzen zu bieten, ohne dabei Abstriche bei dem zu machen, was den Kunden wichtig ist.

SUSE ist in einer einzigartigen Position, um dies zu tun. Wir verfügen über mehr als 30 Jahre Erfahrung in der Entwicklung von Linux und stellen sicher, dass es für unternehmenskritische Workloads geeignet ist. Unser Team ist sehr erfahren in der Unterstützung gemischter Umgebungen. Letztes Jahr haben wir erfolgreich SUSE Liberty Linux für unsere Kunden eingeführt, die Unterstützung für CentOS und RHEL benötigen. Darüber hinaus ist SUSE Manager seit langem für seine Fähigkeit bekannt, eine breite Palette von Linux-Distributionen effizient zu verwalten, und unterstreicht damit unser Bestreben, Benutzern Flexibilität und Auswahlmöglichkeiten zu bieten. SUSE ist fest entschlossen, diese Arbeit mit anderen zu teilen. Wir treten dafür ein, dass andere freien und offenen Zugang zum Quellcode haben und dass das Projekt nie eingeschränkt werden wird.

Ich möchte noch einen weiteren Punkt hinzufügen. Es versteht sich von selbst, dass SUSE weiterhin voll und ganz hinter den Lösungen SUSE Linux Enterprise (SLE) und Adaptable Linux Platform (ALP) sowie den openSUSE Linux-Distributionen steht. Wir möchten garantieren, dass Unternehmen und Communities auch weiterhin in der Lage sind, Innovationen in gemischten Umgebungen zu verwirklichen.

Wenn Sie genauso begeistert von Wahlmöglichkeiten sind wie wir, dann schließen Sie sich uns an.  Nehmen Sie Kontakt mit uns auf: Choice@SUSE.com.

Wahlfreiheit ist Realität!

DP

Warum sich SUSE im Confidential Computing Consortium engagiert

Donnerstag, 4 Mai, 2023

Vor wenigen Wochen ist SUSE dem Confidential Computing Consortium (CCC) der Linux Foundation beigetreten. Gemeinsam mit anderen Herstellern wie AMD, Google, Intel und Microsoft arbeiten wir nun daran, Daten bei der Verarbeitung in Cloud- oder Edge-Umgebungen besser zu schützen. Eine Schlüsselrolle spielt dabei die neue Adaptable Linux Platform (ALP) von SUSE.

82 Prozent aller Unternehmen machen sich große Sorgen, dass Cloud Provider auf ihre Geschäftsdaten zugreifen könnten – so das Ergebnis einer aktuellen Studie von Futurum Research („Confidential Computing: The Future of Data Security and Digital Trust“). Und diese Bedenken sind nicht unbegründet, denn technisch wäre ein Cloud-Anbieter dazu wohl jederzeit in der Lage.

Zwar bieten die Anbieter ihren Kunden in der Regel die Möglichkeit, Daten während der Übertragung (data in transit) oder bei der Speicherung auf Cloud-Storage (data at rest) zu verschlüsseln. Sobald die Daten jedoch in der Cloud verarbeitet werden (data in use), benötigen die beteiligten Anwendungen Zugriff auf die Daten im Klartext. Unmittelbar vor, während und kurz nach der Verarbeitung sind die Daten daher nicht ausreichend vor Missbrauch, böswilligen Exploits und anderen Cyberrisiken geschützt.

Wie Confidential Computing das Vertrauen in die Cloud stärkt

Um unberechtigte Zugriffe auf die zu verarbeitenden Daten zu verhindern, wurde das Konzept des Confidential Computing entwickelt. Die Idee ist dabei, vertrauliche Daten während der Verarbeitung in einer vertrauenswürdigen Enklave innerhalb der CPU zu isolieren. Dieses Trusted Execution Environment (TEE) wird durch eingebettete Verschlüsselungsmechanismen geschützt und ist nur für autorisierten Anwendungscode zugänglich. Wenn nicht-autorisierte oder manipulierte Applikationen versuchen, auf den Inhalt der Enklave zuzugreifen, wird die Verarbeitung automatisch gestoppt.

SUSE ALP setzt neue Maßstäbe für Confidential Computing

SUSE setzt bei der Weiterentwicklung seiner Betriebssysteme konsequent auf das Prinzip des Confidential Computing und vereinfacht damit den sicheren Betrieb von Workloads in der Cloud oder auch in Edge-Umgebungen. Im Mittelpunkt steht dabei unsere neue Adaptable Linux Platform (ALP) – ein leichtgewichtiges, modulares Betriebssystem für die sichere Ausführung von containerisierten und virtualisierten Workloads.

Credits: Xavier von Erlach on Unsplash

Der dritte Prototyp von ALP („Piz Bernina“) unterstützt nicht nur den Einsatz von vertrauenswürdigen Laufzeitumgebungen für VMs, sondern bietet auch eine kryptographische Remote-Attestierung für Confidential Computing. Dabei wird der Nachweis erbracht, dass eine VM genau die Inhalte ausführt, die sie ausführen soll – und dies vollständig verschlüsselt.

Durch die automatische Integritätsprüfung spielt es für Unternehmen keine Rolle mehr, ob die VM im eigenen Rechenzentrum oder in einer Public Cloud an einem ganz anderen Ort läuft: Sie erreichen in jeder Umgebung dasselbe hohe Maß an Sicherheit und Vertrauenswürdigkeit. Das gilt auch für Systeme in Edge-Umgebungen, die physisch schwieriger vor unbefugten Zugriffen geschützt werden können.

Gemeinsam die Datensicherheit stärken

Mit unserem Engagement im CCC wollen wir das Thema Confidential Computing weiter vorantreiben und gemeinsam mit anderen Herstellern sichere Lösungen für unsere Kunden entwickeln. Bereits heute arbeiten wir im Bereich Confidential Computing eng mit führenden Anbietern zusammen:

  • SUSE Linux Enterprise bietet Support für Confidential Virtual Machines (CVMs) auf der Google Cloud Platform und künftig auch in Microsoft Azure.
  • Das Secure VM Service Module (SVSM) von SUSE baut auf der AMD SEV-SNP-Architektur für Confidential Computing auf.
  • SUSE Linux Enterprise unterstützt Confidential Computing auf IBM zSystems und LinuxONE
  • Auch mit den Chipherstellern Intel und Arm kooperieren wir bei der Entwicklung von Lösungen für Confidential Computing.

Mehr über unser Engagement für das Confidential Computing Consortium erfahren Sie in diesem Blog-Artikel:

SUSE Joins the Confidential Computing Consortium

Lesen Sie hier mehr über die Neuerungen in SUSE ALP – Version „Piz Bernina“:

SUSE’s Adaptable Linux Platform (ALP) Raises the Bar on Confidential Computing

When to Use K3s and RKE2

Mittwoch, 14 Dezember, 2022

K3s and Rancher Kubernetes Engine (RKE2) are two Kubernetes distributions from the SUSE Rancher container platform. Either project can be used to run a production-ready cluster; however, they target different use cases and consequently possess unique characteristics.

This article will explain the similarities and differences between the projects. You’ll learn when it makes sense to use RKE2 instead of K3s and vice versa. Selecting the right choice is important because it affects the security and compliance of the containerized workloads you deploy.

K3s and RKE2

K3s provides a production-ready Kubernetes cluster from a single binary that weighs in at under 60MB. Because K3s is so lightweight, it’s a great option for running Kubernetes at the edge on IoT devices, low-power servers and your developer workstations.

Meanwhile, RKE2 is an alternative project that also runs a production-ready cluster. It offers similar simplicity to K3s while adding additional security and conformance layers, including Federal Information Processing Standard (FIPS) 140-2 compliance for use in the U.S. federal government and DISA STIG compliance.

RKE2 has evolved from the original RKE project. It’s also known as RKE Government, reflecting its suitability for the most demanding sectors. It’s not just government agencies that can benefit, though — the distribution is ideal for all organizations that prioritize security and compliance, so it continues to be primarily marketed as RKE2.

Similarities between K3s and RKE2

K3s and RKE2 are both lightweight Cloud Native Computing Foundation (CNCF)-certified Kubernetes distributions that Rancher fully supports. Although they diverge in their target use cases, the two platforms have several intentional similarities in how they’re launched and operated. Both can be deployed with Rancher Manager, and they each run your containers using the industry-standard containerd runtime.

Usability

K3s and RKE2 each offer good usability with a quick setup experience.

Starting a K3s cluster on a new host can be achieved with one command and around 30 seconds of waiting:

$ curl -sfL https://get.k3s.io | sudo sh -

The service is registered and started for you, so you can immediately run kubectl commands to interact with your cluster:

$ k3s kubectl get pods

RKE2 doesn’t fare much worse. A similarly straightforward installation script is available to download its binary:

$ curl -sfL https://get.rke2.io | sudo sh -

RKE2 doesn’t start its service by default. Run the following commands to enable and start RKE2 in server (control plane) mode:

$ sudo systemctl enable rke2-server.service
$ sudo systemctl start rke2-server.service

You can find the bundled kubectl binary at /var/lib/rancher/rke2/bin. It’s not added to your PATH by default; a kubeconfig file is deposited to /etc/rancher/rke2/rke2.yaml:

$ export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
$ /var/lib/rancher/rke2/bin/kubectl get pods

Ease of operation

In addition to their usability, K3s and RKE2 are simple to operate. You can upgrade clusters created with either project by repeating the installation script on each node:

# K3s
$ curl -sfL https://get.k3s.io | sh -

# RKE2
$ curl -sfL https://get.rke2.io | sh -

You should repeat any flags you supplied to the original installation command.

Automated upgrades are supported using Rancher’s system-upgrade-controller. After installing the controller, you can declaratively create Plan objects that describe how to migrate the cluster to a new version. Plan is a custom resource definition (CRD) provided by the controller.

Backing up and restoring data is another common Kubernetes challenge. K3s and RKE2 also mirror each other in this field. Snapshots are automatically written and retained for a configurable period. You can easily restore a cluster from a snapshot by running the following command:

# K3s
$ k3s server \
    --cluster-reset \
    --cluster-reset-restore-path=/var/lib/rancher/k3s/server/db/etcd-old-<BACKUP_DATE>

# RKE2
$ rke2 server \
    --cluster-reset \
    --cluster-reset-restore-path=/var/lib/rancher/rke2/server/db/etcd-old-<BACKUP_DATE>

Deployment model

K3s and RKE2 share their single-binary deployment model. They bundle all their dependencies into one download, allowing you to deploy a functioning cluster with minimal Kubernetes experience.

The projects also support air-gapped environments to accommodate critical machines that are physically separated from your network. Air-gapped images are provided in the release artifacts. Once you’ve transferred the images to your machine, running the regular installation script will bootstrap your cluster.

High availability and multiple nodes

K3s and RKE2 are designed to run in production. K3s is often used in the development, too, having gained a reputation as an ideal single-node cluster. It has robust multi-node management and is capable of supporting fleets of IoT devices.

Both projects can run the control plane with high availability, too. You can distribute replicas of control plane components over several server nodes and use external data stores instead of the embedded ones.

Differences between K3s and RKE2

K3s and RKE2 both offer single-binary Kubernetes, high availability and easy backups, with many commands interchangeable between the two. However, some key differences affect where and when they should be used. It’s these characteristics that justify the distributions existing as two independent projects.

RKE2 is closer to upstream Kubernetes

K3s is CNCF-certified, but it deviates from upstream Kubernetes in a few ways. It uses SQLite instead of etcd as its default data store, although an embedded etcd instance is available as an option in modern releases. K3s also bundles additional utilities, such as the Traefik Ingress controller.

RKE2 sticks closer to standard Kubernetes, promoting conformance as one of its main features. This gives you confidence that workloads developed for other distributions will run reliably in RKE2. It reduces the risk of inconvenient gotchas that can occur when K3s steps out of alignment with upstream Kubernetes. RKE2 automatically uses etcd for data storage and omits nonstandard components included in K3s.

RKE2 uses embedded etcd

The standard SQLite database in K3s is beneficial for compactness and can optimize performance in small clusters. In contrast, RKE2’s default use of etcd creates a more conformant experience, allowing you to integrate directly with other Kubernetes tools that expect an etcd data store.

While K3s can be configured with etcd, it’s an option you need to turn on. RKE2 is designed around it, which reduces the risk of misconfiguration and subpar performance.

K3s also supports MySQL and PostgreSQL as alternative storage solutions. These let you manage your Kubernetes data using your existing tooling for relational databases, such as backups and maintenance operations. RKE2 only works with etcd, offering no support for SQL-based storage.

RKE2 is more security-minded

RKE2 has a much stronger focus on security. Whereas edge operation is K3s’s specialism, RKE2 prioritizes security as its greatest strength.

Hardened against the CIS benchmark

The distribution comes configured for compatibility with the CIS Kubernetes Hardening Benchmark v1.23 (v1.6 in RKE2 v1.25 and earlier). The defaults that RKE2 applies allow your clusters to reach the standard with minimal manual work.

You’re still responsible for tightening the OS-level controls on your nodes. This includes applying appropriate kernel parameters and ensuring the etcd data directory is correctly protected.

You can enforce that a safe configuration is required by starting RKE2 with the profile flag set to cis-1.23. RKE2 will then exit with a fatal error if the operating system hasn’t been suitably hardened.

Beyond configuring the OS, you must also set up suitable network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies) and [Pod security admission rules] to secure your cluster’s workloads. The security admission controller can be configured to use profiles which meet the CIS benchmark. This will prevent non-compliant Pods from being deployed to your cluster.

Regularly scanned for threats

The safety of the RKE2 distribution is maintained within its build pipeline. Components are regularly scanned for new common vulnerabilities and exposures (CVEs) using the Trivy container vulnerability tool. This provides confidence that RKE2 itself isn’t harboring threats that could let attackers into your environment.

FIPS 140-2 compliant

K3s lacks any formal security accreditations. RKE2 meets the FIPS 140-2 standard that the U.S. government uses to approve cryptographic modules.

The project’s Go code is compiled using FIPS-validated crypto modules instead of the versions in the Go standard library. Each of the distribution’s components, from the Kubernetes API server through to kubelet and the bundled kubectl binary, are compiled with the FIPS-compatible compiler.

The FIPS mandate means RKE2 can be deployed in government environments and other contexts that mandate verifiable cryptographic performance. The entire RKE2 stack is compliant when you use the built-in components, such as the containerd runtime and etcd data store.

When to use K3s

K3s should be your preferred solution when you’re seeking a performant Kubernetes distribution to run on the edge. It’s also a good choice for single-node development clusters as well as ephemeral environments used in your CI pipelines and other build tools.

This distribution makes the most sense in situations where your primary objective is deploying Kubernetes with all dependencies from a single binary. It’s lightweight, quick to start and easy to manage, so you can focus on writing and testing your application.

When to use RKE2

You should use RKE2 whenever security is critical, such as in government services and other highly regulated industries, including finance and healthcare. As previously stated, the complete RKE2 distribution is FIPS 140-2 compliant and comes hardened with the CIS Kubernetes Benchmark. It’s also the only DISA STIG-certified Kubernetes distribution, meaning it’s approved for use in the most stringent U.S. government environments, including the Department of Defense.

RKE2 is fully certified and tightly aligned with upstream Kubernetes. It omits the K3s components that aren’t standard Kubernetes or that are unstable alpha features. This increases the probability that your deployments will be interoperable across different environments. It also reduces the risk of nonconformance that can occur through oversight when you’re manually hardening Kubernetes clusters.

Near edge computing is another primary use case for RKE2 over K3s. RKE2 ships with support for multiple CNI networking plugins, including Cilium, Calico, and Multus. Multus allows pods to have multiple network interfaces attached, making it ideal for use cases such as telco distribution centers and factories with several different production facilities. In these situations, it’s critical to have robust networking support with different network adapters. K3s bundles Flannel as its built-in CNI plugin; you can install a different provider, but all configuration has to be performed manually. RKE2’s default distribution provides integrated options for common networking solutions.

Conclusion

K3s and RKE2 are two popular Kubernetes distributions that overlap each other in several ways. They both offer a simple deployment experience, frictionless long-term maintenance, and high performance and compatibility.

While designed for tiny and far-edge use cases, K3s are not limited to these scenarios. It’s also widely used for development, in labs, or in resource-constrained environments. However, K3s is not focused on security, so you’ll need to secure and enforce your clusters.

RKE2 takes the usability ethos from K3s and applies it to a fully conformant distribution. It’s tailored for security, close alignment with upstream Kubernetes, and compliance in regulated environments such as government agencies. RKE2 is suitable for both data centers and near-edge situations as it offers built-in support for advanced networking plugins, including Multus.

Which you should choose depends on where your cluster will run and the workloads you’ll deploy. You should use RKE2 if you want a hardened distribution for security-critical workloads or if you need FIPS 140-2 compliance. It will help you establish and maintain a healthy security baseline. K3s remain an actively supported alternative for less sensitive situations and edge workloads. It’s a batteries-included project for when you want to focus on your apps instead of the environment that runs them.

Both distributions can be managed by Rancher and integrated with your DevOps toolbox. You can use solutions like Fleet to deploy applications at scale with GitOps strategies, then head to the Rancher dashboard to monitor your workloads.

Keeping Track of Kubernetes Deprecated Resources

Mittwoch, 9 November, 2022

It’s a fact of life: as the Kubernetes API evolves, it’s periodically reorganized or upgraded. This means some Kubernetes resources can be deprecated and later removed. We deserve to keep track of those deprecations and removals easily. For that, we have just released the new deprecated-api-versions policy for Kubewarden, our efficient Kubernetes policy engine that runs policies compiled to Wasm. This policy checks for the usage of Kubernetes resources that have been deprecated or removed from the Kubernetes API.

A look at the deprecated-api-versions policy

This policy has two settings:

  1. kubernetes_version: The starting version begins with where to detect deprecated or removed Kubernetes resources. This setting is mandatory.
  2. deny_on_deprecation: If true, it will deny the operation on a resource that has been deprecated but not yet removed from the Kubernetes version specified by kubernetes_version. This setting is optional and is set to true by default.

As an example, extensions/v1beta1/Ingress was deprecated in Kubernetes 1.14.0, and removed in v1.22.0.

With the following policy settings, the policy accepts an extensions/v1beta1/Ingress in the cluster, yet the policy logs this result:

kubernetes_version: "1.19.0"
deny_on_deprecation: false

In contrast, with these other settings, the policy blocks the Ingress object:

kubernetes_version: "1.19.0"
deny_on_deprecation: true # (the default)

Don’t live in the past

Kubernetes deprecations evolve; we will update the policy as soon as there are new deprecations. The policy versioning scheme tells you up to what version of Kubernetes the policy knows about, e.g. 0.1.0-k8sv1.26.0 means that the policy knows about deprecations up to Kubernetes v1.26.0.

Back to the future

You are about to update your cluster’s Kubernetes version and wonder, will your workloads keep working? Will you be in trouble because of deprecated or removed resources in the new version? Check before updating! Just instantiate the deprecated-api-versions policy with the targetted Kubernetes version and deny_on_deprecation set to false, and get an overview of future-you problems.

In action

As usual, instantiate a ClusterAdmissionPolicy (cluster-wide) or AdmissionPolicy (namespaced) that makes use of the policy.

For this example, let’s work in a k8s cluster of version 1.24.0.

Here’s a definition of a cluster-wide policy that rejects resources that were deprecated or removed in Kubernetes version 1.23.0 and earlier:

kubectl apply -f - <<EOF
apiVersion: policies.kubewarden.io/v1
kind: ClusterAdmissionPolicy
metadata:
  name: my-deprecated-api-versions-policy
spec:
  module: ghcr.io/kubewarden/policies/deprecated-api-versions:v0.1.0-k8sv1.26.0
  mutating: false
  rules:
  - apiGroups: ["*"]
    apiVersions: ["*"]
    resources: ["*"]
    operations:
    - CREATE
    - UPDATE
  settings:
    kubernetes_version: "1.23.0"
    deny_on_deprecation: true
EOF

Info: In spec.rules we are checking every resource in every apiGroup and apiVersions. We are doing it for simplicity in this example, yet the policy metadata.yaml comes with long and complete, machine-generated spec.rules that covers just the resources that are deprecated.

You can obtain the right rules by using the kwctl scaffold command.

Our cluster is on version 1.24.0, so for example, without the policy, we could still instantiate an autoscaling/v2beta2/HorizontalPodAutoscaler, even if it is deprecated since 1.23.0 (and will be removed in 1.26.0).

Now with the policy, trying to instantiate an autoscaling/v2beta2/HorizontalPodAutoscaler resource that is already deprecated will result in its rejection:

kubectl apply -f - <<EOF
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: php-apache
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: php-apache
  minReplicas: 1
  maxReplicas: 10
EOF

Warning: autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
Error from server: error when creating "STDIN":
admission webhook "clusterwide-my-deprecated-api-versions-policy.kubewarden.admission" denied the request:
autoscaling/v2beta2 HorizontalPodAutoscaler cannot be used. It has been deprecated starting from 1.23.0. It has been removed starting from 1.26.0. It has been replaced by autoscaling/v2.

Have ideas for new policies? Would you like more features on existing ones? Drop us a line at #kubewarden on Slack! We look forward to your feedback 🙂

Kubernetes Jobs Deployment Strategies in Continuous Delivery Scenarios

Mittwoch, 5 Oktober, 2022

Introduction

Continuous Delivery (CD) frameworks for Kubernetes, like the one created by Rancher with Fleet, are quite robust and easy to implement. Still, there are some rough edges you should pay attention to. Jobs deployment is one of those scenarios where things may not be straightforward, so you may need to stop and think about the best way to process them.

We’ll explain here the challenges you may face and will give some tips about how to overcome them.

While this blog is based on Fleet’s CD implementation, most of what’s discussed here also applies to other tools like ArgoCD or Flux.

The problem

Let’s start with a small recap about how Kubernetes objects work.

There are some elements in Kubernetes objects that are immutable. That means that changes to the immutable fields are not allowed once one of those objects is created.

A Kubernetes Job is a good example as the template field, where the actual code of the Job is defined, is immutable. Once created, the code can’t be changed. If we make any changes, we’ll get an error during the deployment.
This is how the error looks when we try to update the Job:

The Job "update-job" is invalid: spec.template: Invalid value: 
core.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", 
UID:"", ResourceVersion:"", 
.... 
: field is immutable

And this is how the error is shown on Fleet’s UI:

Job replace error as seen on Rancher Fleet

When we do deployments manually and update code within Jobs, we can delete the previous Job manually and relaunch our deployment. However, when using Continuous Delivery (CD), things should work without manual intervention. It’s critical to find a way for the CD process to run without errors and update Jobs in a way that doesn’t need manual intervention.

Thus we have reached the point where we have a new version of a Job code that needs to be deployed, and the old Job should not stop us from doing that in an automated way.

Things to consider before configuring your CD process

Our first recommendation, even if not directly related to the Fleet or Jobs update problem, is always to try using Helm to distribute applications.

Helm installation packages (called Charts) are easy to build. You can quickly build a Chart by putting together all your Kubernetes deployment files in a folder called templates plus some metadata (name, version, etc.) defined in a file called Chart.yaml.

Using Helm to distribute applications with CD tools like Fleet and ArgoCD offers some additional features that can be useful when dealing with Job updates.

Second, In terms of how Jobs are implemented and their internal logic behaves, they must be designed to be idempotent. Jobs are meant to be run just once, and if our CD process manages to update and recreate them on each run, we need to be sure that relaunching them doesn’t break anything.

Idempotency is an absolute must while designing Kubernetes CronJobs, but all those best practices should also be applied here to avoid undesired side effects.

Solutions

Solution 1: Let Jobs self-destroy after execution

The process is well described in Kubernetes documentation:

“A way to clean up finished Jobs automatically is to use a TTL mechanism provided by a TTL controller for finished resources, by specifying the spec.ttlSecondsAfterFinished field of the Job”

Example:

apiVersion: batch/v1
kind: TestJob
metadata:
  name: job-with-ttlsecondsafterfinished
spec:
  ttlSecondsAfterFinished: 5
  template:
    spec:
...

When we add ttlSecondsAfterFinished to the spec, the TTL controller will delete the Job once it finishes. If the field is not present or the value is empty, the Job won’t be deleted, following the traditional behavior. A value of 0 will fire the deletion just after it finishes its execution. An integer value greater than 0 will define how many seconds will pass after the execution before the Job is deleted. This new feature has been stable since Kubernetes 1.23.

While this seems a pretty elegant way to clean finished jobs (future runs won’t complain about the update of immutable resources), it creates some problems for the CD tools.

The entire CD concepts rely on the fact that our external repos holding our application definition are the source of truth. That means that CD tools are constantly monitoring our deployment and notifying us about changes.

As a result, Fleet detects a change when the Job is deleted, so the deployment is marked as “Modified”:

Rancher Fleet modified Git repo

If we look at the details, we can see how Fleet detected that the Job is missing:

Rancher Fleet modified Git repo details

The change can also be seen in the corresponding Fleet Bundle status:

...
status:
  conditions:
  - lastUpdateTime: "2022-10-02T19:39:09Z"
    message: Modified(2) [Cluster fleet-default/c-ntztj]; job.batch fleet-job-with-ttlsecondsafterfinished/job-with-ttlsecondsafterfinished
      missing
    status: "False"
    type: Ready
  - lastUpdateTime: "2022-10-02T19:39:10Z"
    status: "True"
    type: Processed
  display:
    readyClusters: 0/2
    state: Modified
  maxNew: 50
  maxUnavailable: 2
  maxUnavailablePartitions: 0
  observedGeneration: 1
...

This solution is really easy to implement, with the only drawback of having repositories marked as Modified, which may be confusing over time.

Solution 2: Use a different Job name on each deployment

Here is when Helm comes to our help.

Using Helm’s processing, we can easily generate a random name for the Job each time Fleet performs an update. The old Job will also be removed as it’s no longer in our Git repository.

apiVersion: batch/v1
kind: Job
metadata:
  name: job-with-random-name-{{ randAlphaNum 8 | lower }}
  labels:
    realname: job-with-random-name
spec:
  template:
    spec:
      restartPolicy: Never
...

Summary

We hope what we have shared here helps to understand better how to manage Jobs in CD scenarios and how to deal with changes on immutable objects.

The code examples used in this blog are available on our GitHub repository: https://github.com/SUSE-Technical-Marketing/fleet-job-deployment-examples

If you have other scenarios that you’d want us to cover, we’d love to hear them and discuss ideas that can help improve Fleet in the future.

Please join us at the Rancher’s community Slack channel for Fleet and Continuous Delivery or at the CNCF official Slack Channel for Rancher.

Tags: ,,, Category: Containers, Rancher Blog Comments closed

Epinio and Crossplane: the Perfect Kubernetes Fit

Donnerstag, 18 August, 2022

One of the greatest challenges that operators and developers face is infrastructure provisioning: it should be resilient, reliable, reproducible and even audited. This is where Infrastructure as Code (IaC) comes in.

In the last few years, we have seen many tools that tried to solve this problem, sometimes offered by the cloud providers (AWS CloudFormation) or vendor-agnostic solutions like Terraform and Pulumi. However, Kubernetes is becoming the standard for application deployment, and that’s where Crossplane fits in the picture. Crossplane is an open source Kubernetes add-on that transforms your cluster into a universal control plane.

The idea behind Crossplane is to leverage Kubernetes manifests to build custom control planes that can compose and provision multi-cloud infrastructure from any provider.

If you’re an operator, its highly flexible approach gives you the power to create custom configurations, and the control plane will track any change, trying to keep the state of your infrastructure as you configured it.

On the other side, developers don’t want to bother with the infrastructure details. They want to focus on delivering the best product to their customers, possibly in the fastest way. Epinio is a tool from SUSE that allows you to go from code to URL in just one push without worrying about all the intermediate steps. It will take care of building the application, packaging your image, and deploying it into your cluster.

This is why these two open source projects fit perfectly – provisioning infrastructure and deploying applications inside your Kubernetes platform!

Let’s take a look at how we can use them together:

# Push our app 
-> % epinio push -n myapp -p assets/golang-sample-app 

# Create the service 
-> % epinio service create dynamodb-table mydynamo 

# Bind the two 
-> % epinio service bind mydynamo myapp 

That was easy! With just three commands, we have:

  1. Deployed our application
  2. Provisioned a DynamoDB Table with Crossplane
  3. Bound the service connection details to our application

Ok, probably too easy, but this was just the developer’s perspective. And this is what Epinio is all about: simplifying the developer experience.

Let’s look at how to set up everything to make it work!

Prerequisites

I’m going to assume that we already have a Kubernetes cluster with Epinio and Crossplane installed. To install Epinio, you can refer to our documentation. This was tested with the latest Epinio version v1.1.0, Crossplane v.1.9.0 and the provider-aws v0.29.0.

Since we are using the enable-external-secret-stores alpha feature of Crossplane to enable it, we need to provide the args={--enable-external-secret-stores} value during the Helm installation:

-> % helm install crossplane \
    --create-namespace --namespace crossplane-system \
    crossplane-stable/crossplane \
    --set args={--enable-external-secret-stores}

 

Also, provide the same argument to the AWS Provider with a custom ControllerConfig:

apiVersion: pkg.crossplane.io/v1alpha1
kind: ControllerConfig
metadata:
  name: aws-config
spec:
  args:
  - --enable-external-secret-stores
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: crossplane-provider-aws
spec:
  package: crossplane/provider-aws:v0.29.0
  controllerConfigRef:
    name: aws-config

 

Epinio services

To use Epinio and Crossplane together, we can leverage the Epinio Services. They provide a flexible way to add custom resources using Helm charts. The operator can prepare a Crossplane Helm chart to claim all resources needed. The Helm chart can then be added to the Epinio Service Catalog. Finally, the developers will be able to consume the service and have all the needed resources provisioned.

 

Prepare our catalog

We must prepare and publish our Helm chart to add our service to the catalog.

In our example, it will contain only a simple DynamoDB Table. In a real scenario, the operator will probably define a claim to a Composite Resource, but for simplicity, we are using some Managed Resource directly.

For a deeper look, I’ll invite you to take a look at the Crossplane documentation about composition.

We can see that this resource will „publish“ its connection details to a secret defined with the publishConnectionDetailsTo attribute (this is the alpha feature that we need). The secret and the resource will have the app.kubernetes.io/instance label with the Epinio Service instance name. We can correlate the two with this label as Epinio services and configurations.

apiVersion: dynamodb.aws.crossplane.io/v1alpha1
kind: Table
metadata:
  name: {{ .Release.Name | quote }}
  namespace: {{ .Release.Namespace | quote }}
  labels:
    app.kubernetes.io/instance: {{ .Release.Name | quote }}
spec:
  publishConnectionDetailsTo:
    name: {{ .Release.Name }}-conn
    metadata:
      labels:
        app.kubernetes.io/instance: {{ .Release.Name | quote }}
      annotations:
        kubed.appscode.com/sync: "kubernetes.io/metadata.name={{ .Release.Namespace }}"
  providerConfigRef:
    name: aws-provider-config
  forProvider:
    region: eu-west-1
    tags:
    - key: env
      value: test
    attributeDefinitions:
    - attributeName: Name
      attributeType: S
    - attributeName: Surname
      attributeType: S
    keySchema:
    - attributeName: Name
      keyType: HASH
    - attributeName: Surname
      keyType: RANGE
    provisionedThroughput:
      readCapacityUnits: 7
      writeCapacityUnits: 7

 

Note: You can see a kubed annotation in this Helm chart. This is because the generated secrets need to be in the same namespace as the services and applications. Since we are using directly a managed resource then the secret will be in the namespace defined in the default StoreConfig (the crossplane-system  namespace). We are using kubed to copy this secret in the release namespace.
https://github.com/crossplane/crossplane/blob/master/design/design-doc-external-secret-stores.md#secret-configuration-publishconnectiondetailsto

 

We can now package and publish this Helm chart to a repository and add it to the Epinio Service Catalog by applying a service manifest containing the information on where to fetch the chart.

The application, .epinio.io/catalog-service-secret-types, define the list of the secret types that Epinio should look for. Crossplane will generate the secrets with their own secret type, so we need to explicit it.

apiVersion: application.epinio.io/v1
kind: Service
metadata:
  name: dynamodb-table
  namespace: epinio
  annotations:
    application.epinio.io/catalog-service-secret-types: connection.crossplane.io/v1alpha1
spec:
  name: dynamodb-table
  shortDescription: A simple DynamoDBTable that can be used during development
  description: A simple DynamoDBTable that can be used during development
  chart: dynamodb-test
  chartVersion: 1.0.0
  appVersion: 1.0.0
  helmRepo:
    name: reponame
    url: https://charts.example.com/reponame
  values: ""

 

Now we can see that our custom service is available in the catalog:

-> % epinio service catalog

Create and bind a service

Now that our service is available in the catalog, the developers can use it to provision DynamoDBTables with Epinio:

-> % epinio service create dynamodb-table mydynamo

We can check that a dynamo table resource was created and that the corresponding table is available on AWS:

-> % kubectl get tables.dynamodb.aws.crossplane.io
-> % aws dynamodb list-tables

We can now create an app with the epinio push command. Once deployed, we can bind it to our service with the epinio service bind:

-> % epinio push -n myapp -p assets/golang-sample-app
-> % epinio service bind mydynamo myapp
-> % epinio service list

And that’s it! We can see that our application was bound to our service!

The bind command did a lot of things. It fetched the secrets generated by Crossplane and labeled them as Configurations. It also redeployed the application mounting these configurations inside the container.

We can check this with some Epinio commands:

-> % epinio configuration list

-> % epinio configuration show x937c8a59fec429c4edeb339b2bb6-conn

The shown access path is available in the application container. We can use exec in the app and see the content of that files:

-> % epinio app exec myapp

 

Conclusion

In this blog post, I’ve shown you it’s possible to create an Epinio Service that will use Crossplane to provide external resources to your Epinio application. We have seen that once the heavy lifting is done, the provision of a resource is just a matter of a couple of commands.

While some of these features are not ready, the Crossplane team is working hard on them, and I think they will be available soon!

Next Steps: Learn More at the Global Online Meetup on Epinio

Join our Global Online Meetup: Epinio on Wednesday, September 14th, 2022, at 11 AM EST. Dimitris Karakasilis and Robert Sirchia will discuss the Epinio GA 1.0 release and how it delivers applications to Kubernetes faster, along with a live demo! Sign up here.

Secure Supply Chain: Verifying Image Signatures in Kubewarden

Freitag, 20 Mai, 2022

Secure Supply Chain: Verifying image signatures

 

After these last releases Kubewarden now has support for verifying the integrity and authenticity of artifacts within Kubewarden using the Sigstore project. In this post, we shall focus on verifying container image signatures using the new verify-image-signatures policy.

To learn more about how Sigstore works, take a look at our previous post

Verify Image Signatures Policy

This policy validates Pods by checking their container images for signatures (that is, containers, init containers and ephemeral containers in the pod)

The policy can inspect all the container images defined inside of a Pod or it can just analyze the ones that are matching a pattern provided by the user.

Container image tags are mutable, they can be changed to point to a completely different content. That’s why it’s a good security practice to reference container images by their immutable checksum.

This policy can rewrite the image definitions that are using a tag to instead reference the image by its checksum.

The policy will:

  • Ensure the image referenced by a tag is satisfying the signature requested by the operator
  • Extract the immutable reference of the image from the signatures
  • Rewrite the image reference to be in the form <image ref>@sha256:<digest>

Let’s see it in action!

For this example, a Kubernetes cluster with Kubewarden already installed is required. The installation process is described in the quick start guide.

We need an image with a signature that we can verify. You can use cosign to sign your images. For this example we’ll use the image ghcr.io/viccuad/app-example:v0.1.0 that was signed using keyless verification.

Obtain the issuer and subject using cosign.

COSIGN_EXPERIMENTAL=1 cosign verify ghcr.io/viccuad/app-example:v0.1.0
...
"Issuer": "https://token.actions.githubusercontent.com",
"Subject": "https://github.com/viccuad/app-example/.github/workflows/ci.yml@refs/tags/v0.1.0"
...

Let’s create a cluster-wide policy that will verify all images, and let’s use the issuer and subject for verification:

kubectl apply -f - <<EOF
apiVersion: policies.kubewarden.io/v1alpha2
kind: ClusterAdmissionPolicy
metadata:
  name: verify-image-signatures
spec:
  module: ghcr.io/kubewarden/policies/verify-image-signatures:v0.1.4
  rules:
  - apiGroups: [""]
    apiVersions: ["v1"]
    resources: ["pods"]
    operations:
    - CREATE
    - UPDATE
  mutating: true
  settings:
    signatures:
      - image: "*"
        keyless:
          - issuer: "https://token.actions.githubusercontent.com"
            subject: "https://github.com/viccuad/app-example/.github/workflows/ci.yml@refs/tags/v0.1.0"
EOF

Wait for the policy to be active:

kubectl wait --for=condition=PolicyActive clusteradmissionpolicies verify-image-signatures

Verify we can create pods with containers that are signed:

kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: verify-image-valid
spec:
  containers:
  - name: test-verify-image
    image: ghcr.io/viccuad/app-example:v0.1.0
EOF

Then check that the image was modified with the digest:

kubectl get pod verify-image-valid -o=jsonpath='{.spec.containers[0].image}'

This will produce the following output:

ghcr.io/viccuad/app-example:v0.1.0@sha256:d97d00f668dc5b7f0af65edbff6b37924c8e9b1edfc0ab0f7d2e522cab162d38

Finally, let’s try to create a pod with an image that it is not signed:

kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: verify-image-invalid
spec:
  containers:
  - name: test-verify-image
    image: ghcr.io/kubewarden/test-verify-image-signatures:unsigned
EOF

We will get the following error:

Error from server: error when creating "STDIN": admission webhook "clusterwide-verify-image-signatures.kubewarden.admission" denied the request: Pod verify-image-invalid is not accepted: verification of image ghcr.io/kubewarden/test-verify-image-signatures:unsigned failed: Host error: Callback evaluation failure: no signatures found for image: ghcr.io/kubewarden/test-verify-image-signatures:unsigned 

Recap

This policy is designed to meet all your needs. However, if you prefer you can build your own policy using one of the SDKs Kubewarden provides. We will show how to do this in an upcoming blog! Stay tuned!

Tags: Category: Community page, Kubernetes, Kubernetes, Kubernetes, Kubernetes Comments closed