Creating an Ingress in Pivotal Container Service (PKS)

In this post I’m going to show how to create an Ingress in PKS. I’m going to deliberately keep it as simple as possible so don’t expect anything fancy.

I’ll start by creating a Docker container that runs a web server written in Golang:

main.go

package main

import (
    "fmt"
    "net/http"
)

func homeHandler(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(http.StatusOK)
    fmt.Fprint(w, "home")
}

func usersHandler(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(http.StatusOK)
    fmt.Fprint(w, "users")
}

func main() {
    http.HandleFunc("/home", homeHandler)
    http.HandleFunc("/users", usersHandler)
    http.ListenAndServe(":8181", nil)
}

Read the rest of this entry »


Delete an orphaned PKS cluster

You may run into a situation where your PKS cluster is orphaned or you’re unable to delete it with the pks delete-cluster command. I’m going to show how to manually clean up the PKS cluster in the database.

Read the rest of this entry »