openapi2smd command not found

In this troubleshooting guide we learn how to fix openapi2smd command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

openapi2smd: command not found

or when using sudo you get the following error message

sudo: openapi2smd: command not found

Solutions to openapi2smd: command not found

How To Fix openapi2smd: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu openapi2smd is provided by kube-openapi package.

kube-openapi is:

Kube OpenAPI This repo is the home for Kubernetes OpenAPI discovery spec generation. The goal is to support a subset of OpenAPI features to satisfy kubernetes use-cases but implement that subset with little to no assumption about the structure of the code or routes. Thus, there should be no kubernetes specific code in this repo.

There are two main parts:

  • A model generator that goes through .go files, find and generate model definitions.
  • The spec generator that is responsible for dynamically generate the final OpenAPI spec using web service routes or combining other OpenAPI/Json specs. Contributing Please see CONTRIBUTING.md (CONTRIBUTING.md) for instructions on how to contribute.

To fix this problem, we can install more using the command below.

sudo apt-get -y install kube-openapi

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install kube-openapi.

sudo apt -y install kube-openapi

Or if you have aptitude installed you can use the following command.

sudo aptitude install kube-openapi

Summary

In this tutorial we learn how to fix openapi2smd command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.