mas pruebas y acceso
This commit is contained in:
@@ -7,6 +7,9 @@ kubectl create deployment nginx-app --image nginx --replicas 2 --namespace demo-
|
|||||||
kubectl get deployment -n demo-app
|
kubectl get deployment -n demo-app
|
||||||
kubectl get pods -n demo-app
|
kubectl get pods -n demo-app
|
||||||
|
|
||||||
|
kubectl scale --replicas=20 deployment nginx-app -n demo-app
|
||||||
|
|
||||||
|
kubectl delete deployment nginx-app -n demo-app
|
||||||
|
|
||||||
kubectl expose deployment nginx-app -n demo-app --type NodePort --port 80
|
kubectl expose deployment nginx-app -n demo-app --type NodePort --port 80
|
||||||
kubectl get svc -n demo-app
|
kubectl get svc -n demo-app
|
||||||
@@ -17,6 +20,8 @@ kubectl get svc -n demo-app
|
|||||||
curl http://localhost:30336
|
curl http://localhost:30336
|
||||||
|
|
||||||
|
|
||||||
|
kubectl create ns demo-app
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,3 +23,5 @@ sed -i 's/^duid/#duid/' "$CONFIG_FILE"
|
|||||||
# Descomentar la línea '#clientid'
|
# Descomentar la línea '#clientid'
|
||||||
sed -i 's/^#clientid/clientid/' "$CONFIG_FILE"
|
sed -i 's/^#clientid/clientid/' "$CONFIG_FILE"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
33
add-nodo.md
Normal file
33
add-nodo.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
Your Kubernetes control-plane has initialized successfully!
|
||||||
|
|
||||||
|
To start using your cluster, you need to run the following as a regular user:
|
||||||
|
|
||||||
|
mkdir -p $HOME/.kube
|
||||||
|
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
|
||||||
|
sudo chown $(id -u):$(id -g) $HOME/.kube/config
|
||||||
|
|
||||||
|
Alternatively, if you are the root user, you can run:
|
||||||
|
|
||||||
|
export KUBECONFIG=/etc/kubernetes/admin.conf
|
||||||
|
|
||||||
|
You should now deploy a pod network to the cluster.
|
||||||
|
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
|
||||||
|
https://kubernetes.io/docs/concepts/cluster-administration/addons/
|
||||||
|
|
||||||
|
You can now join any number of control-plane nodes running the following command on each as root:
|
||||||
|
|
||||||
|
kubeadm join k8s01:6443 --token mlv46u.o92gie7d9wseptfx \
|
||||||
|
--discovery-token-ca-cert-hash sha256:2c20f2d546d59772bb0a82fae16c213c8c7a35b80365f39cd6e5be037f84a94a \
|
||||||
|
--control-plane --certificate-key 8985eb6d3979f371b7c2dbd98e14f071fe7fd1a86468112d501c29ffe7e6843e
|
||||||
|
|
||||||
|
Please note that the certificate-key gives access to cluster sensitive data, keep it secret!
|
||||||
|
As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use
|
||||||
|
"kubeadm init phase upload-certs --upload-certs" to reload certs afterward.
|
||||||
|
|
||||||
|
Then you can join any number of worker nodes by running the following on each as root:
|
||||||
|
|
||||||
|
kubeadm join k8s01:6443 --token mlv46u.o92gie7d9wseptfx \
|
||||||
|
--discovery-token-ca-cert-hash sha256:2c20f2d546d59772bb0a82fae16c213c8c7a35b80365f39cd6e5be037f84a94a
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user