wordpress-controller

command module
v0.0.0-...-0c61096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

README

Wordpress controller

This project creates a wordpress "custom resource definition"(CRD), and wrote a Controller for this CRD.

Just for learning Kubernetes Controller and CRD.

Usage

  1. Install kubernetes and go on your testing enviroment.

  2. Create a Opaque typed Secret with its name mysql-passwd, stores your mysql password in key password.

  3. Create two PVCs, names mysql-pvc and wordpress-pvc for storing mysql and wordpress data.

  4. Clone this repo, build and run.

    git clone https://github.com/STARRY-S/wordpress-controller.git
    cd wordpress-controller
    kubectl apply -f ./artifacs/wordpress-controller/crd.yaml
    go build -o controller .
    ./controller -kubeconfig <path/to/kube/config>
    
    # Open another shell
    kubectl apply -f ./artifacs/wordpress-controller/example-wordpress.yaml
    
  5. You can access the wordpress setup page by using port-forward.

    kubectl port-forward deployments/wordpress-example 8080:80 --address='0.0.0.0'
    

    View http://127.0.0.1:8080.

    Or use Ingress to expose your web service.


Refer: sample-controller

License: Apache 2.0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/wordpresscontroller/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/wordpresscontroller/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/wordpresscontroller/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL