diff --git a/apps/nginx/deploy.yaml b/apps/deploy.yaml similarity index 100% rename from apps/nginx/deploy.yaml rename to apps/deploy.yaml diff --git a/apps/nginx/svc.yaml b/apps/svc.yaml similarity index 100% rename from apps/nginx/svc.yaml rename to apps/svc.yaml diff --git a/helm-webapp/.helmignore b/helm-webapp/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/helm-webapp/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm-webapp/Chart.yaml b/helm-webapp/Chart.yaml deleted file mode 100644 index ef5e1f7..0000000 --- a/helm-webapp/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: webapp -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/helm-webapp/templates/NOTES.txt b/helm-webapp/templates/NOTES.txt deleted file mode 100644 index 8bfc730..0000000 --- a/helm-webapp/templates/NOTES.txt +++ /dev/null @@ -1,2 +0,0 @@ -servicename=$(k get service -l "app={{ .Values.appName }}" -o jsonpath="{.items[0].metadata.name}") -kubectl --namespace port-forward service/{{ .Values.appName }} 8888:80 \ No newline at end of file diff --git a/helm-webapp/templates/configmap.yaml b/helm-webapp/templates/configmap.yaml deleted file mode 100644 index aadeb34..0000000 --- a/helm-webapp/templates/configmap.yaml +++ /dev/null @@ -1,8 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: {{ .Values.configmap.name }} -data: - BG_COLOR: '#12181b' - FONT_COLOR: '#FFFFFF' - CUSTOM_HEADER: {{ .Values.configmap.data.CUSTOM_HEADER }} \ No newline at end of file diff --git a/helm-webapp/templates/deployment.yaml b/helm-webapp/templates/deployment.yaml deleted file mode 100644 index 1ba1743..0000000 --- a/helm-webapp/templates/deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Values.appName }} - labels: - app: {{ .Values.appName }} -spec: - replicas: {{ .Values.replicas }} - selector: - matchLabels: - app: {{ .Values.appName }} - tier: frontend - template: - metadata: - labels: - app: {{ .Values.appName }} - tier: frontend - spec: # Pod spec - containers: - - name: mycontainer - image: "{{ .Values.image.name }}:{{ .Values.image.tag }}" - ports: - - containerPort: 80 - envFrom: - - configMapRef: - name: {{ .Values.configmap.name }} - resources: - requests: - memory: "16Mi" - cpu: "50m" # 500milliCPUs (1/2 CPU) - limits: - memory: "128Mi" - cpu: "100m" \ No newline at end of file diff --git a/helm-webapp/templates/service.yaml b/helm-webapp/templates/service.yaml deleted file mode 100644 index 0ffe034..0000000 --- a/helm-webapp/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.appName }} - labels: - app: {{ .Values.appName }} -spec: - ports: - - port: 80 - protocol: TCP - name: flask - selector: - app: {{ .Values.appName }} - tier: frontend - type: NodePort diff --git a/helm-webapp/values-dev.yaml b/helm-webapp/values-dev.yaml deleted file mode 100644 index a53c0b2..0000000 --- a/helm-webapp/values-dev.yaml +++ /dev/null @@ -1,6 +0,0 @@ - -replicas: 5 - -configmap: - data: - CUSTOM_HEADER: 'This is on the DEV environment!' diff --git a/helm-webapp/values-prod.yaml b/helm-webapp/values-prod.yaml deleted file mode 100644 index fa91ac7..0000000 --- a/helm-webapp/values-prod.yaml +++ /dev/null @@ -1,6 +0,0 @@ - -replicas: 4 - -configmap: - data: - CUSTOM_HEADER: 'This is on the PROD environment!' diff --git a/helm-webapp/values.yaml b/helm-webapp/values.yaml deleted file mode 100644 index 2f332a2..0000000 --- a/helm-webapp/values.yaml +++ /dev/null @@ -1,12 +0,0 @@ -appName: myhelmapp - -port: 80 - -configmap: - name: myhelmapp-configmap-v1 - data: - CUSTOM_HEADER: 'This app was deployed with helm!' - -image: - name: devopsjourney1/mywebapp - tag: latest \ No newline at end of file diff --git a/kustom-webapp/README.md b/kustom-webapp/README.md deleted file mode 100644 index 47fa2b3..0000000 --- a/kustom-webapp/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Installation -``` -kubectl version -``` -*If you have 1.21 or above of kubectl you will have access to kubectl kustomize which is the recommended method. If you aren't on version 1.21 or above, upgrade kubectl. -*You could also download/use the 'kutomize' binary seperatly but the cmds are different. - - -# Viewing Kustomize Configs - (Using kubectl kustomize integration) -``` -kubectl kustomize . -kubectl kustomize overlays/dev/ -kubectl kustomize overlays/prod/ -``` - -# Applying Kustomize Configs - (Using kubectl kustomize integration) -``` -kubectl apply -k . -kubectl apply -k overlays/dev/ -kubectl apply -k overlays/prod/ -``` -Note: if you get field is immutable error, check your configuration and try deleting the resources. - - -# Creating Namespaces if you dont have them already -``` -kubectl create namespace dev; kubectl create namespace prod; -``` - - -# Accessing the application -``` -minikube service kustom-mywebapp-v1 -minikube service kustom-mywebapp-v1 -n dev -minikube service kustom-mywebapp-v1 -n prod -``` - -# References: -https://github.com/kubernetes-sigs/kustomize/blob/master/README.md -https://kubectl.docs.kubernetes.io/guides/config_management/offtheshelf/ diff --git a/kustom-webapp/base/deployment.yaml b/kustom-webapp/base/deployment.yaml deleted file mode 100644 index dc11465..0000000 --- a/kustom-webapp/base/deployment.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mywebapp -spec: - replicas: 1 - template: - spec: # Pod spec - containers: - - name: mycontainer - image: "devopsjourney1/mywebapp:latest" - ports: - - containerPort: 80 - envFrom: - - configMapRef: - name: mykustom-map - resources: - requests: - memory: "16Mi" - cpu: "50m" # 500milliCPUs (1/2 CPU) - limits: - memory: "128Mi" - cpu: "100m" \ No newline at end of file diff --git a/kustom-webapp/base/kustomization.yaml b/kustom-webapp/base/kustomization.yaml deleted file mode 100644 index 7c0ea2d..0000000 --- a/kustom-webapp/base/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -commonLabels: - app: kustomwebapp - -commonAnnotations: - app: mykustom-annontations - -namePrefix: - kustom- - -nameSuffix: - -v1 \ No newline at end of file diff --git a/kustom-webapp/base/service.yaml b/kustom-webapp/base/service.yaml deleted file mode 100644 index b69d9ef..0000000 --- a/kustom-webapp/base/service.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: mywebapp -spec: - ports: - - port: 80 - protocol: TCP - name: flask - type: NodePort \ No newline at end of file diff --git a/kustom-webapp/overlays/dev/config.properties b/kustom-webapp/overlays/dev/config.properties deleted file mode 100644 index 433cf01..0000000 --- a/kustom-webapp/overlays/dev/config.properties +++ /dev/null @@ -1,3 +0,0 @@ -BG_COLOR=#000000 -FONT_COLOR=#FFFFFF -CUSTOM_HEADER=Welcome to the DEV environment!! diff --git a/kustom-webapp/overlays/dev/kustomization.yaml b/kustom-webapp/overlays/dev/kustomization.yaml deleted file mode 100644 index 21c1717..0000000 --- a/kustom-webapp/overlays/dev/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -bases: -- ../../base - -patches: - - replicas.yaml - -configMapGenerator: -- name: mykustom-map - env: config.properties \ No newline at end of file diff --git a/kustom-webapp/overlays/dev/replicas.yaml b/kustom-webapp/overlays/dev/replicas.yaml deleted file mode 100644 index 453b1cb..0000000 --- a/kustom-webapp/overlays/dev/replicas.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mywebapp -spec: - replicas: 3 \ No newline at end of file diff --git a/kustom-webapp/overlays/prod/config.properties b/kustom-webapp/overlays/prod/config.properties deleted file mode 100644 index b1819db..0000000 --- a/kustom-webapp/overlays/prod/config.properties +++ /dev/null @@ -1,3 +0,0 @@ -BG_COLOR=#12181b -FONT_COLOR=#FFFFFF -CUSTOM_HEADER=Welcome to the Prod environment!! diff --git a/kustom-webapp/overlays/prod/kustomization.yaml b/kustom-webapp/overlays/prod/kustomization.yaml deleted file mode 100644 index 21c1717..0000000 --- a/kustom-webapp/overlays/prod/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -bases: -- ../../base - -patches: - - replicas.yaml - -configMapGenerator: -- name: mykustom-map - env: config.properties \ No newline at end of file diff --git a/kustom-webapp/overlays/prod/replicas.yaml b/kustom-webapp/overlays/prod/replicas.yaml deleted file mode 100644 index 81d52ea..0000000 --- a/kustom-webapp/overlays/prod/replicas.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mywebapp -spec: - replicas: 4 \ No newline at end of file diff --git a/readme.md b/readme.md deleted file mode 100644 index b40ed77..0000000 --- a/readme.md +++ /dev/null @@ -1,56 +0,0 @@ - - -# Follow this video to be a ArgoCD Boss -https://youtu.be/JLrR9RV9AFA - - -# Installing latest/stable version of ArgoCD -``` -kubectl create namespace argocd -kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml -``` - -### Forward Ports -``` -k get services -n argocd -kubectl port-forward service/argocd-server -n argocd 8080:443 -``` - -### Get Credentials -``` -kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d -``` - -# Install ArgoCD CLI / Login via CLI -``` -brew install argocd -kubectl port-forward svc/argocd-server -n argocd 8080:443 -argocd login 127.0.0.1:8080 -``` - -# Creating an Application using ArgoCD CLI: -``` -argocd app create webapp-kustom-prod \ ---repo https://github.com/devopsjourney1/argo-examples.git \ ---path kustom-webapp/overlays/prod --dest-server https://kubernetes.default.svc \ ---dest-namespace prod -``` - -# Command Cheat sheet -``` -argocd app create #Create a new Argo CD application. -argocd app list #List all applications in Argo CD. -argocd app logs #Get the application’s log output. -argocd app get #Get information about an Argo CD application. -argocd app diff #Compare the application’s configuration to its source repository. -argocd app sync #Synchronize the application with its source repository. -argocd app history #Get information about an Argo CD application. -argocd app rollback #Rollback to a previous version -argocd app set #Set the application’s configuration. -argocd app delete #Delete an Argo CD application. -``` - - - - -