How to Build and Deploy an app on Kubernetes by GitLab ci cd pipeline

  Рет қаралды 33,028

be-devops

be-devops

9 ай бұрын

CI CD pipeline is used for quick and efficient delivery of an application to its consumers. So, In this "How To" presentation I demonstrate how to create a #gitlab CI/CD #pipeline that uses a #Gitlab-Runner to build and push images to GITLAB #container registry and we will learn how to connect an existing #kubernetes Cluster to GitLab and How to deploy applications on cluster using CI/CD tunnel
This #tutorial assumes you have a Local Kubernetes cluster like Racher-Desktop . To setup Rancher Cluster on your windows machine, you can follow this tutorial: • How to Install & Confi...
==========================================
www.buymeacoffee.com/karaminejad
==========================================
Note:
If you are using GitLab self-managed instance, You need to enable GitLab Kubernetes Agent Server (KAS) from GitLab configuration using below step.
Add below line in /etc/gitlab/gitlab.rb file
gitlab_kas['enable'] = true
Restart or re-configure GitLab.
All Files related to this Project: (1-K8S-CICD folder)
github.com/mkaraminejad/cicd_...
How ton install Rancher-Desktop on Windows: • How to Install & Confi...
#kubernetes #gitlab #gitlab-runner # gitlab # build #deploy #ci cd pipeline #gitlab ci cd tutorial #gitlab tutorial #pipeline #devops ci cd pipeline

Пікірлер: 96
@Crmzon-do1fe
@Crmzon-do1fe Ай бұрын
I've been watching ALOT of devops videos for my job this week, and this is BY FAR the most hands on devops pipeline tutorial I have found. Thank you.
@be-devops
@be-devops Ай бұрын
Thank You
@raph1587
@raph1587 8 ай бұрын
Wow! This is what I am looking for! Its so detailed and well explained! Keep the Tutorial Videos coming!
@be-devops
@be-devops 8 ай бұрын
Thanks Raph
@bothorsen4292
@bothorsen4292 5 ай бұрын
Thank you for this, it was exactly what I needed. If only the gitlab documentation was as good as this video :)
@be-devops
@be-devops 5 ай бұрын
Thanks
@hajermakina7474
@hajermakina7474 8 ай бұрын
This is such a structured video for those who want to build a complete cicd pipeline. and explanation was really crystal clear ! you are such a gem trainer :) you have really done a fantastic job creating this video, I hope we could get more such end to end project to grind our skills !! Thank you
@be-devops
@be-devops 8 ай бұрын
You built my day with your full energetic sentences
@AI-4-U
@AI-4-U 9 ай бұрын
You are the best teacher. I took so many courses, but the way you teach goes straight to my head. 🎉🎉🎉🎉
@be-devops
@be-devops 9 ай бұрын
Thank you, today I started my day with your energetic sentence.
@timpomaville3080
@timpomaville3080 4 ай бұрын
These videos are wonderful!
@MohamadMirSajadi
@MohamadMirSajadi 7 ай бұрын
it was ,nice , clear and what i was looking for . Thank you
@be-devops
@be-devops 7 ай бұрын
Thanks for the nice comment. لطف دارید
@amadoudiop6634
@amadoudiop6634 4 ай бұрын
Excellent tutorial and very well explained. Thank you very much !!!
@be-devops
@be-devops 4 ай бұрын
Thank you
@DynamiArrow
@DynamiArrow 29 күн бұрын
Best explanation of this topic that i have seen, great job
@sfarpaktech
@sfarpaktech 7 ай бұрын
Really helpful thanks for sharing
@manhnguyenitc
@manhnguyenitc 2 ай бұрын
Thank you very much, it was exactly what I needed :)
@be-devops
@be-devops Ай бұрын
You're welcome!
@lenoah8692
@lenoah8692 5 ай бұрын
best teacher thanks
@sharukhannadagoud
@sharukhannadagoud 3 ай бұрын
awesome video
@sergekomi6039
@sergekomi6039 4 ай бұрын
great explanation very helpful thank you !!!
@be-devops
@be-devops 4 ай бұрын
Thanks
@user-mp6pq3pd9w
@user-mp6pq3pd9w 2 ай бұрын
Thank you, very helpful.
@be-devops
@be-devops Ай бұрын
Glad to hear it!
@somber2075
@somber2075 4 ай бұрын
Great video. It has helped me a lot
@mostafabanaei2832
@mostafabanaei2832 5 ай бұрын
thank you for great video
@be-devops
@be-devops 5 ай бұрын
It is my pleasure
@ahosanhabib9399
@ahosanhabib9399 3 ай бұрын
Great teaching
@be-devops
@be-devops 3 ай бұрын
Thanks
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
Development of skills and Wisdom and experience and learning education po
@ceasarpalache1045
@ceasarpalache1045 2 ай бұрын
Make sure your k8s-connection is in the same group as the project you're trying to deploy. If it's not, the deployment step will fail trying to set kubectl contexts.
@nikitamathur6720
@nikitamathur6720 3 ай бұрын
Thanks for the detailed Video. Help me alot !!! Want to ask you that when i run 'kubectl get node -o wide' and take the internal ip of the node-cluster, i am not able to connect to my app on browser. I have installed docker for windows on my windows machine. Then minicube for Kubernetes. Should i install anything else.
@be-devops
@be-devops 3 ай бұрын
Please check your firewall on windows and maybe blocked it but as i described I am using Rancher Desktop and really is amazing for its installation you can check my other video: kzbin.info/www/bejne/f2q8pYWehbeAp8U
@Freeline95
@Freeline95 5 ай бұрын
Nice video! Could you give me advice by best practices. In your case you store k8s yaml files in your project repo. But i am developing microservices architecture and my files are storing in separated repo "infrastructure". How to get files from there? Git clone my private repo during the build?
@be-devops
@be-devops 5 ай бұрын
Hi Friend, You can find your answer here in this video: kzbin.info/www/bejne/hafKiah9qNCXea8 I described there how to clone other repo in CICD
@serokanikani
@serokanikani 3 ай бұрын
thanks for the tutorial, I have a problem if I update coding and push to gitlab, build image and deploy successfully. but it seems like the pod or service or image in microk8s is not updated and if I delete the service and pod first then push to gitlab, its work. my gitlab ci yaml is same with tutorial
@eliaspereira777
@eliaspereira777 4 ай бұрын
Hello, great explanation!!! I have a gitlab-ci.yml identical to yours, but in the build stage, I set the tags: build, only. The deploy is identical. When I push, the stage build completes successfully, but the stage deploy is waiting for a runner. I believe that with the gitlab agent, there is no need for a runner, correct?
@be-devops
@be-devops 4 ай бұрын
yes deploy also need gitlab runner, because you are using an image to run kubectl command check yr deploy config. or send me by email to check it for you howtoskillsvid@gmail.com
@rikitikitaki5919
@rikitikitaki5919 2 ай бұрын
Good video, but you didnt mention about runner. I think it was full cicd process if you showed installing runner
@be-devops
@be-devops 2 ай бұрын
Thank you for your comment Here we more focus on CICD. But i had another video about using gitlab runner: kzbin.info/www/bejne/bHPPpH6inbSbeqc
@rikitikitaki5919
@rikitikitaki5919 2 ай бұрын
​@be-devops Could you explain me, please. In stage deploy, do we need to use kubernetes runner? Or it is enought that we have agent. Because when i am starting my pipeline it gives me error, that here we dont have runner to deploy. Maybe i have a mistake.
@be-devops
@be-devops 2 ай бұрын
@@rikitikitaki5919 no need something like you say kubernetes runner. we do not have such thing. Only agent is ok you can contact me by email and send me the issue logs and we can solve it quickly
@be-devops
@be-devops 2 ай бұрын
@@rikitikitaki5919 howtoskillsvid@gmail.com
@happyshoppi1036
@happyshoppi1036 4 ай бұрын
Hi Thankyou so much for your video I have made a similar lab for testing CICD Gitlab I am facing issues whule pusing the code in gitlab container I would appreciate your help
@be-devops
@be-devops 4 ай бұрын
Thanks
@hwy9nightkid
@hwy9nightkid 6 ай бұрын
at about 29:26 you're showing the building of the image with a public gitlab provided runner.. is the agent also capabale of building or how should one go about supporting not just operations but build steps in our private k8s? seems I need more runner types installed?
@be-devops
@be-devops 6 ай бұрын
Hello, I did not get your question would you please send me more details in my email howtoskillsvid@gmail.com
@hwy9nightkid
@hwy9nightkid 6 ай бұрын
I'd rather not reveal my email.. but I think I understand.. you built the docker image using gitlabs free runners... I wanted to see if you could build docker images within the k3s cluster.. but very good video thanks ! @@be-devops
@be-devops
@be-devops 6 ай бұрын
@@hwy9nightkid Good Hint. I will check K3S and will try to do. Thanks
@AI-4-U
@AI-4-U 9 ай бұрын
Can you please do a video on these topics. 1. Helm charts 2. Istio service mesh 3. Observability with OpenTelemetry 4. GitOps, ArgoCD
@be-devops
@be-devops 9 ай бұрын
Good Ideas, sure will do
@neelojp8460
@neelojp8460 9 ай бұрын
@@be-devops yes please about Helm :-)
@be-devops
@be-devops 9 ай бұрын
@@neelojp8460 I am preparing it
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
🙏😇
@user-ow5vr5nz4r
@user-ow5vr5nz4r 8 ай бұрын
inmy case i have installed kubecluster in my local environment when i did the same as you presented my agent is not connecting. can you provide any solution for that.
@be-devops
@be-devops 8 ай бұрын
do you have access to your kube cluster from your local machine terminal? for example if you open yr terminal and type "kubectl get node -o wide" works? because at first you have to be sure you cluster works well. contact me by "howtoskillsvid@gmail.com" and we can solve the issue
@elchinefa9524
@elchinefa9524 Ай бұрын
First of all thnaks a lot for this video. I am fasinf agent connection issue. I'm using our company gitlab server and Connect a Kubernetes cluster return an error: Gitlab Failed to register an agent GRPC::Unimplemented . By the way my kubernetes running in Proxmox and it is kubeadm cluster.
@be-devops
@be-devops Ай бұрын
Please check in Kubernetes Cluster that Helm chart installed successfully and agent is running. you can reach me by email and we can discuses on it
@elchinefa9524
@elchinefa9524 Ай бұрын
@@be-devops Where can i find your email.
@be-devops
@be-devops Ай бұрын
@@elchinefa9524 howtoskillsvid@gmail.com
@JavierParadaHD1
@JavierParadaHD1 2 ай бұрын
Teacher i have a problem, in the same group i have acces to the k8s aggent with every project without any problem, but when i need the k8s agent in another group i have'nt access, and i've already added the ci_access project and group to access it, but it doesn't work :((. I've my own self hosted gitlab and i've put as true the gitlab_kas['enable']. Help pls
@dattran3130
@dattran3130 8 ай бұрын
Hello ad, can you share me the repo of web in k8s-data. Very thanks you
@be-devops
@be-devops 8 ай бұрын
I added this repo in description github.com/mkaraminejad/cicd_pipeline.git folder 1-K8S-CICD
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
And god po
@user-wj8qz8me2l
@user-wj8qz8me2l Ай бұрын
Thank you ! But i have never connected status !! and i have a "Failed to register agent pod. " problem ! Can you help please !?
@be-devops
@be-devops Ай бұрын
Thank you for your comment. To make connection I would check cluster side. I suggest you when in gitlab side you create a connection, copy helm codes and past them in Cluster side. After please check if everything in cluster side working well: 1) kubectl get ns you will see the name spaces and also the one for gitlab 2) kubectl -n get pods ex: kubectl -n gitlab-agent-k8s-connection get pods the result will show you the pods should be in running status. If pods be in Running status but still you have no connection in gitlab, check your firewall You can reach me by Email.
@user-wj8qz8me2l
@user-wj8qz8me2l Ай бұрын
@@be-devops Can you give me your email please ?
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
New development for skills Experience wisdom creativity and all my talents and wisdoms righteousness obedience training equipment po
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
Superior of all physicians group multidisciplinary plan and professionalism for all the healthcare workers po
@shivendrasingh5550
@shivendrasingh5550 6 ай бұрын
When the Docker image has already been built in the gitlab registry. Why do we need to push it again? Won't the image be there already?
@be-devops
@be-devops 6 ай бұрын
When it had been built by CICD , it is located on gitlab runner and when the job done by gitlab runner it will gone because it is a container so we need to push it on gitlab repository that be useable
@shivendrasingh5550
@shivendrasingh5550 6 ай бұрын
@@be-devops Thankyou for the prompt response. Please also make a video on how helm charts, gitlab-ci.yaml, Dockerfile and Docker-compose.yaml are related? I have seen all of them in a single project and could not understand the use of all of them.
@be-devops
@be-devops 6 ай бұрын
@@shivendrasingh5550 check my latest video in my channel using helm chart with CICD to deploy on K8S
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
New cluster and projects po
@user-sz9pi9ib6y
@user-sz9pi9ib6y 7 ай бұрын
Hi bro, thanks for the video. May I know how to access the source code
@be-devops
@be-devops 7 ай бұрын
In description there is Github repo address. but here you are: All Files related to this Project: (1-K8S-CICD folder) github.com/mkaraminejad/cicd_pipeline
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
Sir/Dr. mark Anthony familaran po and mommy/dr.Carmela domocmat po
@shashankmr2482
@shashankmr2482 3 ай бұрын
You didn't mention runners there
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
Physicians group multidisciplinary plan
@praveenchaudhary288
@praveenchaudhary288 7 ай бұрын
getting an error occurred while loading your agents
@be-devops
@be-devops 7 ай бұрын
your k8s cluster is in remote or local?
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
God and whole dragons teams po Kuya Bobby and ate Anna Po and bata Po kami ni thel Po mommy Carmela Po
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
Sir Henry and sir Aiken and sir danni Po and madam butterfly and madam/Dr. Carolyn and madam divine and madam mercy and madam Kris amoyo po and madam grace po
@user-ij4hg8pi1f
@user-ij4hg8pi1f 7 ай бұрын
Thank you god and sir mark Anthony familaran po and mommy Carmela Po box online and meetings Po 🤝🐉 Kuya Bobby and ate Anna Po nakakainis maraming thesis papers natin Po
@stream4885
@stream4885 6 ай бұрын
Thank you for your video and presentation. after following deployment is ok and manual deployment also work, but i have this message at the end of cd/cd process. any clue why? thank you @be_devops .gitlab-ci.yml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
@be-devops
@be-devops 4 ай бұрын
Please share me the content of .gitlab-ci.yml by my email: howtoskillsvid@gmail.com
GitLab CI CD Tutorial for Beginners [Crash Course]
1:09:00
TechWorld with Nana
Рет қаралды 1,1 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 100 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 10 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 44 МЛН
How to design a Deployment Pipeline (GitOps)
11:01
DevOps Journey
Рет қаралды 25 М.
Установка gitlab-runner в kubernetes
35:30
Артур Крюков
Рет қаралды 3,5 М.
GitLab CI/CD pipeline for React projects (GitLab + React + Netlify)
28:04
Kubernetes Crash Course for Absolute Beginners [NEW]
1:12:04
TechWorld with Nana
Рет қаралды 2,6 МЛН
Gitlab CI CD Tutorial | Gitlab Pipeline Tutorial | Hands On
24:53
DevOps Shack
Рет қаралды 2,3 М.
How to configure GitLab CI runner on your PC using Kubernetes executor
30:49
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН