├── Ch2 ├── AKS │ ├── cluster_scaling │ │ └── main.tf │ ├── main.tf │ ├── test.md │ └── variables.tf ├── AWS │ ├── main.tf │ ├── testm.md │ └── variables.tf └── GCP │ ├── main.tf │ ├── test.md │ └── variables.tf ├── Ch3 ├── DigitalOcean │ ├── .terraform │ │ └── providers │ │ │ └── registry.terraform.io │ │ │ └── digitalocean │ │ │ └── digitalocean │ │ │ └── 2.21.0 │ │ │ └── darwin_arm64 │ │ │ ├── CHANGELOG.md │ │ │ └── README.md │ ├── main.tf │ └── variables.tf ├── LKE │ ├── main.tf │ └── variables.tf └── test ├── Ch4 └── commands.md ├── Ch5 ├── daemonset.yaml ├── deployment.yaml ├── example.go ├── liveness.yaml ├── multicontainers.yaml ├── namespacequota.yaml ├── persistentvolumeclaim.yaml ├── persistenvolume.yaml ├── pod.yaml ├── readiness.yaml ├── replica.yaml ├── requestandlimit.yaml ├── rollingupdate.yaml ├── scaling.yaml ├── statefulset.yaml ├── storageclass.yaml ├── test.md └── verticalpodautoscaler.yaml ├── Ch6 ├── CICD │ └── CICD │ │ ├── main.tf │ │ └── pipeline.yaml ├── gitops │ └── instructions.md ├── helm │ └── newchart │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml ├── kustomize │ ├── base │ │ ├── deployment.yaml │ │ └── kustomization.yaml │ └── overlays │ │ └── dev │ │ └── kustomization.yaml └── placeholder ├── Ch7 └── prometheus │ └── helm │ └── readme.md ├── Ch8 └── test.md ├── LICENSE └── README.md /Ch2/AKS/cluster_scaling/main.tf: -------------------------------------------------------------------------------- 1 | resource "azurerm_kubernetes_cluster_node_pool" "example" { 2 | name = "internal" 3 | kubernetes_cluster_id = azurerm_kubernetes_cluster.example.id 4 | vm_size = "Standard_DS2_v2" 5 | node_count = 1 6 | enable_auto_scaling = true 7 | 8 | tags = { 9 | Environment = "Production" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Ch2/AKS/main.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | azurerm = { 4 | source = "hashicorp/azurerm" 5 | } 6 | } 7 | } 8 | 9 | provider "azurerm" { 10 | features {} 11 | } 12 | 13 | resource "azurerm_kubernetes_cluster" "k8squickstart" { 14 | name = var.name 15 | location = var.location 16 | resource_group_name = var.resource_group_name 17 | dns_prefix = "${var.name}-dns01" 18 | 19 | default_node_pool { 20 | name = "default" 21 | node_count = var.node_count 22 | vm_size = "Standard_A2_v2" 23 | } 24 | 25 | identity { 26 | type = "SystemAssigned" 27 | } 28 | 29 | tags = { 30 | Environment = "Production" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Ch2/AKS/test.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/50-Kubernetes-Concepts-Every-DevOps-Engineer-Should-Know/6791d00b9d021d0c5cd04dbc3da0f4040a967e2b/Ch2/AKS/test.md -------------------------------------------------------------------------------- /Ch2/AKS/variables.tf: -------------------------------------------------------------------------------- 1 | variable "name" { 2 | type = string 3 | default = "aksenvironment01" 4 | } 5 | 6 | variable "resource_group_name" { 7 | type = string 8 | default = "devrelasaservice" 9 | } 10 | 11 | variable "location" { 12 | type = string 13 | default = "eastus" 14 | } 15 | 16 | variable "node_count" { 17 | type = string 18 | default = 3 19 | } 20 | -------------------------------------------------------------------------------- /Ch2/AWS/main.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "s3" { 3 | bucket = "terraform-state-k8senv" 4 | key = "eks-terraform-workernodes.tfstate" 5 | region = "us-east-1" 6 | } 7 | required_providers { 8 | aws = { 9 | source = "hashicorp/aws" 10 | } 11 | } 12 | } 13 | 14 | resource "aws_iam_role" "eks-iam-role" { 15 | name = "k8squickstart-eks-iam-role" 16 | 17 | path = "/" 18 | 19 | assume_role_policy = < Update Password 17 | 18 | 7. Change the password from the initial admin password to a password of your choosing 19 | 20 | 8. Create a Namespace for your new app 21 | ``` 22 | kubectl create namespace sock-shop 23 | ``` 24 | 25 | The Socks App is a popular microservice demo which you can find here: https://microservices-demo.github.io/deployment/kubernetes-start.html 26 | 27 | 9. Deploy the Socks App in ArgoCD. 28 | ``` 29 | argocd app create socks --repo https://github.com/microservices-demo/microservices-demo.git --path deploy/kubernetes --dest-server https://kubernetes.default.svc --dest-namespace sock-shop 30 | ``` 31 | 32 | 10. Check the status of the app 33 | ``` 34 | argocd app get socks 35 | ``` 36 | 37 | 11. Check that the app was deployed in the ArgoCD UI 38 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: newchart 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.16.0" 25 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "newchart.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "newchart.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "newchart.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "newchart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") 20 | echo "Visit http://127.0.0.1:8080 to use your application" 21 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT 22 | {{- end }} 23 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Expand the name of the chart. 3 | */}} 4 | {{- define "newchart.name" -}} 5 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 6 | {{- end }} 7 | 8 | {{/* 9 | Create a default fully qualified app name. 10 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 11 | If release name contains chart name it will be used as a full name. 12 | */}} 13 | {{- define "newchart.fullname" -}} 14 | {{- if .Values.fullnameOverride }} 15 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 16 | {{- else }} 17 | {{- $name := default .Chart.Name .Values.nameOverride }} 18 | {{- if contains $name .Release.Name }} 19 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 20 | {{- else }} 21 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 22 | {{- end }} 23 | {{- end }} 24 | {{- end }} 25 | 26 | {{/* 27 | Create chart name and version as used by the chart label. 28 | */}} 29 | {{- define "newchart.chart" -}} 30 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 31 | {{- end }} 32 | 33 | {{/* 34 | Common labels 35 | */}} 36 | {{- define "newchart.labels" -}} 37 | helm.sh/chart: {{ include "newchart.chart" . }} 38 | {{ include "newchart.selectorLabels" . }} 39 | {{- if .Chart.AppVersion }} 40 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 41 | {{- end }} 42 | app.kubernetes.io/managed-by: {{ .Release.Service }} 43 | {{- end }} 44 | 45 | {{/* 46 | Selector labels 47 | */}} 48 | {{- define "newchart.selectorLabels" -}} 49 | app.kubernetes.io/name: {{ include "newchart.name" . }} 50 | app.kubernetes.io/instance: {{ .Release.Name }} 51 | {{- end }} 52 | 53 | {{/* 54 | Create the name of the service account to use 55 | */}} 56 | {{- define "newchart.serviceAccountName" -}} 57 | {{- if .Values.serviceAccount.create }} 58 | {{- default (include "newchart.fullname" .) .Values.serviceAccount.name }} 59 | {{- else }} 60 | {{- default "default" .Values.serviceAccount.name }} 61 | {{- end }} 62 | {{- end }} 63 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "newchart.fullname" . }} 5 | labels: 6 | {{- include "newchart.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | selector: 12 | matchLabels: 13 | {{- include "newchart.selectorLabels" . | nindent 6 }} 14 | template: 15 | metadata: 16 | {{- with .Values.podAnnotations }} 17 | annotations: 18 | {{- toYaml . | nindent 8 }} 19 | {{- end }} 20 | labels: 21 | {{- include "newchart.selectorLabels" . | nindent 8 }} 22 | spec: 23 | {{- with .Values.imagePullSecrets }} 24 | imagePullSecrets: 25 | {{- toYaml . | nindent 8 }} 26 | {{- end }} 27 | serviceAccountName: {{ include "newchart.serviceAccountName" . }} 28 | securityContext: 29 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 30 | containers: 31 | - name: {{ .Chart.Name }} 32 | securityContext: 33 | {{- toYaml .Values.securityContext | nindent 12 }} 34 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 35 | imagePullPolicy: {{ .Values.image.pullPolicy }} 36 | ports: 37 | - name: http 38 | containerPort: 80 39 | protocol: TCP 40 | livenessProbe: 41 | httpGet: 42 | path: / 43 | port: http 44 | readinessProbe: 45 | httpGet: 46 | path: / 47 | port: http 48 | resources: 49 | {{- toYaml .Values.resources | nindent 12 }} 50 | {{- with .Values.nodeSelector }} 51 | nodeSelector: 52 | {{- toYaml . | nindent 8 }} 53 | {{- end }} 54 | {{- with .Values.affinity }} 55 | affinity: 56 | {{- toYaml . | nindent 8 }} 57 | {{- end }} 58 | {{- with .Values.tolerations }} 59 | tolerations: 60 | {{- toYaml . | nindent 8 }} 61 | {{- end }} 62 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "newchart.fullname" . }} 6 | labels: 7 | {{- include "newchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "newchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "newchart.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} 5 | {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} 6 | {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} 7 | {{- end }} 8 | {{- end }} 9 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} 10 | apiVersion: networking.k8s.io/v1 11 | {{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 12 | apiVersion: networking.k8s.io/v1beta1 13 | {{- else -}} 14 | apiVersion: extensions/v1beta1 15 | {{- end }} 16 | kind: Ingress 17 | metadata: 18 | name: {{ $fullName }} 19 | labels: 20 | {{- include "newchart.labels" . | nindent 4 }} 21 | {{- with .Values.ingress.annotations }} 22 | annotations: 23 | {{- toYaml . | nindent 4 }} 24 | {{- end }} 25 | spec: 26 | {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} 27 | ingressClassName: {{ .Values.ingress.className }} 28 | {{- end }} 29 | {{- if .Values.ingress.tls }} 30 | tls: 31 | {{- range .Values.ingress.tls }} 32 | - hosts: 33 | {{- range .hosts }} 34 | - {{ . | quote }} 35 | {{- end }} 36 | secretName: {{ .secretName }} 37 | {{- end }} 38 | {{- end }} 39 | rules: 40 | {{- range .Values.ingress.hosts }} 41 | - host: {{ .host | quote }} 42 | http: 43 | paths: 44 | {{- range .paths }} 45 | - path: {{ .path }} 46 | {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} 47 | pathType: {{ .pathType }} 48 | {{- end }} 49 | backend: 50 | {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} 51 | service: 52 | name: {{ $fullName }} 53 | port: 54 | number: {{ $svcPort }} 55 | {{- else }} 56 | serviceName: {{ $fullName }} 57 | servicePort: {{ $svcPort }} 58 | {{- end }} 59 | {{- end }} 60 | {{- end }} 61 | {{- end }} 62 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "newchart.fullname" . }} 5 | labels: 6 | {{- include "newchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "newchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "newchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "newchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "newchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "newchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "newchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /Ch6/helm/newchart/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for newchart. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: nginx 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: {} 29 | # fsGroup: 2000 30 | 31 | securityContext: {} 32 | # capabilities: 33 | # drop: 34 | # - ALL 35 | # readOnlyRootFilesystem: true 36 | # runAsNonRoot: true 37 | # runAsUser: 1000 38 | 39 | service: 40 | type: ClusterIP 41 | port: 80 42 | 43 | ingress: 44 | enabled: false 45 | className: "" 46 | annotations: {} 47 | # kubernetes.io/ingress.class: nginx 48 | # kubernetes.io/tls-acme: "true" 49 | hosts: 50 | - host: chart-example.local 51 | paths: 52 | - path: / 53 | pathType: ImplementationSpecific 54 | tls: [] 55 | # - secretName: chart-example-tls 56 | # hosts: 57 | # - chart-example.local 58 | 59 | resources: {} 60 | # We usually recommend not to specify default resources and to leave this as a conscious 61 | # choice for the user. This also increases chances charts run on environments with little 62 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 63 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 64 | # limits: 65 | # cpu: 100m 66 | # memory: 128Mi 67 | # requests: 68 | # cpu: 100m 69 | # memory: 128Mi 70 | 71 | autoscaling: 72 | enabled: false 73 | minReplicas: 1 74 | maxReplicas: 100 75 | targetCPUUtilizationPercentage: 80 76 | # targetMemoryUtilizationPercentage: 80 77 | 78 | nodeSelector: {} 79 | 80 | tolerations: [] 81 | 82 | affinity: {} 83 | -------------------------------------------------------------------------------- /Ch6/kustomize/base/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: nginx-deployment 5 | spec: 6 | selector: 7 | matchLabels: 8 | app: nginxdeployment 9 | replicas: 2 10 | template: 11 | metadata: 12 | labels: 13 | app: nginxdeployment 14 | spec: 15 | containers: 16 | - name: nginxdeployment 17 | image: nginx:latest 18 | ports: 19 | - containerPort: 80 20 | -------------------------------------------------------------------------------- /Ch6/kustomize/base/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | resources: 4 | - deployment.yaml 5 | -------------------------------------------------------------------------------- /Ch6/kustomize/overlays/dev/kustomization.yaml: -------------------------------------------------------------------------------- 1 | kind: Kustomization 2 | resources: 3 | - ../../base/ 4 | 5 | replicas: 6 | - name: nginx-deployment 7 | count: 1 8 | -------------------------------------------------------------------------------- /Ch6/placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/50-Kubernetes-Concepts-Every-DevOps-Engineer-Should-Know/6791d00b9d021d0c5cd04dbc3da0f4040a967e2b/Ch6/placeholder -------------------------------------------------------------------------------- /Ch7/prometheus/helm/readme.md: -------------------------------------------------------------------------------- 1 | ``` 2 | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts 3 | ``` 4 | 5 | ``` 6 | helm repo update 7 | ``` 8 | 9 | ``` 10 | helm install prometheus \ 11 | prometheus-community/kube-prometheus-stack \ 12 | --namespace monitoring \ 13 | --create-namespace 14 | ``` -------------------------------------------------------------------------------- /Ch8/test.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/50-Kubernetes-Concepts-Every-DevOps-Engineer-Should-Know/6791d00b9d021d0c5cd04dbc3da0f4040a967e2b/Ch8/test.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 50 Kubernetes Concepts Every DevOps Engineer Should Know 2 | 3 | 4 | 5 | This is the code repository for [50 Kubernetes Concepts Every DevOps Engineer Should Know](https://www.packtpub.com/product/50-kubernetes-concepts-every-devops-engineer-should-know/9781804611470?utm_source=github&utm_medium=repository&utm_campaign=9781804611470), published by Packt. 6 | 7 | **Your go-to guide for making production-level decisions on how and why to implement Kubernetes** 8 | 9 | ## What is this book about? 10 | Kubernetes is a trending topic among engineers, CTOs, CIOs, and other technically sound professionals. Due to its proliferation and importance for all cloud technologies, DevOps engineers nowadays need a solid grasp of key Kubernetes concepts to help their organization thrive. 11 | 12 | This book covers the following exciting features: 13 | * Find out how Kubernetes works on-premises, in the cloud, and in PaaS environments 14 | * Work with networking, cluster management, and application deployment 15 | * Understand why cloud native is crucial for Kubernetes applications 16 | * Deploy apps in different states, including Stateless and Stateful 17 | * Monitor and implement observability in your environment 18 | * Explore the functioning of Kubernetes security at the cluster, user, and application level 19 | 20 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1804611476) today! 21 | 22 | https://www.packtpub.com/ 24 | 25 | ## Instructions and Navigations 26 | All of the code is organized into folders. For example, Ch2. 27 | 28 | The code will look like the following: 29 | ``` 30 | terraform { 31 | required_providers { 32 | azurerm = { 33 | source = "hashicorp/azurerm" 34 | } 35 | } 36 | } 37 | ``` 38 | 39 | **Following is what you need for this book:** 40 | This book is for cloud engineers, developers, DevOps engineers, and infrastructure engineers responsible for inheriting a Kubernetes environment or creating a greenfield Kubernetes environment. If you are a professional who wants to get started with cloud-native applications and implement k8s best practices, then this book is a must-read. If you have engineered environments in the cloud and on-premises and understand how to deploy applications with a solid tenure in a developer role, this book will help you further your skills. 41 | 42 | With the following software and hardware list you can run all code files present in the book (Chapter 1-8). 43 | ### Software and Hardware List 44 | | Software required | OS required | 45 | | ------------------------------------ | ----------------------------------- | 46 | | Kubernetes v1.24 and above | Windows, Mac OS X, and Linux (Any) | 47 | 48 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://packt.link/FQMAS). 49 | 50 | ### Related products 51 | * Certified Kubernetes Administrator (CKA) Exam Guide [[Packt]](https://www.packtpub.com/product/certified-kubernetes-administrator-cka-exam-guide/9781803238265?utm_source=github&utm_medium=repository&utm_campaign=9781803238265) [[Amazon]](https://www.amazon.com/dp/1803238267) 52 | 53 | * Managing Kubernetes Resources Using Helm - Second Edition [[Packt]](https://www.packtpub.com/product/managing-kubernetes-resources-using-helm-second-edition/9781803242897?utm_source=github&utm_medium=repository&utm_campaign=9781803242897) [[Amazon]](https://www.amazon.com/dp/1803242892) 54 | 55 | ## Get to Know the Author 56 | **Michael Levan** 57 | is a seasoned engineer and consultant in the Kubernetes space who spends his time working with startups and enterprises around the globe on Kubernetes and cloud-native projects. He also performs technical research, creates real-world, project-focused content, and coaches engineers on how to cognitively embark on their engineering journey. He is a DevOps pro, HashiCorp Ambassador, AWS Community Builder, and loves helping the tech community by public speaking internationally, blogging, and authoring technical books. 58 | 59 | 60 | 61 | ### Download a free PDF 62 | 63 | If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
64 |

https://packt.link/free-ebook/9781804611470

--------------------------------------------------------------------------------