Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

@MIGU 补充应用安装相关部分

@huawei 补充控制面相关部分


Introduction

How to use this document

Deployment Architecture

This document describes steps required to deploy a sample environment and test for CFN (Computing Force Network) Ubiquitous Computing Force Scheduling Blueprint.

Deployment Architecture

Image Added


Control plane: one k8s cluster is deployed in private lab.

Traffic plane: two K8s clusters are deployed in private lab.

Pre-Installation Requirements

...

          kubeadm-1.23.7

          kubectl-1.23.7N/A

  • Database Perequisites

schema scripts: N/A

...

0 Environmental description

Two centos At least two CentOS machines are required, one as the master node and the other as the worker node. The installed k8s version is 1.23.7.

There will be a comment like #master in front of each bash command, which is used to indicate which type of machine the command is used onIf there is no comment, the bash command needs to be executed on both types of machines

This document contains the operation and execution process, you can compare the screenshots of the document during the installation process.

1 Basic environment preparation

...

Preparing the basic environment to ensure the normal execution of subsequent operations.

1.1 Confirm your OS

Confirm that the operating system of the current machine is CentOS 7  .

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
cat /etc/redhat-release

...

If the name is long, it is recommended to use a combination of letters and dashes, such as "aa-bb-cc", here directly set to master and worker1.

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
# master
hostnamectl set-hostname master
hostnamectl
# worker 
hostnamectl set-hostname worker1
hostnamectl 

...

The changed host name needs to take effect after reboot.

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
reboot

1.3 Set address mappinmapping

Set address mapping, and test the network.

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
cat <<EOF>> /etc/hosts
${YOUR IP} master
${YOUR IP} worker1
EOF
ping master
ping worker1

...

The main content is to install docker-ce, and configure the cgroup driver of docker as systemd, confirm the driver.

2.1 Uninstall old docker

Execute command

...

It is worth noting that /root/.kube/config is Kubernetes host config and the /etc/karmada/karmada-apiserver.config is Karmada's configkarmada-apiserver config

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
kubectl karmada --kubeconfig /etc/karmada/karmada-apiserver.config  joinjoin ${YOUR MEMBER NAME} --cluster-kubeconfig=${YOUR MEMBER CONFIG PATH} --cluster-context=${YOUR CLUSTER CONTEXT}

Image RemovedImage Added

Here is example command for your information: kubectl karmada --kubeconfig /etc/karmada/karmada-apiserver.config  join member1 --cluster-kubeconfig=/root/.kube/192.168.30.22_member1-config --cluster-context=kubernetes-admin@kubernetes

  • --kubeconfig  specifies the Karmada's kubeconfig file and the CLI 
  • --cluster-kubeconfig specifies the member's config. Generally, it can be obtained from the worker cluster in "/root/.kube/config"
  • --cluster-context the value of current-context from --cluster-kubeconfig

...

7.2 Create nginx deployment in Karmada

deployment.yaml  are obtained through here https://github.com/karmada-io/karmada/tree/master/samples/nginx

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
kubectl create -f /root/sample/nginx/deployment.yaml --kubeconfig /etc/karmada/karmada-apiserver.config
kubectl get deployment  --kubeconfig /etc/karmada/karmada-apiserver.config 

...

7.3 Create PropagationPolicy that will propagate nginx to member cluster

propagationpolicy.yaml  are obtained through here https://github.com/karmada-io/karmada/tree/master/samples/nginx

Execute command

Code Block
languagebash
themeDJango
linenumberstrue
kubectl create -f /root/sample/nginx/propagationpolicy.yaml --kubeconfig /etc/karmada/karmada-apiserver.config

...

Uninstall Guide


Troubleshooting

1. Network problem: the working cluster uses the default communication mode of calico, and the access between nodes is blocked; After many attempts, calico vxlan is feasible and flannel is feasible at present;

2. Disaster recovery scenario scheduling, test scenario 2, requires the karmada control plane to install the deschedule component;

Maintenance

  • Blue Print Package Maintenance

    • Software maintenance: N/A 
    • Hardware maintenance:N/A

...