Skip to content

cuishuaigit/kaniko-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kaniko-image

kaniko image k8s

Requirements

kaniko-secret this is created by kubectl,just for your private registry auth. you can execute docker login then you can get a config.json in HOME/.docker

kubectl create namespace kaniko

kubectl create secret generic kaniko-secret --from-file=/root/.docker/config.json  -n kaniko

kubectl label node  $NODENAME  kaniko=enabled

kubectl taint node $NODENAME  kaniko=enabled:NoSchedule

Usage

git pull your own repo, you must build a image with ssh private key.and replace the default image alpine/git in the source code.

go build 

Usage of ./kaniko-image:

   -c  string
    	(optional) absolute path to the kubeconfig file (default "/root/.kube/config")
   -n string
     	namespace (default "default")
   -p string
    	projrct name
   -r string
        registry name
   -repo string
    	provide a repo of your project

Example

kaniko-image -n kaniko -p spin-kub-demo -repo https://github.com/cuishuaigit/spin-kub-demo.git -r fastop/kaniko-demo:coding

About

kaniko image k8s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published