This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: cluster.x-k8s.io/v1alpha2 | |
| kind: MachineDeployment | |
| metadata: | |
| name: capi-quickstart-worker | |
| labels: | |
| cluster.x-k8s.io/cluster-name: capi-quickstart | |
| # Labels beyond this point are for example purposes, | |
| # feel free to add more or change with something more meaningful. | |
| # Sync these values with spec.selector.matchLabels and spec.template.metadata.labels. | |
| nodepool: nodepool-0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl --kubeconfig=./capi-quickstart.kubeconfig \ | |
| -n kube-system patch daemonset calico-node \ | |
| --type=strategic --patch=' | |
| spec: | |
| template: | |
| spec: | |
| containers: | |
| - name: calico-node | |
| env: | |
| - name: FELIX_IGNORELOOSERPF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl --kubeconfig=./capi-quickstart.kubeconfig \ | |
| apply -f https://docs.projectcalico.org/v3.8/manifests/calico.yaml | |
| configmap/calico-config created | |
| customresourcedefinition.apiextensions.k8s.io/felixconfigurations.crd.projectcalico.org created | |
| customresourcedefinition.apiextensions.k8s.io/ipamblocks.crd.projectcalico.org created | |
| customresourcedefinition.apiextensions.k8s.io/blockaffinities.crd.projectcalico.org created | |
| customresourcedefinition.apiextensions.k8s.io/ipamhandles.crd.projectcalico.org created | |
| customresourcedefinition.apiextensions.k8s.io/ipamconfigs.crd.projectcalico.org created | |
| customresourcedefinition.apiextensions.k8s.io/bgppeers.crd.projectcalico.org created |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl --kubeconfig=./capi-quickstart.kubeconfig get nodes | |
| NAME STATUS ROLES AGE VERSION | |
| capi-quickstart-capi-quickstart-controlplane-0 NotReady master 8m35s v1.15.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| clusters: | |
| - cluster: | |
| insecure-skip-tls-verify: true | |
| server: https://127.0.0.1:40319 | |
| name: capi-quickstart | |
| contexts: | |
| - context: | |
| cluster: capi-quickstart | |
| user: kubernetes-admin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sed -i -e "s/server:.*/server: https:\/\/$(docker port capi-quickstart-lb 6443/tcp | sed "s/0.0.0.0/127.0.0.1/")/g" ./capi-quickstart.kubeconfig | |
| # Ignore the CA, because it is not signed for 127.0.0.1 | |
| sed -i -e "s/certificate-authority-data:.*/insecure-skip-tls-verify: true/g" ./capi-quickstart.kubeconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl --namespace=default get secret/capi-quickstart-kubeconfig -o json \ | |
| | jq -r .data.value \ | |
| | base64 --decode \ | |
| > ./capi-quickstart.kubeconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker ps | |
| CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
| f449784405e6 kindest/node:v1.15.3 "/usr/local/bin/entr…" About a minute ago Up About a minute 35547/tcp, 127.0.0.1:35547->6443/tcp capi-quickstart-capi-quickstart-controlplane-0 | |
| 38d5a9338e3d nginx:1.15.12-alpine "nginx -g 'daemon of…" 11 minutes ago Up 11 minutes 80/tcp, 40319/tcp, 0.0.0.0:40319->6443/tcp capi-quickstart-lb | |
| 68d711500e26 kindest/node:v1.17.0 "/usr/local/bin/entr…" 25 minutes ago Up 25 minutes 127.0.0.1:32775->6443/tcp clusterapi-control-plane |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl get machines --selector cluster.x-k8s.io/control-plane | |
| NAME PROVIDERID PHASE | |
| capi-quickstart-controlplane-0 docker:////capi-quickstart-capi-quickstart-controlplane-0 running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kubectl create -f machine.yaml | |
| machine.cluster.x-k8s.io/capi-quickstart-controlplane-0 created | |
| dockermachine.infrastructure.cluster.x-k8s.io/capi-quickstart-controlplane-0 created | |
| kubeadmconfig.bootstrap.cluster.x-k8s.io/capi-quickstart-controlplane-0 created |