-
Notifications
You must be signed in to change notification settings - Fork 0
/
02_cluster-setup.sh
151 lines (129 loc) · 4.38 KB
/
02_cluster-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/bin/bash
minikube status
# minikube
# type: Control Plane
# host: Running
# kubelet: Running
# apiserver: Running
# kubeconfig: Configured
# timeToStop: Nonexistent
kubectl get nodes
# NAME STATUS ROLES AGE VERSION
# minikube Ready control-plane,master 135m v1.20.0
minikube pause
# ⏸️ Pausing node minikube ...
# ⏯️ Paused 14 containers in: kube-system, kubernetes-dashboard, storage-gluster, istio-operator
minikube status
# minikube
# type: Control Plane
# ost: Running
# ubelet: Stopped
# piserver: Paused
# ubeconfig: Configured
# imeToStop: Nonexistent
kubectl get nodes
# Unable to connect to the server: net/http: TLS handshake timeout
minikube unpause
# ⏸️ Unpausing node minikube ...
# ⏸️ Unpaused 14 containers in: kube-system, kubernetes-dashboard, storage-gluster, istio-operator
minikube status
# minikube
# type: Control Plane
# host: Running
# kubelet: Running
# apiserver: Running
# kubeconfig: Configured
# timeToStop: Nonexistent
kubectl get nodes
# NAME STATUS ROLES AGE VERSION
# minikube Ready control-plane,master 136m v1.20.0
kube stop
# ✋ Stopping node "minikube" ...
# 🛑 Powering off "minikube" via SSH ...
# 🛑 1 nodes stopped.
minikube status
# minikube
# type: Control Plane
# host: Stopped
# kubelet: Stopped
# apiserver: Stopped
# kubeconfig: Stopped
# timeToStop: Nonexistent
minikube start
# 😄 minikube v1.16.0 on Ubuntu 18.04
# ✨ Using the docker driver based on existing profile
# 👍 Starting control plane node minikube in cluster minikube
# 🔄 Restarting existing docker container for "minikube" ...
# 🐳 Preparing Kubernetes v1.20.0 on Docker 20.10.0 ...
# 🔎 Verifying Kubernetes components...
# 🌟 Enabled addons: storage-provisioner, default-storageclass
# 🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
minikube delete
# 🔥 Deleting "minikube" in docker ...
# 🔥 Deleting container "minikube" ...
# 🔥 Removing /home/angel/.minikube/machines/minikube ...
# 💀 Removed all traces of the "minikube" cluster.
minikube start --cpus=2 --memory=2GB --driver=docker
# 😄 minikube v1.16.0 on Ubuntu 18.04
# ✨ Using the docker driver based on user configuration
# 👍 Starting control plane node minikube in cluster minikube
# 🔥 Creating docker container (CPUs=2, Memory=2048MB) ...
# 🐳 Preparing Kubernetes v1.20.0 on Docker 20.10.0 ...
# ▪ Generating certificates and keys ...
# ▪ Booting up control plane ...
# ▪ Configuring RBAC rules ...
# 🔎 Verifying Kubernetes components...
# 🌟 Enabled addons: storage-provisioner, default-storageclass
# 🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
minikube config set cpus 2
#❗ These changes will take effect upon a minikube delete and then a minikube start
cat ./minikube/config/config.json
# {
# "cpus": 2
# }
# We can manually edit it to add some extra properties
# {
# "cpus": 2,
# "dashboard": false,
# "disk-size": "20000",
# "driver": "docker",
# "insecure-registry": "true",
# "memory": 2000
# }
minikube delete
# 🔥 Deleting "minikube" in docker ...
# 🔥 Deleting container "minikube" ...
# 🔥 Removing /home/angel/.minikube/machines/minikube ...
# 🔥 Trying to delete invalid profile minikube
minikube config view
# - disk-size: 20000
# - driver: docker
# - insecure-registry: true
# - memory: 2000
# - cpus: 2
# - dashboard: false
minikube start
# 😄 minikube v1.16.0 on Ubuntu 18.04
# ✨ Using the docker driver based on user configuration
# 👍 Starting control plane node minikube in cluster minikube
# 🔥 Creating docker container (CPUs=2, Memory=2000MB) ...
# 🐳 Preparing Kubernetes v1.20.0 on Docker 20.10.0 ...
# 🔎 Verifying Kubernetes components...
# 🌟 Enabled addons: storage-provisioner, default-storageclass
# 🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
minikube config unset cpus
minikube config view
# - insecure-registry: true
# - memory: 2000
# - dashboard: false
# - disk-size: 20000
# - driver: docker
minikube config set cpus 2
#❗ These changes will take effect upon a minikube delete and then a minikube start
minikube config view
# - cpus: 2
# - dashboard: false
# - disk-size: 20000
# - driver: docker
# - insecure-registry: true
# - memory: 2000