Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clastix/kubectl
Kubernetes CLI running in a container. ARM supported.
https://github.com/clastix/kubectl
Last synced: 12 days ago
JSON representation
Kubernetes CLI running in a container. ARM supported.
- Host: GitHub
- URL: https://github.com/clastix/kubectl
- Owner: clastix
- License: apache-2.0
- Created: 2021-06-05T10:16:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-17T20:07:06.000Z (5 months ago)
- Last Synced: 2024-11-07T09:47:04.418Z (2 months ago)
- Language: Makefile
- Homepage:
- Size: 181 KB
- Stars: 7
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
# Kubectl
Your [k8s](https://kubernetes.io) cluster swiss army knife, running in a container.
## Why should you use this?
Because this kubectl image is :
- lightweight
- secure
- multi-archNew stable versions will be built and pushed automatically by *GitHub action* [workflow](https://github.com/clastix/kubectl/blob/master/.github/workflows/docker-ci.yml).
### Supported tags
| kubectl | amd64 | arm64 | armv7 |
| :---: | :---: | :---: | :---: |
|v1.27.2| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.26.4| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.25.4| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.24.1| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.23.1| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.22.2| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.21.5| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.20.11| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.19.15| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.18.20| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.17.17| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|v1.16.15| :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |Keep watching our [quay.io](https://quay.io/repository/clastix/kubectl) repository for the latest updates!
---
## Quickstart
### Prerequisites
Make sure you have a containerization software (e.g. _[Docker](https://www.docker.com/)_ ) installed on your device :
```bash
$ docker versionClient: Docker Engine - Community
Cloud integration: 1.0.14
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:46:45 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
[...]
```### Take our image
Just pull the desired version from [quay.io](https://quay.io/repository/clastix/kubectl) :
```bash
$ docker pull quay.io/clastix/kubectl:
```OR
### Build your image
running :
```bash
$ docker build . -t foo.io/bar/kubectl: --build-arg KUBECTL_VERSION= --build-arg TARGETARCH=
```or using **make** utility :
```bash
$ make docker-build
```
**N.B.** if you like, you can choose desired kubectl version and target architecture as follow :```bash
$ export KUBECTL_VERSION=
$ export TARGETARCH=
```
otherwise, Makefile will automatically retrieve its default values.### Launch a container
```bash
$ docker run --name kubectl quay.io/clastix/kubectl:v1.22.2 versionClient Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:38:50Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.5", GitCommit:"aea7bbadd2fc0cd689de94a54e5b7b758869d691", GitTreeState:"clean", BuildDate:"2021-09-15T21:04:16Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"}
```you can also use your own _kubeconfig_
```bash
$ docker run --name kubectl -v ~/.kube/config:/home/nonroot/.kube/config quay.io/clastix/kubectl: get nodesNAME STATUS ROLES AGE VERSION
controlplane-00 Ready control-plane,master 13d v1.21.5
controlplane-01 Ready control-plane,master 13d v1.21.5
controlplane-02 Ready control-plane,master 13d v1.21.5
worker-00 Ready 13d v1.21.5
worker-01 Ready 13d v1.21.5
worker-02 Ready 13d v1.21.5
```### Removal
To clean up, just :1. Remove your kubectl container :
```bash
$ docker rm kubectl
```3. Remove your kubectl image :
```bash
$ docker rmi -f quay.io/clastix/kubectl:
```## FAQ
- Q. Does it work on my architecture?A. We successfully tested it on amd and arm architectures; have a look at "[Supported tags'](https://github.com/clastix/kubectl#supported-tags)" section for more information.
- Q. Can I contribute?
A. Absolutely!
## License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at :
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.