oeDeploy Use Cases
Use Case 1: One-Click Kubernetes Deployment
Prepare three virtual machines with 2 cores and 4 GB memory (with Layer-3 network connectivity) running openEuler 24.03 LTS SP1. The goal is to deploy a Kubernetes cluster consisting of 1 master and 2 worker nodes.
On any node, download and install oeDeploy CLI tool oedp
.
wget https://repo.oepkgs.net/openEuler/rpm/openEuler-24.03-LTS/contrib/oedp/x86_64/Packages/oedp-1.0.1-1.oe2503.x86_64.rpm
yum install -y oedp-1.0.1-1.oe2503.x86_64.rpm
Download and extract the Kubernetes plugin package (verify that the kubernetes-1.31.1 directory appears).
wget https://repo.oepkgs.net/openEuler/rpm/openEuler-24.03-LTS/contrib/oedp/plugins/kubernetes-1.31.1.tar.gz
tar -zxvf kubernetes-1.31.1.tar.gz
View plugin details.
oedp info -p kubernetes-1.31.1
Modify the project configuration file with actual node information.
vim kubernetes-1.31.1/config.yaml
all:
children:
masters:
hosts:
172.27.76.114: # master node IP address
ansible_host: 172.27.76.114 # master node IP address
ansible_port: 22
ansible_user: root
ansible_password:
architecture: amd64 # amd64 or arm64
oeversion: 24.03-LTS # 22.03-LTS or 24.03-LTS
workers:
hosts:
172.27.70.60: # worker node IP address
ansible_host: 172.27.70.60 # worker node IP address
ansible_port: 22
ansible_user: root
ansible_password:
architecture: amd64
oeversion: 24.03-LTS
172.27.72.90:
ansible_host: 172.27.72.90
ansible_port: 22
ansible_user: root
ansible_password:
architecture: amd64
oeversion: 24.03-LTS
vars:
init_cluster_force: "true"
service_cidr: 10.96.0.0/16
pod_cidr: 10.244.0.0/16
certs_expired: 3650
has_deployed_containerd: "false"
ansible_ssh_common_args: "-o StrictHostKeyChecking=no"
Note: Ensure SSH connectivity between nodes (supports both password and key-based authentication). If using key-based authentication, omit password configuration.
Execute automated deployment.
oedp run install -p kubernetes-1.31.1
To uninstall Kubernetes:
oedp run delete -p kubernetes-1.31.1
The
-p
flag specifies the extracted plugin directory. When runningoedp
commands from within the kubernetes-1.31.1 root directory, omit this parameter.