Skip to content
Snippets Groups Projects
Commit dd1d9fe5 authored by ludo8147's avatar ludo8147
Browse files

corrected kubernetes cluster with verified application

parent cf47ef7f
No related branches found
No related tags found
No related merge requests found
Pipeline #69243 passed
...@@ -55,8 +55,18 @@ Script started on 2024-09-07 16:46:02+02:00 [TERM="xterm-256color" TTY="/dev/pts ...@@ -55,8 +55,18 @@ Script started on 2024-09-07 16:46:02+02:00 [TERM="xterm-256color" TTY="/dev/pts
 default: │ http://127.0.0.1:3000 │  default: │ http://127.0.0.1:3000 │
 default: │ (bound on host 0.0.0.0 and port 3000) │  default: │ (bound on host 0.0.0.0 and port 3000) │
 default: │ │  default: │ │
 default: │ Handlers ............ 31 Processes ...  default: │ Handlers ............ 31 Processes........ 1 │
 default: │ Prefork ....... Disabled PID .............. 2039 │
 default: └───────────────────────────────────────────────────┘
lucad@lucad:~/Documents/webservice$ curl http://localhost:8080  default: 
Hello, World!lucad@lucad:~/Documents/webservice$  default: time=2024-09-07T14:47:36.240Z level=DEBUG msg="GET / mime:*/* agent:curl/8.5.0"
\ No newline at end of file ^C==> default: Waiting for cleanup before exiting...
^C==> default: Exiting immediately, without cleanup!
[?2004h]0;lucad@lucad: ~/Documents/webservice/Spin_up_a_virtual_machine_locallylucad@lucad:~/Documents/webservice/Spin_up_a_virtual_machine_locally$ vagrant rdestroy
[?2004l  default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
[?2004h]0;lucad@lucad: ~/Documents/webservice/Spin_up_a_virtual_machine_locallylucad@lucad:~/Documents/webservice/Spin_up_a_virtual_machine_locally$ [?2004l
exit
Script done on 2024-09-07 16:55:08+02:00 [COMMAND_EXIT_CODE="0"]
......
...@@ -11,5 +11,4 @@ spec: ...@@ -11,5 +11,4 @@ spec:
ports: ports:
- port: 80 - port: 80
targetPort: 3000 targetPort: 3000
protocol: TCP protocol: TCP
type: 'ClusterIP' \ No newline at end of file
\ No newline at end of file
...@@ -2108,3 +2108,109 @@ service/webservice-service configured ...@@ -2108,3 +2108,109 @@ service/webservice-service configured
[?2004l [?2004l
service/webservice-service configured service/webservice-service configured
[?2004h]0;lucad@ [?2004h]0;lucad@
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ minikube start \
--cpus=2 --memory=4096m \
--container-runtime=cri-o \
--driver=virtualbox \
--addons=ingress \
--profile=devops-tutorial
😄 [devops-tutorial] minikube v1.33.1 on Ubuntu 24.04
✨ Using the virtualbox driver based on existing profile
👍 Starting "devops-tutorial" primary control-plane node in "devops-tutorial" cluster
🔄 Restarting existing virtualbox VM for "devops-tutorial" ...
🎁 Preparing Kubernetes v1.30.0 on CRI-O 1.29.1 ...
🔗 Configuring bridge CNI (Container Networking Interface) ...
🔎 Verifying Kubernetes components...
▪ Using image registry.k8s.io/ingress-nginx/controller:v1.10.1
▪ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.1
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
▪ Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.1
🔎 Verifying ingress addon...
🌟 Enabled addons: default-storageclass, storage-provisioner, ingress
🏄 Done! kubectl is now configured to use "devops-tutorial" cluster and "default" namespace by default
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl api-resources
NAME SHORTNAMES APIVERSION NAMESPACED KIND
bindings v1 true Binding
componentstatuses cs v1 false ComponentStatus
configmaps cm v1 true ConfigMap
endpoints ep v1 true Endpoints
events ev v1 true Event
limitranges limits v1 true LimitRange
namespaces ns v1 false Namespace
nodes no v1 false Node
persistentvolumeclaims pvc v1 true PersistentVolumeClaim
persistentvolumes pv v1 false PersistentVolume
pods po v1 true Pod
podtemplates v1 true PodTemplate
replicationcontrollers rc v1 true ReplicationController
resourcequotas quota v1 true ResourceQuota
secrets v1 true Secret
serviceaccounts sa v1 true ServiceAccount
services svc v1 true Service
mutatingwebhookconfigurations admissionregistration.k8s.io/v1 false MutatingWebhookConfiguration
validatingadmissionpolicies admissionregistration.k8s.io/v1 false ValidatingAdmissionPolicy
validatingadmissionpolicybindings admissionregistration.k8s.io/v1 false ValidatingAdmissionPolicyBinding
validatingwebhookconfigurations admissionregistration.k8s.io/v1 false ValidatingWebhookConfiguration
customresourcedefinitions crd,crds apiextensions.k8s.io/v1 false CustomResourceDefinition
apiservices apiregistration.k8s.io/v1 false APIService
controllerrevisions apps/v1 true ControllerRevision
daemonsets ds apps/v1 true DaemonSet
deployments deploy apps/v1 true Deployment
replicasets rs apps/v1 true ReplicaSet
statefulsets sts apps/v1 true StatefulSet
selfsubjectreviews authentication.k8s.io/v1 false SelfSubjectReview
tokenreviews authentication.k8s.io/v1 false TokenReview
localsubjectaccessreviews authorization.k8s.io/v1 true LocalSubjectAccessReview
selfsubjectaccessreviews authorization.k8s.io/v1 false SelfSubjectAccessReview
selfsubjectrulesreviews authorization.k8s.io/v1 false SelfSubjectRulesReview
subjectaccessreviews authorization.k8s.io/v1 false SubjectAccessReview
horizontalpodautoscalers hpa autoscaling/v2 true HorizontalPodAutoscaler
cronjobs cj batch/v1 true CronJob
jobs batch/v1 true Job
certificatesigningrequests csr certificates.k8s.io/v1 false CertificateSigningRequest
leases coordination.k8s.io/v1 true Lease
endpointslices discovery.k8s.io/v1 true EndpointSlice
events ev events.k8s.io/v1 true Event
flowschemas flowcontrol.apiserver.k8s.io/v1 false FlowSchema
prioritylevelconfigurations flowcontrol.apiserver.k8s.io/v1 false PriorityLevelConfiguration
ingressclasses networking.k8s.io/v1 false IngressClass
ingresses ing networking.k8s.io/v1 true Ingress
networkpolicies netpol networking.k8s.io/v1 true NetworkPolicy
runtimeclasses node.k8s.io/v1 false RuntimeClass
poddisruptionbudgets pdb policy/v1 true PodDisruptionBudget
clusterrolebindings rbac.authorization.k8s.io/v1 false ClusterRoleBinding
clusterroles rbac.authorization.k8s.io/v1 false ClusterRole
rolebindings rbac.authorization.k8s.io/v1 true RoleBinding
roles rbac.authorization.k8s.io/v1 true Role
priorityclasses pc scheduling.k8s.io/v1 false PriorityClass
csidrivers storage.k8s.io/v1 false CSIDriver
csinodes storage.k8s.io/v1 false CSINode
csistoragecapacities storage.k8s.io/v1 true CSIStorageCapacity
storageclasses sc storage.k8s.io/v1 false StorageClass
volumeattachments storage.k8s.io/v1 false VolumeAttachment
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl get pods
No resources found in default namespace.
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl create namespace tutorial
Error from server (AlreadyExists): namespaces "tutorial" already exists
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl kubectl config set-context --current --namespace tutorial
error: unknown command "kubectl" for "kubectl"
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl config set-context --current --namespace tutorial
Context "devops-tutorial" modified.
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl getpods
error: unknown command "getpods" for "kubectl"
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl get pods
NAME READY STATUS RESTARTS AGE
webservice-deployment-7ffd578df-gtklr 1/1 Running 1 30h
webservice-deployment-7ffd578df-l6mbx 1/1 Running 1 30h
webservice-deployment-7ffd578df-nzzpd 1/1 Running 1 30h
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ curl http://webservice.local
Hello, World!lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl apply -f service.yaml
service/webservice-service configured
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ curl http://webservice.local
Hello, World!lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ curl http://webservice.local
Hello, World!lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ curl http://webservice.local
Hello, World!lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
webservice-service LoadBalancer 10.106.249.66 <pending> 80:32629/TCP 31h
lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$ curl http://webservice.local
Hello, World!lucad@lucad:~/Documents/webservice/deploy_app_on_kubernetes$
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment