Giter Club home page Giter Club logo

idea-cloud-code-plugin-skaffold's Introduction

Hello World with Cloud Code Build Status

Architecture Diagram

"Hello World" is a simple Kubernetes application that contains a single Deployment and a corresponding Service. The Deployment contains a Spring-based web server that simply prints "Hello World".


Table of Contents

Cloud Code

  1. IDEA Getting Started
  2. Visual Studio Code Getting Started
  3. What's in the box
  4. Using Cloud Code
  5. Using the Command Line

IDEA Getting Started

Required: Docker for Mac or Windows

  • Enable Kubernetes cluster in Docker
  • Uninstall Google App Engine IDEA plugin
  • Install Cloud Code IDEA plugin
  • Restart IDEA
  • Create new Cloud Code: Kubernetes project: Java: Hello World
  • run skaffold run --tail command
  • test if its working with http :/ command: should get Hello, World! http response
  • tear down everything with skaffold delete command

NOTE: if you wanna use k3d / k3s, you will need some help:

  1. k8s (k3s) cluster with k3d (Docker required)
brew reinstall k3d
k3d create --api-port 6551 --publish 80:80 --workers 2
export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
# do some k8s stuff...
k3d stop
k3d delete
rm -rf ~/.config/k3d/k3s-default/kubeconfig.yaml
  1. and k8s ingress resource:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: idea-cloud-code-plugin-skaffold-ingress
spec:
  rules:
    - http:
        paths:
          - backend:
              serviceName: idea-cloud-code-plugin-skaffold-service
              servicePort: 80

Visual Studio Code Getting Started

This sample was written to demonstrate how to use the Cloud Code extension for Visual Studio code.


Using the Command Line

As an alternative to using the Cloud Code extension, the application can be deployed to a cluster using standard command line tools

Skaffold

Skaffold is a command line tool that can be used to build, push, and deploy your container images

skaffold run --default-repo=gcr.io/your-project-id-here/cloudcode

kubectl

kubectl is the official Kubernetes command line tool. It can be used to deploy Kubernetes manifests to your cluster, but images must be build seperately using another tool (for example, using the Docker CLI)

idea-cloud-code-plugin-skaffold's People

Contributors

daggerok avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.