diff --git a/.infrastructure/helm-chart/todoapp/.helmignore b/.infrastructure/helm-chart/todoapp/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/.helmignore @@ -0,0 +1,23 @@ +# 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/.infrastructure/helm-chart/todoapp/Chart.yaml b/.infrastructure/helm-chart/todoapp/Chart.yaml new file mode 100644 index 0000000..3b7386c --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/Chart.yaml @@ -0,0 +1,8 @@ +apiVersion: v2 +name: todoapp +description: A Helm chart for Kubernetes +type: application +version: 0.1.1 +appVersion: "1.16.0" +dependencies: +- name: mysql diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/.helmignore b/.infrastructure/helm-chart/todoapp/charts/mysql/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/.helmignore @@ -0,0 +1,23 @@ +# 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/.infrastructure/helm-chart/todoapp/charts/mysql/Chart.yaml b/.infrastructure/helm-chart/todoapp/charts/mysql/Chart.yaml new file mode 100644 index 0000000..2f18252 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: mysql +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/templates/configMap.yml b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/configMap.yml new file mode 100644 index 0000000..2cad5de --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/configMap.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: mysql + namespace: {{ .Values.mysql.namespace }} + labels: + app: mysql +data: + init.sql: | + GRANT ALL PRIVILEGES ON app_db.* TO 'app_user'@'%'; + USE app_db; + CREATE TABLE counter ( + id INT AUTO_INCREMENT PRIMARY KEY, + value INT + ); diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/templates/ns.yml b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/ns.yml new file mode 100644 index 0000000..d5a8a94 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/ns.yml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Values.mysql.namespace }} diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/templates/secret.yml b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/secret.yml new file mode 100644 index 0000000..7df946d --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/secret.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mysql-secrets + namespace: {{ .Values.mysql.namespace }} +type: Opaque +data: + {{- range $key, $value := .Values.mysql.secrets }} + {{ $key }}: {{ $value }} + {{- end }} diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/templates/service.yml b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/service.yml new file mode 100644 index 0000000..e33790c --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/service.yml @@ -0,0 +1,17 @@ +# Headless service for stable DNS entries of StatefulSet members. +apiVersion: v1 +kind: Service +metadata: + name: mysql + namespace: {{ .Values.mysql.namespace }} +spec: + selector: + app: mysql + ports: + - name: mysql + port: 3306 + clusterIP: None + +# pod-name.service-name.namespace.svc.cluster.local +# pod-name.service-name +# mysql-0.mysql.mysql.svc.cluster.local \ No newline at end of file diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/templates/statefulSet.yml b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/statefulSet.yml new file mode 100644 index 0000000..afcdbdd --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/templates/statefulSet.yml @@ -0,0 +1,97 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: mysql + namespace: {{ .Values.mysql.namespace }} +spec: + selector: + matchLabels: + app: mysql + replicas: {{ .Values.mysql.dbReplicas }} + serviceName: mysql + template: + metadata: + labels: + app: mysql + spec: + containers: + - name: mysql + image: {{ .Values.mysql.image.repository }}:{{ .Values.mysql.image.version }} + env: + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: MYSQL_ROOT_PASSWORD + - name: MYSQL_USER + valueFrom: + secretKeyRef: + name: mysql-secrets + key: MYSQL_USER + - name: MYSQL_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: MYSQL_PASSWORD + - name: MYSQL_DATABASE + value: app_db + ports: + - name: mysql + containerPort: 3306 + volumeMounts: + - name: data + mountPath: /var/lib/mysql + subPath: mysql + - name: config-map + mountPath: /docker-entrypoint-initdb.d + resources: + requests: + cpu: {{ .Values.mysql.resources.requests.cpu }} + memory: {{ .Values.mysql.resources.requests.memory }} + livenessProbe: + exec: + command: ["mysqladmin", "ping"] + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + readinessProbe: + exec: + command: ["mysqladmin", "ping"] + initialDelaySeconds: 5 + periodSeconds: 2 + timeoutSeconds: 1 + volumes: + - name: config-map + configMap: + name: mysql + tolerations: + - key: {{ .Values.mysql.tolerations.key }} + operator: "Equal" + value: {{ .Values.mysql.tolerations.value }} + effect: "NoSchedule" + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: {{ .Values.mysql.affinity.podaffinity.key }} + operator: In + values: + - {{ .Values.mysql.affinity.podaffinity.value }} + topologyKey: "kubernetes.io/hostname" + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: {{ .Values.mysql.affinity.nodeaffinity.key }} + operator: In + values: + - {{ .Values.mysql.affinity.nodeaffinity.value }} + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: {{ .Values.mysql.VolumeClaim }} diff --git a/.infrastructure/helm-chart/todoapp/charts/mysql/values.yaml b/.infrastructure/helm-chart/todoapp/charts/mysql/values.yaml new file mode 100644 index 0000000..d79e9c8 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/charts/mysql/values.yaml @@ -0,0 +1,41 @@ +mysql: + namespace: mysql + + image: + repository: mysql + version: 8.0 + + dbReplicas: 2 + + resources: + requests: + cpu: 500m + memory: 1Gi + + secrets: + MYSQL_ROOT_PASSWORD: "MTIzNA==" # Base64 encoding for "1234" + MYSQL_USER: "YXBwX3VzZXI=" # Base64 encoding for "app_user" + MYSQL_PASSWORD: "MTIzNA==" # Base64 encoding for "1234" + + VolumeClaim: 2Gi + + tolerations: + key: "app" + value: "mysql" + operator: "Equal" + effect: "NoSchedule" + + affinity: + podaffinity: + key: "app" + value: "mysql" + operator: In + values: + - mysql + + nodeaffinity: + key: "app" + value: "mysql" + operator: In + values: + - mysql diff --git a/.infrastructure/helm-chart/todoapp/templates/clusterIp.yml b/.infrastructure/helm-chart/todoapp/templates/clusterIp.yml new file mode 100644 index 0000000..cb66e27 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/clusterIp.yml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: todoapp-service + namespace: {{ .Values.todoapp.namespace }} +spec: + type: ClusterIP + selector: + app: todoapp + ports: + - protocol: TCP + port: 80 + targetPort: 8080 diff --git a/.infrastructure/helm-chart/todoapp/templates/configMap.yml b/.infrastructure/helm-chart/todoapp/templates/configMap.yml new file mode 100644 index 0000000..4f77295 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/configMap.yml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: app-config + namespace: {{ .Values.todoapp.namespace }} +data: + PYTHONUNBUFFERED: "1" diff --git a/.infrastructure/helm-chart/todoapp/templates/deployment.yml b/.infrastructure/helm-chart/todoapp/templates/deployment.yml new file mode 100644 index 0000000..7407469 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/deployment.yml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: todoapp + namespace: {{ .Values.todoapp.namespace }} +spec: + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: {{ .Values.todoapp.RollUpdParam.maxSurge }} + maxUnavailable: {{ .Values.todoapp.RollUpdParam.maxUnavailable }} + selector: + matchLabels: + app: todoapp + template: + metadata: + labels: + app: todoapp + spec: + serviceAccountName: {{ .Values.todoapp.RBACService.name }} + containers: + - name: todoapp + image: {{ .Values.todoapp.image.repo }}:{{ .Values.todoapp.image.tag }} + volumeMounts: + - name: data + mountPath: /app/data + - name: app-secrets-volume + mountPath: "/app/secrets" + readOnly: true + - name: app-config-volume + mountPath: "/app/configs" + readOnly: true + resources: + requests: + memory: {{ .Values.todoapp.resources.requests.memory }} + cpu: {{ .Values.todoapp.resources.requests.cpu }} + limits: + memory: {{ .Values.todoapp.resources.limits.memory }} + cpu: {{ .Values.todoapp.resources.limits.cpu }} + env: + - name: PYTHONUNBUFFERED + valueFrom: + configMapKeyRef: + name: app-config + key: PYTHONUNBUFFERED + {{- range $key, $value := .Values.todoapp.secrets }} + - name: {{ $key }} + valueFrom: + secretKeyRef: + name: app-secret + key: {{ $key }} + {{- end }} + ports: + - containerPort: 8080 + livenessProbe: + httpGet: + path: api/health + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: api/ready + port: 8080 + initialDelaySeconds: 30 + periodSeconds: 15 + volumes: + - name: data + persistentVolumeClaim: + claimName: pvc-data + - name: app-secrets-volume + secret: + secretName: app-secret + - name: app-config-volume + configMap: + name: app-config + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: {{ .Values.todoapp.nodeAffinity.weight }} + preference: + matchExpressions: + - key: {{ .Values.todoapp.nodeAffinity.key }} + operator: {{ .Values.todoapp.nodeAffinity.operator }} + values: + - {{ .Values.todoapp.nodeAffinity.values }} diff --git a/.infrastructure/helm-chart/todoapp/templates/hpa.yml b/.infrastructure/helm-chart/todoapp/templates/hpa.yml new file mode 100644 index 0000000..f957c92 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/hpa.yml @@ -0,0 +1,25 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: todoapp + namespace: {{ .Values.todoapp.namespace }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: todoapp + minReplicas: {{ .Values.todoapp.HorScaling.minReplicas }} + maxReplicas: {{ .Values.todoapp.HorScaling.maxReplicas }} + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.todoapp.HorScaling.resourcetarget.cpu }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.todoapp.HorScaling.resourcetarget.memory }} diff --git a/.infrastructure/helm-chart/todoapp/templates/ingress.yml b/.infrastructure/helm-chart/todoapp/templates/ingress.yml new file mode 100644 index 0000000..7e03f12 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/ingress.yml @@ -0,0 +1,18 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: todoapp-ingress + namespace: {{ .Values.todoapp.namespace }} + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / +spec: + rules: + - http: + paths: + - pathType: Prefix + path: / + backend: + service: + name: todoapp-service + port: + number: 80 diff --git a/.infrastructure/helm-chart/todoapp/templates/nodeport.yml b/.infrastructure/helm-chart/todoapp/templates/nodeport.yml new file mode 100644 index 0000000..b04b003 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/nodeport.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: todoapp-nodeport + namespace: {{ .Values.todoapp.namespace }} +spec: + type: NodePort + selector: + app: todoapp + ports: + - protocol: TCP + port: 80 + targetPort: 8080 + nodePort: 30007 diff --git a/.infrastructure/helm-chart/todoapp/templates/ns.yml b/.infrastructure/helm-chart/todoapp/templates/ns.yml new file mode 100644 index 0000000..5b90b3f --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/ns.yml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: {{ .Values.todoapp.namespace }} diff --git a/.infrastructure/helm-chart/todoapp/templates/pv.yml b/.infrastructure/helm-chart/todoapp/templates/pv.yml new file mode 100644 index 0000000..b6c02e2 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/pv.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-data + namespace: {{ .Values.todoapp.namespace }} +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Delete + accessModes: + - ReadWriteMany + capacity: + storage: {{ .Values.todoapp.PersistentVolume.capacity }} + hostPath: + path: /data/ diff --git a/.infrastructure/helm-chart/todoapp/templates/pvc.yml b/.infrastructure/helm-chart/todoapp/templates/pvc.yml new file mode 100644 index 0000000..e3a4d55 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/pvc.yml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pvc-data + namespace: {{ .Values.todoapp.namespace }} +spec: + volumeName: pv-data + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.todoapp.PersistentVolumeClaim.requests }} diff --git a/.infrastructure/helm-chart/todoapp/templates/rbac.yml b/.infrastructure/helm-chart/todoapp/templates/rbac.yml new file mode 100644 index 0000000..7494390 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/rbac.yml @@ -0,0 +1,30 @@ +kind: ServiceAccount +apiVersion: v1 +metadata: + name: {{ .Values.todoapp.RBACService.name }} + namespace: {{ .Values.todoapp.namespace }} + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: {{ .Values.todoapp.namespace }} + name: {{ .Values.todoapp.RBACService.name }} +rules: +- apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "watch", "list"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Values.todoapp.RBACService.name }}-binding + namespace: {{ .Values.todoapp.namespace }} +subjects: +- kind: ServiceAccount + name: {{ .Values.todoapp.RBACService.name }} +roleRef: + kind: Role + name: {{ .Values.todoapp.RBACService.name }} + apiGroup: rbac.authorization.k8s.io diff --git a/.infrastructure/helm-chart/todoapp/templates/secret.yml b/.infrastructure/helm-chart/todoapp/templates/secret.yml new file mode 100644 index 0000000..7831f1a --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/templates/secret.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Secret +metadata: + name: app-secret + namespace: {{ .Values.todoapp.namespace }} +type: Opaque +data: + {{- range $key, $value := .Values.todoapp.secrets }} + {{ $key }}: {{ $value }} + {{- end }} diff --git a/.infrastructure/helm-chart/todoapp/values.yaml b/.infrastructure/helm-chart/todoapp/values.yaml new file mode 100644 index 0000000..5230d69 --- /dev/null +++ b/.infrastructure/helm-chart/todoapp/values.yaml @@ -0,0 +1,47 @@ +todoapp: + namespace: todoapp + + image: + repo: ikulyk404/todoapp + tag: 4.0.1 + + secrets: + SECRET_KEY: QGUyKHl4KXYmdGdoM19zPTB5amEtaSFkcGVieHN6XmRnNDd4KS1rJmtxXzN6Zio5ZSoK # @e2(yx)v&tgh3_s=0yja-i!dpebxsz^dg47x)-k&kq_3zf*9e* + DB_NAME: "YXBwX2RiCg==" # app_db + DB_USER: "YXBwX3VzZXI=" # app_user + DB_PASSWORD: "MTIzNA==" # 1234 + DB_HOST: "bXlzcWwtMC5teXNxbC5teXNxbC5zdmMuY2x1c3Rlci5sb2NhbAo=" # mysql-0.mysql.mysql.svc.cluster.local + + resources: + requests: + memory: "256Mi" + cpu: "150m" + limits: + memory: "256Mi" + cpu: "150m" + + RollUpdParam: + maxSurge: 1 + maxUnavailable: 1 + + nodeAffinity: + weight: 1 + key: app + operator: In + values: kube2py + + HorScaling: + minReplicas: 2 + maxReplicas: 5 + resourcetarget: + cpu: 70 + memory: 70 + + PersistentVolume: + capacity: 1Gi + + PersistentVolumeClaim: + requests: 1Gi + + RBACService: + name: secrets-reader diff --git a/README.md b/README.md index 93f589c..5f294f1 100644 --- a/README.md +++ b/README.md @@ -74,3 +74,15 @@ Create a kubernetes manifest for a pod which will containa ToDo app container: 11. Run command `kubectl get all,cm,secret,ing -A` and put the output in a file called `output.log` in a root of the repository 12. `README.md` should have instructuions on how to validate the changes 13. Create PR with your changes and attach it for validation on a platform. + +## Delpoy + +### Run bootstrap.sh +``` +bash bootstrap.sh +``` + +### Validate changes +``` +helm upgrade todoapp .infrastructure/helm-chart/todoapp/ +``` diff --git a/bootstrap.sh b/bootstrap.sh index 2d534d7..4597bec 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,20 +1,29 @@ #!/bin/bash -kubectl apply -f .infrastructure/mysql/ns.yml -kubectl apply -f .infrastructure/mysql/configMap.yml -kubectl apply -f .infrastructure/mysql/secret.yml -kubectl apply -f .infrastructure/mysql/service.yml -kubectl apply -f .infrastructure/mysql/statefulSet.yml +# kubectl apply -f .infrastructure/mysql/ns.yml +# kubectl apply -f .infrastructure/mysql/configMap.yml +# kubectl apply -f .infrastructure/mysql/secret.yml +# kubectl apply -f .infrastructure/mysql/service.yml +# kubectl apply -f .infrastructure/mysql/statefulSet.yml -kubectl apply -f .infrastructure/app/ns.yml -kubectl apply -f .infrastructure/app/pv.yml -kubectl apply -f .infrastructure/app/pvc.yml -kubectl apply -f .infrastructure/app/secret.yml -kubectl apply -f .infrastructure/app/configMap.yml -kubectl apply -f .infrastructure/app/clusterIp.yml -kubectl apply -f .infrastructure/app/nodeport.yml -kubectl apply -f .infrastructure/app/hpa.yml -kubectl apply -f .infrastructure/app/deployment.yml +# kubectl apply -f .infrastructure/app/ns.yml +# kubectl apply -f .infrastructure/app/pv.yml +# kubectl apply -f .infrastructure/app/pvc.yml +# kubectl apply -f .infrastructure/app/secret.yml +# kubectl apply -f .infrastructure/app/configMap.yml +# kubectl apply -f .infrastructure/app/clusterIp.yml +# kubectl apply -f .infrastructure/app/nodeport.yml +# kubectl apply -f .infrastructure/app/hpa.yml +# kubectl apply -f .infrastructure/app/deployment.yml # Install Ingress Controller -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml +# kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml # kubectl apply -f .infrastructure/ingress/ingress.yml + +# Create cluster +kind create cluster --config cluster.yml + +# Taint nodes labeled +kubectl taint nodes -l app=mysql app=mysql:NoSchedule + +# deploy using helm +helm install todoapp .infrastructure/helm-chart/todoapp diff --git a/output.log b/output.log new file mode 100644 index 0000000..8f6831d --- /dev/null +++ b/output.log @@ -0,0 +1,84 @@ +NAMESPACE NAME READY STATUS RESTARTS AGE +kube-system pod/coredns-6f6b679f8f-vs8nj 1/1 Running 1 (120m ago) 122m +kube-system pod/coredns-6f6b679f8f-xf68h 1/1 Running 1 (120m ago) 122m +kube-system pod/etcd-kind-control-plane 1/1 Running 1 (120m ago) 123m +kube-system pod/kindnet-8cv5x 1/1 Running 1 (121m ago) 122m +kube-system pod/kindnet-c2bgt 1/1 Running 1 (121m ago) 122m +kube-system pod/kindnet-fqcz9 1/1 Running 1 (121m ago) 122m +kube-system pod/kindnet-g628f 1/1 Running 1 (121m ago) 122m +kube-system pod/kindnet-nn4v8 1/1 Running 1 (121m ago) 122m +kube-system pod/kindnet-nxlnc 1/1 Running 1 (120m ago) 122m +kube-system pod/kindnet-xj99p 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-apiserver-kind-control-plane 1/1 Running 1 (120m ago) 122m +kube-system pod/kube-controller-manager-kind-control-plane 1/1 Running 1 (120m ago) 122m +kube-system pod/kube-proxy-62dpv 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-proxy-99fkk 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-proxy-f6pwr 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-proxy-kzmn6 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-proxy-m7flf 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-proxy-qgq8s 1/1 Running 1 (120m ago) 122m +kube-system pod/kube-proxy-vf67q 1/1 Running 1 (121m ago) 122m +kube-system pod/kube-scheduler-kind-control-plane 1/1 Running 1 (120m ago) 122m +local-path-storage pod/local-path-provisioner-57c5987fd4-l7pm4 1/1 Running 2 (119m ago) 122m +mysql pod/mysql-0 1/1 Running 0 6m24s +mysql pod/mysql-1 1/1 Running 0 5m52s +todoapp pod/todoapp-7d96c4f9cd-56qkz 1/1 Running 9 (8m57s ago) 27m +todoapp pod/todoapp-7d96c4f9cd-zsv82 1/1 Running 9 (8m28s ago) 27m + +NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +default service/kubernetes ClusterIP 10.96.0.1 443/TCP 123m +kube-system service/kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP,9153/TCP 122m +mysql service/mysql ClusterIP None 3306/TCP 6m24s +todoapp service/todoapp-nodeport NodePort 10.96.140.2 80:30007/TCP 117m +todoapp service/todoapp-service ClusterIP 10.96.67.99 80/TCP 117m + +NAMESPACE NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE +kube-system daemonset.apps/kindnet 7 7 7 7 7 kubernetes.io/os=linux 122m +kube-system daemonset.apps/kube-proxy 7 7 7 7 7 kubernetes.io/os=linux 122m + +NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE +kube-system deployment.apps/coredns 2/2 2 2 122m +local-path-storage deployment.apps/local-path-provisioner 1/1 1 1 122m +todoapp deployment.apps/todoapp 2/2 2 2 117m + +NAMESPACE NAME DESIRED CURRENT READY AGE +kube-system replicaset.apps/coredns-6f6b679f8f 2 2 2 122m +local-path-storage replicaset.apps/local-path-provisioner-57c5987fd4 1 1 1 122m +todoapp replicaset.apps/todoapp-5f897f778 0 0 0 117m +todoapp replicaset.apps/todoapp-7d96c4f9cd 2 2 2 27m + +NAMESPACE NAME READY AGE +mysql statefulset.apps/mysql 2/2 6m24s + +NAMESPACE NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE +todoapp horizontalpodautoscaler.autoscaling/todoapp Deployment/todoapp cpu: /70%, memory: /70% 2 5 2 117m + +NAMESPACE NAME DATA AGE +default configmap/kube-root-ca.crt 1 122m +kube-node-lease configmap/kube-root-ca.crt 1 122m +kube-public configmap/cluster-info 2 122m +kube-public configmap/kube-root-ca.crt 1 122m +kube-system configmap/coredns 1 122m +kube-system configmap/extension-apiserver-authentication 6 123m +kube-system configmap/kube-apiserver-legacy-service-account-token-tracking 1 123m +kube-system configmap/kube-proxy 2 122m +kube-system configmap/kube-root-ca.crt 1 122m +kube-system configmap/kubeadm-config 1 123m +kube-system configmap/kubelet-config 1 123m +local-path-storage configmap/kube-root-ca.crt 1 122m +local-path-storage configmap/local-path-config 4 122m +mysql configmap/kube-root-ca.crt 1 6m24s +mysql configmap/mysql 1 6m24s +todoapp configmap/app-config 1 117m +todoapp configmap/kube-root-ca.crt 1 117m + +NAMESPACE NAME TYPE DATA AGE +default secret/sh.helm.release.v1.todoapp.v1 helm.sh/release.v1 1 117m +default secret/sh.helm.release.v1.todoapp.v2 helm.sh/release.v1 1 27m +default secret/sh.helm.release.v1.todoapp.v3 helm.sh/release.v1 1 6m25s +kube-system secret/bootstrap-token-abcdef bootstrap.kubernetes.io/token 6 123m +mysql secret/mysql-secrets Opaque 3 6m24s +todoapp secret/app-secret Opaque 5 117m + +NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE +todoapp ingress.networking.k8s.io/todoapp-ingress * 80 27m