devops:docker:kubernetes:tutorial-springboot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devops:docker:kubernetes:tutorial-springboot [2024/03/05 21:17] – skipidar | devops:docker:kubernetes:tutorial-springboot [2024/03/05 21:51] (current) – skipidar | ||
---|---|---|---|
Line 140: | Line 140: | ||
- | Kubernetes usually uses REMOTE images from repo. | + | **Kubernetes usually uses REMOTE images from repo.** |
+ | To fix: | ||
+ | |||
+ | |||
+ | **Step1: | ||
Artificially add the image to the minikube cache. | Artificially add the image to the minikube cache. | ||
- | Using "minikube | + | |
- | Achtung: without repository name. | + | Achtung: work around bug https:// |
+ | |||
+ | < | ||
+ | skip@desktop:/ | ||
+ | skip@desktop:/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | **Step2:** | ||
+ | |||
+ | Use '' | ||
+ | |||
+ | After taht '' | ||
<sxh shell> | <sxh shell> | ||
- | skip@desktop: | + | skip@desktop: |
- | REPOSITORY | + | skip@desktop:/ |
- | paketobuildpacks/ | + | REPOSITORY |
- | gcr.io/k8s-minikube/kicbase | + | docker |
- | gcr.io/k8s-minikube/ | + | k8s.gcr.io/kube-apiserver |
- | demo 0.0.1-SNAPSHOT | + | k8s.gcr.io/kube-controller-manager |
- | springguides/demo | + | k8s.gcr.io/ |
- | paketobuildpacks/builder-jammy-base | + | k8s.gcr.io/kube-proxy v1.23.3 |
- | skip@desktop: | + | k8s.gcr.io/ |
- | skip@desktop: | + | k8s.gcr.io/ |
+ | k8s.gcr.io/pause 3.6 | ||
+ | kubernetesui/ | ||
+ | kubernetesui/metrics-scraper | ||
+ | gcr.io/k8s-minikube/ | ||
+ | springguides/ | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Now finally you can run a container with image ' | ||
+ | |||
+ | <sxh> | ||
+ | skip@desktop:/ | ||
+ | deployment.apps/ | ||
+ | service/ | ||
+ | skip@desktop:/ | ||
+ | NAME READY | ||
+ | pod/ | ||
+ | |||
+ | NAME | ||
+ | service/ | ||
+ | service/ | ||
+ | |||
+ | NAME | ||
+ | deployment.apps/ | ||
+ | |||
+ | NAME DESIRED | ||
+ | replicaset.apps/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | Forwarding port | ||
+ | |||
+ | <sxh> | ||
+ | kubectl port-forward svc/demo 8080:8080 | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | kubectl: This is the command-line tool used to interact with a Kubernetes cluster. | ||
+ | |||
+ | port-forward: | ||
+ | |||
+ | svc/demo: This specifies the target resource for port forwarding. It indicates a Service named demo in the current namespace. | ||
+ | |||
+ | 8080:8080: This defines the port mapping. The first 8080 represents the local port on your machine that will be used to access the forwarded service. The second 8080 indicates the port on the target service within the cluster. | ||
+ | |||
+ | |||
+ | |||
+ | You can now reach the service on 8080 | ||
+ | <sxh> | ||
+ | curl localhost: | ||
+ | </ | ||
devops/docker/kubernetes/tutorial-springboot.1709673430.txt.gz · Last modified: by skipidar