Kubectl is the Kubernetes command line interface.
$ docker run --name kubectl mikkra/kubectl:latest
The recommended way to get the Kubectl Docker Image is to pull the prebuilt image from the Docker Hub Registry.
$ docker pull mikkra/kubectl:latest
To use a specific version, you can pull a versioned tag. You can view the list of available versions in the Docker Hub Registry.
$ docker pull mikkra/kubectl:[TAG]
If you wish, you can also build the image yourself.
$ docker build -t mikkra/kubectl:latest 1.17/debian-10
To run commands inside this container you can use docker run, for example to execute kubectl version you can follow the example below:
$ docker run --rm --name kubectl mikkra/kubectl:latest version
Consult the Kubectl Reference Documentation to find the completed list of commands available.
It's possible to load your own configuration, which is useful if you want to connect to a remote cluster:
$ docker run --rm --name kubectl -v /path/to/your/kube/config:/.kube/config mikkra/kubectl:latest
This dockerfile is forked from bitnami
Copyright 2020 mikkra (Mikhail K.)
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.
Content type
Image
Digest
Size
46.1 MB
Last updated
over 5 years ago
docker pull xaked/kubectl