SKAFFOLD
faster development on K8S
1
Bao Huynh
DevOps Engineer
5-Nov-2020
Private & Confidential 2
AGENDA
1. GitOps recall
2. GitOps challenges
3. Skaffold: healing the pains
4. Demo & Usage
5. Integration with current CICD
Private & Confidential 3
AGENDA
1. GitOps recall
2. GitOps challenges
3. Skaffold: healing the pains
4. Demo & Usage
5. Integration with current CICD
Private & Confidential 4
1. GitOps recall
● Automated deployment: one source code for all deployment &
all ENV
● Enhanced audit: keep track of system deployment (who, when,
which version,...) by GIT
● Observability: Ability to detect divergence between “desired
state” and “actual state”
Private & Confidential 5
1. GitOps recall
Private & Confidential 6
AGENDA
1. GitOps recall
2. GitOps challenges
3. Skaffold: healing the pains
4. Demo & Usage
5. Integration with current CICD
Private & Confidential 7
2. GitOps challenges
Everything goes well except:
1)…. commits too much….
2) … waiting for pipelines ....
3)….test - dev - uat environment: is the audit necessary
?…
8
2. GitOps challenges
Private & Confidential 9
AGENDA
1. GitOps recall
2. GitOps challenges
3. Skaffold: healing the pains
4. Demo & Usage
5. Integration with current CICD
Private & Confidential 10
3. Skaffold - healing the pains
11
SKAFFOLD
3. Skaffold - healing the pains
12
3. Skaffold - healing the pains
Private & Confidential 13
- No more trash commit to build (trigger locally)
- Lightweight (only client-side)
- Utilize each local’s machine as a builder / runner
- …….
3. Skaffold - healing the pains
Private & Confidential 14
3. Skaffold - healing the pains
Private & Confidential 15
3. Skaffold - healing the pains
Private & Confidential 16
AGENDA
1. GitOps recall
2. GitOps challenges
3. Skaffold: healing the pains
4. Demo & Usage
5. Integration with current CICD
Private & Confidential 17
4. Demo
Private & Confidential 18
NOT IMPRESSIVE ENOUGH ?
TRY: SKAFFOLD DEV
4. Demo
Private & Confidential 19
AGENDA
1. GitOps recall
2. GitOps challenges
3. Skaffold: healing the pains
4. Demo & Usage
5. Integration with current CICD
Private & Confidential 20
5. Integration with current CICD
Private & Confidential 21
Example structure of source-code-repository
├── Dockerfile
├── my_webserver.py
├── requirements.txt
├── skaffold.yaml ← Yaml config file
├── skaffold_run.sh ← Execute file
$ ./skaffold_run.sh -e <env_name>
Ex: ./skaffold_run.sh -e uat
5. Integration with current CICD
22
Components In-charge person
helm-common-chart (package manager) DevOps
kubeconfig with proper RBAC DevOps
ServiceAccount with permission to push
private GCR
DevOps
init script to install needed packages
(helm, kubectl, skaffold, login private
docker)
DevOps
Skaffold.yaml (each repo) Developers
(create from template)
skaffold_run.sh (copy to each repo) Developers
5. Integration with current CICD
Private & Confidential 23
5. Integration with current CICD
24
Multi profile - Multi environment - One skaffold.yaml
5. Integration with current CICD
Private & Confidential 25
Environment Traditional GitOps
(tagging)
Skaffold
dev
test
uat
live / production
5. Integration with current CICD
Private & Confidential 26
THANK YOU FOR YOUR LISTENING

Skaffold - faster development on K8S

  • 1.
    SKAFFOLD faster development onK8S 1 Bao Huynh DevOps Engineer 5-Nov-2020
  • 2.
    Private & Confidential2 AGENDA 1. GitOps recall 2. GitOps challenges 3. Skaffold: healing the pains 4. Demo & Usage 5. Integration with current CICD
  • 3.
    Private & Confidential3 AGENDA 1. GitOps recall 2. GitOps challenges 3. Skaffold: healing the pains 4. Demo & Usage 5. Integration with current CICD
  • 4.
    Private & Confidential4 1. GitOps recall ● Automated deployment: one source code for all deployment & all ENV ● Enhanced audit: keep track of system deployment (who, when, which version,...) by GIT ● Observability: Ability to detect divergence between “desired state” and “actual state”
  • 5.
    Private & Confidential5 1. GitOps recall
  • 6.
    Private & Confidential6 AGENDA 1. GitOps recall 2. GitOps challenges 3. Skaffold: healing the pains 4. Demo & Usage 5. Integration with current CICD
  • 7.
    Private & Confidential7 2. GitOps challenges Everything goes well except: 1)…. commits too much…. 2) … waiting for pipelines .... 3)….test - dev - uat environment: is the audit necessary ?…
  • 8.
  • 9.
    Private & Confidential9 AGENDA 1. GitOps recall 2. GitOps challenges 3. Skaffold: healing the pains 4. Demo & Usage 5. Integration with current CICD
  • 10.
    Private & Confidential10 3. Skaffold - healing the pains
  • 11.
    11 SKAFFOLD 3. Skaffold -healing the pains
  • 12.
    12 3. Skaffold -healing the pains
  • 13.
    Private & Confidential13 - No more trash commit to build (trigger locally) - Lightweight (only client-side) - Utilize each local’s machine as a builder / runner - ……. 3. Skaffold - healing the pains
  • 14.
    Private & Confidential14 3. Skaffold - healing the pains
  • 15.
    Private & Confidential15 3. Skaffold - healing the pains
  • 16.
    Private & Confidential16 AGENDA 1. GitOps recall 2. GitOps challenges 3. Skaffold: healing the pains 4. Demo & Usage 5. Integration with current CICD
  • 17.
  • 18.
    Private & Confidential18 NOT IMPRESSIVE ENOUGH ? TRY: SKAFFOLD DEV 4. Demo
  • 19.
    Private & Confidential19 AGENDA 1. GitOps recall 2. GitOps challenges 3. Skaffold: healing the pains 4. Demo & Usage 5. Integration with current CICD
  • 20.
    Private & Confidential20 5. Integration with current CICD
  • 21.
    Private & Confidential21 Example structure of source-code-repository ├── Dockerfile ├── my_webserver.py ├── requirements.txt ├── skaffold.yaml ← Yaml config file ├── skaffold_run.sh ← Execute file $ ./skaffold_run.sh -e <env_name> Ex: ./skaffold_run.sh -e uat 5. Integration with current CICD
  • 22.
    22 Components In-charge person helm-common-chart(package manager) DevOps kubeconfig with proper RBAC DevOps ServiceAccount with permission to push private GCR DevOps init script to install needed packages (helm, kubectl, skaffold, login private docker) DevOps Skaffold.yaml (each repo) Developers (create from template) skaffold_run.sh (copy to each repo) Developers 5. Integration with current CICD
  • 23.
    Private & Confidential23 5. Integration with current CICD
  • 24.
    24 Multi profile -Multi environment - One skaffold.yaml 5. Integration with current CICD
  • 25.
    Private & Confidential25 Environment Traditional GitOps (tagging) Skaffold dev test uat live / production 5. Integration with current CICD
  • 26.
    Private & Confidential26 THANK YOU FOR YOUR LISTENING