No project description provided
Project description
README.md
About tool
This tool can be used to create and push a docker image from local or open remote directory to docker hub(can be private). For local directories, tool will create a persistent-volume, persitent-volume-claim, and kaniko-pod temporary and all will be deleted once the image has been pushed to the docker hub.
Installation
pip install kaniko_deploy
pre-requisites
Make sure you have connection with kubernetes : *for remote kubenetes obtain kubernetes config file and set it's path to env var KUBECONFIG ,(else keep it at respective OS ~/.kube/config path)
For local dirs, the directories should be mounted
if using minikube, then mount using minikube mount $WORKDIR:/<your-kube-work-dir>
steps
1. For local directories open the terminal wherever your project is (anywhere for remote directories)
2. either create python3.12 virtual env and then install the kaniko_build(recommended) or can be installed globally also
3. you can opt to create volume.yaml, volume-claim.yaml (once for each project) so to provide configs as user's requirements or wish else you by default some values will be taken if not provided by optional flags (like pvc storage, pod name, ..etc)
4. refer the below mentioned few example commands as per your requirements or you can use --help flag
replace the username, email and docker repo with yours (if docker secrets are not present then password will be asked for first time)
Exmaple command
-
for remote directories
python -m kaniko_deploy deploy --context_dir=git://github.com//Imoustak/kaniko-build-demo.git --docker_filepath=dockerfile --docker_username=<your-docker-username> --docker_email=<your-docker-email> --docker_repo=<your-repo> -
Running in you current dir WITH volume.yaml & volume-claim.yaml files
python -m kaniko_deploy deploy --context_dir=. --docker_filepath=Dockerfile --docker_username=<your-docker-username> --docker_email=<your-docker-email> --docker_repo=<your-repo> --read_manifest
Running in you current dir WITHOUT volume.yaml & volume-claim.yaml files
python -m kaniko_deploy deploy --context_dir=. --docker_filepath=Dockerfile --docker_username=<your-docker-username> --docker_email=<your-docker-email> --docker_repo=<your-repo>
Note: Currently this is desgined for namespace default only, can be further editted to handle dynamic namespaces Secret name for docker-registry is considered as "docker-registry-secret" ans it is not deleted after process
to do
- add function to get logs if got any errors from k8 while in process
- add caching for kaniko
- add custom exceptions and terminate gracefully
- add functionality for aws or any other cloud volume mount
- check other kaniko flags(or features) to imporve this tool
- write test cases
- logs
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kaniko_deploy-1.2.tar.gz.
File metadata
- Download URL: kaniko_deploy-1.2.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9682fcb6fda128ba1f2e763a0f78846b0bc58e77c636642bdf6e599ebbbc88d7
|
|
| MD5 |
b8fbd47869505f305bfea23c5db95930
|
|
| BLAKE2b-256 |
ce232843eb48f292687af58867a57f99488cdd81ab1f7b13dcb09d7be59f7c75
|
File details
Details for the file kaniko_deploy-1.2-py3-none-any.whl.
File metadata
- Download URL: kaniko_deploy-1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53958fd50e14b4d8a9eb9b7bb66043b9f3a48db7fcbd5f40b26910030bbaa27c
|
|
| MD5 |
d62af9c849b25fcd66e1eda95da09867
|
|
| BLAKE2b-256 |
3d7cf6bf4766a7ebd047e7153c2d0fc7d688d6b55b62500f8c2013fba8dec332
|