Skip to main content

Kubernates note

Published 1 min readMarkdown

1. Start minikube server:

minikube start  

2. Show how many pods are running now

kubectl get pods -A

3. Access the web dashboard of minikube

minikube dashboard

4. Restart deployment

kubectl rollout restart deployment spring-boot-app

4. Apply kubernates yaml change

kubectl apply -f myapp-deployment.yaml 

5. Copy jar to kubernates

minikube cp KubernatesPractice-0.0.1-SNAPSHOT.jar /home/docker/app/KubernatesPractice-0.0.1-SNAPSHOT.jar

6. Scale up pods

kubectl scale deployment spring-boot-app --replicas=3

7. Update the ConfigMap

kubectl create configmap app-config --from-file=application-prod.properties --dry-run=client -o yaml | kubectl apply -f -

8. Create secret in kubernates

kubectl create secret generic mysql-secret \

Deployment of a new Service

  1. Build a jar

  2. Create a YAML file in the deployment folder

# The API version of the Kubernetes resource type you are using.

  1. Publish the deployment

kubectl apply -f newapp-deployment.yaml

  1. List of all deployments

kubectl get deployments

  1. List of pods in the current running containers

kubectl get pods

  1. List of services

kubectl get svc

  1. Show detailed information about a specif pods

f <pod-name>

  1. Fd

  2. Re

  3. Re

  4. rer

No comments yet. Be the first to comment.

More from this blog