Home Blog Page 362

Kubernetes Recipes: Maintenance and Troubleshooting

This is a full chapter from “Kubernetes Cookbook”—read the full book on O’Reilly’s learning platform.

In this chapter, you will find recipes that deal with both app-level and cluster-level maintenance. We cover various aspects of troubleshooting, from debugging pods and containers, to testing service connectivity, interpreting a resource’s status, and node maintenance. Last but not least, we look at how to deal with etcd, the Kubernetes control plane storage component. This chapter is relevant for both cluster admins and app developers.

Enabling Autocomplete for kubectl

Problem

It is cumbersome to type full commands and arguments for the kubectl command, so you want an autocomplete function for it.

Solution

Enable autocompletion for kubectl.

For Linux and the bash shell, you can enable kubectl autocompletion in your current shell using the following command:

$ source <(kubectl completion bash)

For other operating systems and shells, please check the documentation.

See Also

Read more at O’Reilly

Flatcar Linux: The CoreOS Operating System Lives on Beyond Red Hat

During the last KubeCon + CloudNativeCon in Copenhagen, attendees were re-introduced to Kinvolk, a Berlin-based group of open source contributors, including Chris Kühl, who were early contributors to the rkt container runtime devised at CoreOS and since donated to the CNCF. Now, Kühl and his colleagues have committed to producing and maintaining a fork of CoreOS Container Linux. Called Flatcar Linux, its immediate goal is to maintain its container-agnostic architecture, and maybe later try resuming its own development path.

“With Container Linux, CoreOS created an OS that is pretty close to ideal for cloud-native infrastructure,” stated Kühl in a note to The New Stack. “When the acquisition was announced, there was a lot of confusion about what would happen to it. Thus with Flatcar Linux, we first wanted to ease those concerns by offering a drop-in replacement.

“But Flatcar Linux was likely to happen even before the acquisition was announced,” he continued. “We had been getting requests to support Container Linux and, as we mention in the FAQ, we didn’t see any means of providing commercial support for an OS without controlling the full build pipeline and maintaining it.”

Rebooting the Bootstrap

On April 30, the Kinvolk group officially released Flatcar Linux as a public project, with its own repository.  A check of the first draft of its documentation reveals the group is obviously continuing CoreOS’ work in making container configuration files easier for human beings to produce. 

Read more at The New Stack

How to Get Involved with Hyperledger Projects

Few technology trends have as much momentum as blockchain — which is now impacting industries from banking to healthcare. The Linux Foundation’s Hyperledger Project is helping drive this momentum as well as providing leadership around this complex technology, and many people are interested in getting involved. In fact, Hyperledger nearly doubled its membership in 2017 and recently added Deutsche Bank as a new member.  

A recent webinar, Get Involved: How to Get Started with Hyperledger Projects, focuses particularly on making Hyperledger projects more approachable. The free webinar is now available online and is hosted by David Boswell, Director of Ecosystem at Hyperledger and Tracy Kuhrt, Community Architect.

Hyperledger Fabric, Sawtooth, and Iroha

Hyperledger currently consists of 10 open source projects, seven that are in incubation and three that have graduated to active status.  “The three active projects are Hyperledger Fabric, Hyperledger Sawtooth, and Hyperledger Iroha,” said Boswell.

Fabric is a platform for distributed ledger solutions, underpinned by a modular architecture. “One of the major features that Hyperledger Fabric has is a concept called channels. Channels are a private sub-network of communication between two or more specific network members for the purpose of conducting private and confidential transactions.”

According to the website, Hyperledger Iroha is designed to be easy to incorporate into infrastructural projects requiring distributed ledger technology. It features simple construction, with emphasis on mobile application development.

Hyperledger Sawtooth is a modular platform for building, deploying, and running distributed ledgers, and you can find out more about it in this post.  One of the main attractions Sawtooth offers is “dynamic consensus.”

“This allows you to change the consensus mechanism that’s being used on the fly via a transaction, and this transaction, like other transactions, gets stored on the blockchain,” said Boswell. “With Hyperledger Sawtooth, there are ways to explicitly let the network know that you are making changes to the same piece of information across multiple transactions. By being able to provide this explicit knowledge, users are able to update the same piece of information within the same block.”

Sawtooth can also facilitate smart contracts. “You can write your smart contract in a number of different languages, including C++ JavaScript, Go, Java, and Python,” said Boswell. Demonstrations and resources for Sawtooth are available here:

How to contribute to Hyperledger projects

In the webinar, Kuhrt and Boswell explain how you can contribute to Hyperledger projects. “All of our working groups are open to anyone that wants to participate, including the training and education working group,” said Kuhrt. “This particular working group meets on a biweekly basis and is currently working to determine where it can have the greatest impact. I think this is really a great place to get in at the start of something happening.”

What are the first steps if you want to make actual project contributions? “The first step is to explore the contributing guide for a project,” said Kuhrt. “All open source projects have a document at the root of their source directory called contributing, and these guides are really to help you find information about how you’d file a bug, what kind of coding standards are followed by the project, where to find the code, where to look for issues that you might start working with, and requirements for pull requests.”

Now is a great time to learn about Hyperledger and blockchain technology, and you can find out more in the next webinar coming up May 31:

Blockchain and the enterprise. But what about security?

Date: Thursday, May 31, 2018

Time: 10:00 AM Pacific Daylight Time

This talk will leave you with understanding how Blockchain does, and does not, change the security requirements for your enterprise. Sign up now!

Submit to Speak at Hyperledger Global Forum

Hyperledger Global Forum will offer the unique opportunity for more than 1,200 users and contributors of Hyperledger projects from across the globe to meet, align, plan, and hack together in-person. Share your expertise and speak at Hyperledger Global Forum! We are accepting proposals through Sunday, July 1, 2018. Submit Now >>

This article originally appeared on The Linux Foundation

New Keynotes & Executive Leadership Track Announced for LinuxCon + ContainerCon + CloudOpen China

We’re pleased to announce numerous hosted workshops at LinuxCon + ContainerCon + CloudOpen China (LC3). taking place in Beijing, June 25 – 27, which provide attendees with the opportunity to learn and experience even more.

Hosted Events at LC3:

Read more at The Linux Foundation

Reports Of The Impending Demise Of Operations Are Greatly Exaggerated

Our industry has spent the past 7-8 years proclaiming the need for better integration of Dev and Ops to improve flow and quality. Despite this work — or perhaps because of it — there is a new rift forming between Dev and Ops.

Once upon a time, Developers had to be convinced that they should even care about operational concerns. But now, here we are in the middle of 2018, and there is a growing segment of Devs who proclaim that Ops is a thing of the past, won’t exist in the future, and good riddance. “Ops is dead.” “Containers and Serverless make Ops unnecessary.” “Just give us a login and get out of our way.”

Of course — like everything else in our industry — the tooling, the tasks, the organizational boundaries, and even the name of Operations are changing. But these assertions about the demise of Operations as a distinct craft and professional role are unrealistic and somewhat naive….

Developers have historically held a reductionist view that deployment equals operations. This view is that deployment is the finish line and if there is a problem then just deploy it again with a different version. To be fair, in the smallest of organizations (i.e., a handful of devs working in cloud infrastructure) or the largest of organizations (siloed development team building a single component of a much larger system), this is the daily view of the developer.

However, spend some time in larger enterprises, and there is a broad range of necessary day-to-day operations activities that aren’t code deployments. It is a huge list that includes responding to alerts, investigating performance, capacity planning, responding to ad-hoc business requests, managing caches, managing CDNs, configuring DNS services, managing SSL certs, managing proxies, managing firewalls/networks, running message systems, and more.

Read more at Rundeck

Software-Defined Storage or Hyperconverged Infrastructure?

It’s easy to get software-defined storage (SDS) confused with hyperconverged infrastructure (HCI). Both solutions “software-define” the infrastructure and abstract storage from the underlying hardware. They both run on commodity servers and pair well with virtualization. Reporters, analysts, vendors and even seasoned IT professionals talk about them in the same breath.

But there are important distinctions between HCI and SDS. It comes down to how you want to manage your storage. SDS requires deep storage expertise; HCI does not. While there are some differences in capital costs, there is much more in operational costs. More so, each solves different problems and fits best for different use cases.

To start, let’s take a deeper look at what makes HCI and SDS different….

Software-defined storage (SDS) abstracts the management of physical storage, typically by creating a shared storage pool using industry-standard servers. It frees you from legacy storage arrays, or masks them underneath a software layer. That storage is managed separately from the compute and hypervisor layer.

Read more at The New Stack

How to Use the Linux watch Command for Easier Output Tracking

Jack Wallen introduces you to a Linux command that can automatically execute a program repeatedly, so you can easily monitor the output for troubleshooting.

The watch command comes installed, by default, on nearly all Linux distributions and is a very useful tool to have at the ready. I want to introduce you to watch, so that it can help you with your Linux admin tasks.

What watch does

The watch command allows you to execute a program periodically, displaying the output of the command at specific intervals. Consider watch to be similar to that of using the tail command to view log files, only the output doesn’t come from a file, but another command. With this, you can watch the output of the command change over time. Out of the box, the program will execute every two seconds. So if you want to watch the output of the date command change every two seconds, you’d issue it like so:

watch date

The watch command would execute the date command every two seconds, displaying the output in the terminal window…

Read more at TechRepublic

How to Get Your KubeCon + CloudNativeCon Talk Accepted

Earlier this month, KubeCon + CloudNativeCon held its largest-ever event in Copenhagen, with 4,300 attendees. This week, we opened the call for proposals (CFP) for both Shanghai (Nov. 14-15) and Seattle (Dec. 11-13). 

So, how do we choose the talks and what can you do to increase your chances of being accepted?

First, it’s helpful to understand the different categories of talks and how they’re selected. The key principle is that we want talk selection to be meritocratic and vendor-neutral, while also ensuring that new voices have a chance to be heard….

  • Avoid the common pitfall of submitting a sales or marketing pitch for your product or service, no matter how compelling it is.
  • Focus on your work with an open source project, whether it is one of the CNCF’s 22 hosted projects or a new project that adds value to the cloud native ecosystem.
  • KubeCon + CloudNativeCon is fundamentally a community conference focusing on the development of cloud native open source projects. So, pick your presenter and target audience accordingly. Our participants range from the top experts to total beginners, so we explicitly ask what level of technical difficulty your talk is targeted for (beginner, intermediate, advanced, or any) and aim to provide a range.

Read more at CNCF

Re-Creating the First Flip-Flop

The flip-flop is a crucial building block of digital circuits: It acts as an electronic toggle switch that can be set to stay on or off even after an initial electrical control signal has ceased. This allows circuits to remember and synchronize their states, and thus allows them to perform sequential logic.

The flip-flop was created in the predigital age as a trigger relay for radio designs. Its existence was popularized by an article in the December 1919 issue of The Radio Review [PDF], and two decades later, the flip-flop would find its way into the Colossus computer [PDF], used in England to break German wartime ciphers, and into the ENIAC in the United States.

Modern flip-flops are built in countless numbers out of transistors in integrated circuits, but, as the centenary of the flip-flop approached, I decided to replicate Eccles and Jordan’s original circuit as closely as possible.

Read more at IEEE Spectrum

This Week in Open Source News: The Linux Foundation Joins IBM In Pledging to Help Combat Natural Disasters

This week in open source and Linux news, The Linux Foundation joins IBM, the United Nations, and others in supporting an effort to use technology to better predict natural disasters. Read on for other top stories from this past week!

1) “IBM is calling on the global public and private sectors, including the United Nations and the Linux Foundation, to unite in finding ways of using advanced technology as a means of combating natural disasters as well as humanitarian issues.”

IBM pledges $30M, Calls for Coders to Join Global Effort Combating Natural Disasters– WRAL Tech Wire

2) Hyperledger as a banking reward? AmEx’s benefits portfolio gets a 2018 tech makeover. 

American Express Integrates Blockchain To Its Membership Rewards Program– CoinTelegraph

3) “[Tesla] is known to be using many GPL-licensed technologies that need [the company] to share the source code of their software.”

Tesla Starts Open Sourcing Some Software Code After Facing Criticism– FOSSBytes

4) Following the release of Zuul v3, the project will be “decoupled” from OpenStack and run as an independent one.

OpenStack Spins Out its Zuul Open Source CI/CD Platform– TechCrunch

5)”Tidelift wants to give open-source developers a way to earn some money for contributing to important open-source projects and while helping the companies that are using those projects in key parts of their business.”

Tidelift Raises $15M to Find Paying Gigs for Open-Source Developers Maintaining Key Projects– GeekWire