devops:docker:kubernetes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| devops:docker:kubernetes [2024/03/05 19:55] – skipidar | devops:docker:kubernetes [2024/07/21 14:33] (current) – skipidar | ||
|---|---|---|---|
| Line 141: | Line 141: | ||
| ==== Vagrant environment ==== | ==== Vagrant environment ==== | ||
| Use the Vagrant environment for the experiments | Use the Vagrant environment for the experiments | ||
| - | https:// | + | <del>https:// |
| + | |||
| + | https:// | ||
| Line 150: | Line 152: | ||
| - | === On Windows - Dont deploy in minikube=== | + | === Prefered: |
| - | Why not Minukube: the **minikube** may only be started from disk C:\ Otherwise it will throw an error, that it does not recognize the path. | + | |
| + | - install " | ||
| + | - install | ||
| + | |||
| + | see | ||
| + | https:// | ||
| + | === Alternative: | ||
| - | === On Windows - Deploy in Linux-guest Vagrant VM - Minikube distribution === | + | Challenges: redirecting the minikube console etc. is challenging. |
| OS: Ubuntu | OS: Ubuntu | ||
| Line 985: | Line 994: | ||
| kubectl create service clusterip demo --tcp=8080: | kubectl create service clusterip demo --tcp=8080: | ||
| </ | </ | ||
| + | |||
| + | |||
| + | Generated deployment config: | ||
| + | |||
| + | <sxh shell> | ||
| + | |||
| + | apiVersion: apps/v1 | ||
| + | kind: Deployment | ||
| + | metadata: | ||
| + | creationTimestamp: | ||
| + | labels: | ||
| + | app: demo | ||
| + | name: demo | ||
| + | spec: | ||
| + | replicas: 1 | ||
| + | selector: | ||
| + | matchLabels: | ||
| + | app: demo | ||
| + | strategy: | ||
| + | type: RollingUpdate | ||
| + | template: | ||
| + | metadata: | ||
| + | creationTimestamp: | ||
| + | labels: | ||
| + | app: demo | ||
| + | spec: | ||
| + | containers: | ||
| + | - image: springguides/ | ||
| + | name: demo | ||
| + | resources: {} | ||
| + | status: {} | ||
| + | </ | ||
| + | |||
| + | |||
| + | Lets go step by step through the config: | ||
| + | <sxh shell> | ||
| + | |||
| + | metadata: | ||
| + | creationTimestamp: | ||
| + | labels: | ||
| + | app: demo | ||
| + | name: demo | ||
| + | |||
| + | Assign label " | ||
| + | Labels help identify and categorize resources. By assigning specific labels, you can easily distinguish between different types or groups of resources within your cluster. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | spec: | ||
| + | replicas: 1 | ||
| + | selector: | ||
| + | matchLabels: | ||
| + | app: demo | ||
| + | |||
| + | In the provided Kubernetes deployment specification, | ||
| + | |||
| + | selector: | ||
| + | This key signifies the start of the selector configuration within the deployment spec. | ||
| + | |||
| + | matchLabels: | ||
| + | This key specifies that the selector will use labels for matching. | ||
| + | |||
| + | app: demo: | ||
| + | This entry defines the actual matching criteria. It specifies that the selector will only consider Pods with a label named app and a value of demo. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | spec: | ||
| + | replicas: 1 | ||
| + | spec: | ||
| + | containers: | ||
| + | - image: springguides/ | ||
| + | name: demo | ||
| + | resources: {} | ||
| + | |||
| + | This defines the name assigned to the container within the Pod. | ||
| + | |||
| + | </ | ||
| + | |||
devops/docker/kubernetes.1709668539.txt.gz · Last modified: by skipidar
