The main reason we created such an environment was to easily deploy the code written by the developer team into a kubernetes cluster, to advance a smooth development process, and to standardize development environments.
When the code was changed with Skaffold, the deployment part was solved.
- Whenever there is a change in the code, scaffold automatically detects it and makes a docker image.
- Pushing new image to docker hub.
- Kubernetes pulls and deploys new image.
- Lightweight Kubernetes development environment.
- A quick and easy Kubernetes cluster.
- A single-node configuration
- It has a low memory/CPU consumption.
- Fast iterative development
- Production-ready CI/CD pipelines
- On-cluster application debugging
Application address is: localhost:3000
- Docker login
docker login
-
Create docker hub repo
-
Clone this repo
git clone https://github.com/AbdullahAki/Kubernetes-Challenge.git
- Go inside the repo
cd Kubernetes-Challenge
- Edit skaffold.yaml
#7 - image: username/docker-repo
- Start Vagrant cluster
vagrant up
- Get required authentication file
sudo chmod +x skaffold.sh && ./skaffold.sh
- If we are logged in and we want to do build and deploy your app every time your code changes
skaffold --kubeconfig='k3s.yaml' dev
- If we want to build and deploy your App once
skaffold --kubeconfig='k3s.yaml' run
- If you want to see machine UI, you can SSH into the machine.
vagrant ssh
- Exit machine.
exit
- Delete Vagrant cluster
vagrant destroy