Kubernates note
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
Build a jar
Create a YAML file in the deployment folder
# The API version of the Kubernetes resource type you are using. |
- Publish the deployment
kubectl apply -f newapp-deployment.yaml |
- List of all deployments
kubectl get deployments |
- List of pods in the current running containers
kubectl get pods |
- List of services
kubectl get svc |
- Show detailed information about a specif pods
f <pod-name> |
Fd
Re
Re
rer

